Jump to content

  •  

  • iBotModz CBox


    Photo

    Java Replace help...


    • Please log in to reply
    4 replies to this topic

    #1 fattwam

    fattwam

      General Grade 2

    • Sub-Admins

    • 3,979 posts
    • Joined: 18-August 07
    • Gender:Male

    Posted 13 April 2011 - 12:57 AM

    Hy,
    Basically what i want is a script so when a user views a website though my proxy the proxy will detect any Ad code and replace it with my own code. But it would have to be able to replace the appropriate code with my corresponding code.

    Such as if there is an ad being displayed that is a banner 728*90 i need it to be replaced with my 728*90 banner, same with box 250*250 and so on and so forth. I would want this to detect many ad types such as Google, Yahoo, Right Media, Clicksor, Bidvertiser, and others.

    Im pretty sure that this should be done using JavaScript replace but im not entirely sure.

    Any help appreciated.

    #2 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 13 April 2011 - 06:10 AM

    I used to have some javascript code to remove ads and replace them with white boxes, but I'm sure it could be changed to replace with your own ads. However, detecting the size of the ads, I'm not entirely sure of.

    I'll look for the code.

    #3 fattwam

    fattwam

      General Grade 2

    • Sub-Admins

    • 3,979 posts
    • Joined: 18-August 07
    • Gender:Male

    Posted 13 April 2011 - 01:36 PM

    Great Thanks

    #4 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 16 April 2011 - 07:17 AM

    It looks pretty tough. If all ads were the same, underlying code you could use JS regex to pull the size and re-create your own, but their not.

    So hold on.

    #5 fattwam

    fattwam

      General Grade 2

    • Sub-Admins

    • 3,979 posts
    • Joined: 18-August 07
    • Gender:Male

    Posted 16 April 2011 - 07:20 AM

    Any help is appreciated, even if its only for Google ads and not all ad companies.