<?php include content.php ?>

Discussion in 'PHP' started by KingCobra, Aug 26, 2006.

  1. #1
    I used the following function in my php file

    <?php include ads1.php ?>
    <?php include ads2.php ?>
    <?php include ads3.php ?>

    Every page I have puted those 3 functions.

    and in ads.php I just put only google adsense code. Every ads php contain seperate ads channel. My site works fine. But the problem is that every page shows 1 ads only.

    How can I solve it?
     
    KingCobra, Aug 26, 2006 IP
  2. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is quite normal for new sites. You need to wait a little while before AdSense starts showing all 3 sets of ads. Visit your own pages 2 or 3 times per day until the ads begin to show. (Don't click on the ads, of cours).

    Hope that helps...

    Cryo.
     
    Cryogenius, Aug 26, 2006 IP
  3. ahkip

    ahkip Prominent Member

    Messages:
    9,205
    Likes Received:
    647
    Best Answers:
    0
    Trophy Points:
    310
    #3
    yup, it is not php problem...
     
    ahkip, Aug 26, 2006 IP
  4. fscripting

    fscripting Banned

    Messages:
    288
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yea if the keyword has more ads then it will show

    its nothn related to php
     
    fscripting, Aug 27, 2006 IP
  5. jdk

    jdk Well-Known Member

    Messages:
    382
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #5
    A way to have more ads shown is to increase the amount of content you have on your pages.

    There is nothing wrong with your PHP but I would use the following.

    <?php include('ads1.php'); ?>
    <?php include('ads2.php'); ?>
    <?php include('ads3.php'); ?>
     
    jdk, Aug 27, 2006 IP
  6. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #6
    Thanks for your coments
    But I'm waiting everyday to see the three sets of ads. But there is only 1 search content & 1 ads.

    Please see my site - http://www.all-free-hosting.tk

    Waiting for your comments
     
    KingCobra, Aug 29, 2006 IP
  7. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #7
    KingCobra - I can't access your robots.txt file. If search bots can't read this file, then they may not crawl your site (AdSense included). Create an empty file call robots.txt, and upload it to your website. Then make sure that you can view it in your browser.

    Cryo.
     
    Cryogenius, Aug 29, 2006 IP
  8. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #8
    Cryogenius

    Where I have to put the robot.txt . I mean which directory? Thanks
     
    KingCobra, Aug 29, 2006 IP
  9. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Cryogenius, Aug 29, 2006 IP
  10. Mind_nl

    Mind_nl Peon

    Messages:
    95
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #10
    it should be in the root folder of your site:all-free-hosting.tk/robots.txt
    its the same folder that contains your index.php file
     
    Mind_nl, Aug 29, 2006 IP
  11. mariush

    mariush Peon

    Messages:
    562
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #11
    More recently, Google uses a proxy to cache pages, therefore it may be possible that the cache has a previous version of that page, with none or almost no content and Adsense has nothing to show.

    This happens with http://www.3gvideodownloads.com , you should see no ads because Google crawled the page when all the content on the site was "coming soon...". However, if you go to http://3gvideodownloads.com (no www), ads appear. (FYI the text is scraped from Wikipedia, it's just something to show while I work on the site)

    Regarding robots.txt : If file does not exist, bots assume everything can be crawled. If file exists, crawlers read it and look for instructions in it about what NOT to scan.
     
    mariush, Aug 29, 2006 IP
  12. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #12
    I opened a blank text file and saved it as "robots.txt" . And then uploaded it to my server. Now the url is look like http://all-free-hosting.freehostia.com/robots.txt. Is it ok? Please check it.
     
    KingCobra, Aug 31, 2006 IP
  13. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #13
    Dear all of my expart friend/well-wisher,
    Thank you all. finally my page shows all ads.
     
    KingCobra, Aug 31, 2006 IP