How do I add adsense to a php based website?

Discussion in 'AdSense' started by tnoel, Feb 19, 2009.

  1. #1
    I am using dreamweaver and I am having trouble adding google adsense to the website. Anybody have any advice?

    Thank you.
     
    tnoel, Feb 19, 2009 IP
  2. ShadyStudent

    ShadyStudent Peon

    Messages:
    341
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You must be new to PHP dev.

    On the pages that you want to put the ads, are there any html content? If so, just copy and paste adsense code. If everything is PHP, just echo/print the code. Make sure you wrap them around quotes and escape the quotes in the adsense code using a \.
     
    ShadyStudent, Feb 19, 2009 IP
  3. khu84

    khu84 Active Member

    Messages:
    441
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Ultimately the thing PHP pages display is HTML, often PHP is embeded as small portions in HTML pages. So the way other HTML is being displayed, same way you can paste adsene code to a PHP page.

    Hope it helps.
     
    khu84, Feb 19, 2009 IP
  4. tnoel

    tnoel Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I am new to dreamweaver and php dev, please bare with me. I can't seem to get the entire website to appear in dreamweaver. I am only getting portions of the header images and some boxes that are outlined.
     
    tnoel, Feb 19, 2009 IP
  5. ShadyStudent

    ShadyStudent Peon

    Messages:
    341
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Do you have a server running on your computer? To view what PHP outputs side you need to have a web server running like Apache on your computer (localhost) otherwise upload your scripts to a web host that has PHP & Apache installed.

    Anyway, this is the wrong section to discuss this post your problem in the development section.
     
    ShadyStudent, Feb 19, 2009 IP
  6. jezzz

    jezzz Notable Member

    Messages:
    4,884
    Likes Received:
    190
    Best Answers:
    0
    Trophy Points:
    200
    #6
    What type of coding you are using! Tableless or Tables
     
    jezzz, Feb 19, 2009 IP
  7. tnoel

    tnoel Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I am using both formats. I have tried copy/pasting the code from adsense and I am not getting anything to appear in dreamweaver....

    I do appreciate all the help despite posting on the wrong discussion board. Thanks again.
     
    tnoel, Feb 19, 2009 IP
  8. ShadyStudent

    ShadyStudent Peon

    Messages:
    341
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    View your page in a browser not in dreamwaver...what do you see?

    Do you have a web server running to view your PHP pages?

    Show a snippet of your code if you can, if you don't want to, no worries. :)
     
    ShadyStudent, Feb 19, 2009 IP
  9. ShadyStudent

    ShadyStudent Peon

    Messages:
    341
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Wtf has that go to do with anything?
     
    ShadyStudent, Feb 19, 2009 IP
  10. TheVccMatey

    TheVccMatey Peon

    Messages:
    5,346
    Likes Received:
    208
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Just copy and paste the Adsense code to the php pages. If you want to be more professional like, check out a few proxy templates, they've used a nice method to add Adsense on all the pages. I'm not much of a coder, so I can't elaborate it :)
     
    TheVccMatey, Feb 19, 2009 IP