help needed for code

Discussion in 'AdSense' started by surekhaweb, Jul 30, 2007.

  1. #1
    if i will build 5000 html page site....

    i will add 3 adsense code manually.....par page

    now i decide i will remove 1 adsense code place one affiliate link....

    but 5000 html page i cannot add manually....it's going to lots of time in case in feature i will remove affiliate ad and back to adsense ad so is it any way to change add this type of code in html page
     
    surekhaweb, Jul 30, 2007 IP
  2. godmode

    godmode Well-Known Member

    Messages:
    4,453
    Likes Received:
    156
    Best Answers:
    0
    Trophy Points:
    190
    #2
    Depends on what CMS you are using. You might not need to edit each page if u want ads across 5000 pages.

    I suggest first build those 5000 pages and then start worrying.

    First build the foundation of the building and then think about coloring it:D
     
    godmode, Jul 30, 2007 IP
  3. surekhaweb

    surekhaweb Banned

    Messages:
    504
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    can any one give the code or solution for this?

    should be not again's the adsense TOS.
     
    surekhaweb, Jul 30, 2007 IP
  4. 330td

    330td Well-Known Member

    Messages:
    855
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    135
    #4
    <?php include "ads.php";?> is your friend :p
     
    330td, Jul 30, 2007 IP
  5. surekhaweb

    surekhaweb Banned

    Messages:
    504
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i hosted my site is windows server so i think php is not supported.
    please give me other idea.
     
    surekhaweb, Jul 30, 2007 IP
  6. sachin410

    sachin410 Illustrious Member

    Messages:
    6,422
    Likes Received:
    573
    Best Answers:
    0
    Trophy Points:
    410
    #6
    php can run on Windows as well. Check with your host if it supports php or not.
     
    sachin410, Jul 30, 2007 IP
  7. surekhaweb

    surekhaweb Banned

    Messages:
    504
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    ok

    can any one give me example?

    how can i use this php code and .php file with html pages?
     
    surekhaweb, Jul 30, 2007 IP
  8. webseo

    webseo Well-Known Member

    Messages:
    190
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    120
    #8
    If you are using dreamweaver use your libary. Add the code to your libary inside a table and when you make a change to that libary item it will change it site wide.
     
    webseo, Jul 30, 2007 IP
  9. Yeldarb

    Yeldarb Active Member

    Messages:
    209
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #9
    What you're trying to do is called a "batch replace"

    If found his PHP script with a little help from Google:
    http://software.techrepublic.com.com/download.aspx?docid=211090

    Never used it so I can't attest to its validity, but it should be something that's simple to write in PHP or any other scripting language.
     
    Yeldarb, Jul 30, 2007 IP
  10. matthewk

    matthewk Guest

    Messages:
    265
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Ok, ill try and keep this short. If you are running a windows server, you can use php(i am running a server from my house, and it uses xp and has php).

    From what i understand, you already have the 5000 pages, each with 3 ad units on it, and you want to replace one of the ad units on each page with an affiliate link.

    Do you keep track of your units by channel(ie. top channel, middle channel, bottom channel)?

    There are a variety of ways of doing it. If you use channels, and you want to replace all of the ads that are using one specific channel, its pretty easy. Are all your files stored in one directory, or multiple directories?

    Either way, you can make a script that reads all files/folders in a directory, checks if it contains 3 ad units, and if it does, replaces the appropriate one and saves it.

    This is assuming you arent using a CMS. If you are, there are probably many other(much easier) ways to do it.

    Send me a message with more details if you are still looking for a solution.
     
    matthewk, Jul 30, 2007 IP
  11. Justin Nijs

    Justin Nijs Well-Known Member

    Messages:
    631
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    110
    #11
    I've got an html replacer. Maybe you can use that?
     
    Justin Nijs, Jul 30, 2007 IP
  12. surekhaweb

    surekhaweb Banned

    Messages:
    504
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    i develop page in dreamweaver i am trying use library but not working how can i use for this.

    please proper guide me.

    still i m confused.

    i am not using any cms.

    i have simple html code.

    if any one can give me proper example that will be very help ful for me.

    thanks.
     
    surekhaweb, Aug 13, 2007 IP
  13. mike323

    mike323 Well-Known Member

    Messages:
    1,594
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    160
    #13

    an rss feed in javascript? you really should get php, however. makes life much easier. you could have updated all 5000 pages from one page.

    try working with this: www.rss-info.com
     
    mike323, Aug 14, 2007 IP
  14. surekhaweb

    surekhaweb Banned

    Messages:
    504
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    can any one give sample page?
     
    surekhaweb, Aug 14, 2007 IP
  15. krazyj

    krazyj Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    try using the replace feature and looking for a string thats common throughout
     
    krazyj, Aug 14, 2007 IP
  16. trichnosis

    trichnosis Prominent Member

    Messages:
    13,785
    Likes Received:
    333
    Best Answers:
    0
    Trophy Points:
    300
    #16
    i think best solution for you is not using html pages.

    you can start to solve this problem with choosing a cms:)
     
    trichnosis, Aug 14, 2007 IP
  17. mike323

    mike323 Well-Known Member

    Messages:
    1,594
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    160
    #17
    see thew daily funny vid site in my sig
     
    mike323, Aug 14, 2007 IP
  18. peacemaker

    peacemaker Well-Known Member

    Messages:
    305
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #18
    Perl / Python small script works like a charm in this case !
     
    peacemaker, Aug 14, 2007 IP
  19. totalmasala

    totalmasala Banned

    Messages:
    1,454
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #19
    you should make frame and place ad there! so it will be very easy to replace the ads!
     
    totalmasala, Aug 15, 2007 IP