Results 1 to 11 of 11

 

Thread: Contextual Ads Help

  1. #1
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts


    We are trying to make our offer and voucher units contextual, but not quite sure the best method of doing this.

    We have managed to read the content of a page, stript out any html etc, find the most popular keywords and use these keywords in the ad block.

    The problem is for testing we are using the $_SERVER["HTTP_REFERER"]; code to locate the url containing the contextual ad block.. but this only gives us the location of the url if a click has occured from that website.. making it useless really.

    e.g. Click the 'TEST CONTEXTUAL UNITS' link in the footer of the following page.. you can see it works ok, but if the unit is on the user page it doesn't know the keywords. (because a click hasn't occured)

    Dorothy Perkins Clothing Online

    So how do we detect the url of the unit without the need for a click?

    Cheers

    Lee

  2. #2
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts
    Basically if we can detect the url of the site pulling our webservices feed without the need for a manual click then this would solve the problem.. anyone know any coding which can do this.

    Cheers

    Lee
    iCodes - Free Voucher and Offer API Available.

  3. #3
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts
    Just tried it with that and it doesn't work either.

    HTTP REFERER - detects the domain name and folder name.(after click)
    REQUEST_URI j- just detects the folder name and not the domain name (after click)

    Lee
    iCodes - Free Voucher and Offer API Available.

  4. #4
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts
    I think we need to start from scratch with this, I bet it has to work like a search bot to visit the page and bring back the info which is then sorted out to get the keywords then stored in a database... as for doing that i've no idea at this stage :-(

    Lee

  5. #5
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts
    That gave me the details of where the units are hosted.. ie webservices.icodes.co.uk but it gave me an idea :-)

    I've now included $uniturl=getenv("HTTP_HOST"); in the actual unit script to be pasted into the users website, which puts the variable in the webservices paramters to send the info back to us (which seems to work)

    So.. I don't suppose you know the code to request the full path and not just the domain do you?

    Cheers for all this :-)

    Lee
    iCodes - Free Voucher and Offer API Available.

  6. #6
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts
    Yeah I just did something along those lines, but with the method I stated above must cause a continuos loop because it just kept bringing the server to a halt.. ooops!

    It may have been a massive coincidence but I tried it 3 times and all three times everything froze.. I mean all the sites on the same server!

    Lee
    iCodes - Free Voucher and Offer API Available.

  7. #7
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts
    This is so fraustrating because it would work if it didn't freeze it!! arghh

    This is the code the user would paste into their sites (currently in php for ease of testing)

    Code:
    <?php
    $uniturl = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
    $icodes_units = file_get_contents("http://webservices.icodes.co.uk/contextual_php_units.php?username=xmlsite&subid=eecca5b6365d9607ee5a9d336962c534&offertype=Offers&category=All_Categories&pagesize=5&url=$uniturl");
    echo $icodes_units;
    ?>
    An example of a page containing this unit... (at the bottom)

    MySQL Product Feed Website Creator - Free Hosting and Setup

    At the moment as no keywords are passing through it will just display the latest offers.

    But then if I go to the contextual units coding on iCodes, and I uncomment out the section which adds the http:// to the string in order for it to pull in the site content to get the keywords.. it freezes everything!!

    Lee

  8. #8
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts
    Could the problem be that each side is using file_get_contents and so going in an infinate loop?

    Lee
    iCodes - Free Voucher and Offer API Available.

  9. #9
    Typing with both fingers.

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Allt Y Coed Farm, North Pembrokeshire
    Posts
    4,123
    Thanks
    247
    Thanked 198 Times in 157 Posts
    This is a better way of getting the url:-

    PHP Code:

    function getTheUrl()
    {
    $url = ($_SERVER['HTTPS'] == 'on') ? 'https://' 'http://';
    $url .= ($_SERVER['SERVER_PORT'] != '80') ? $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI'] : $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
    return 
    $url;
    }

    echo 
    getTheUrl(); 
    Also take a look at this class:-
    http://phpclasses.fonant.com/browse/package/3245.html

    Ta

    Barry

  10. #10
    Typing with both fingers.

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Allt Y Coed Farm, North Pembrokeshire
    Posts
    4,123
    Thanks
    247
    Thanked 198 Times in 157 Posts
    I'd suggest that if your going down this route that it may eat your servers resources. If you do - then set it up on a different sub domain so you can switch it off if your getting too many request.

    I would consider making a php that when the end user has on their site to find keywords - and then returns those prepared keywords to your script.

    Ta

    Barry

  11. #11
    Leeky's Avatar
    Pagerank10.co.uk

    Status
    Offline
    Join Date
    Mar 2005
    Location
    uk
    Posts
    3,109
    Thanks
    225
    Thanked 185 Times in 126 Posts
    I think i'm just going to leave the contextual units for the time being, and think they would be server heavy like you say.

    The bit about making the end user provide the keywords isn't contextual, it's simply passing the variable through the keywords parameter which they can do already with the standard units (php and javascript).

    e.g. (side bar on pagerank10 already uses the standard javascript units by passing the category variable through it)
    Garden Websites, Garden Voucher Codes, Garden Offers

    Lee
    iCodes - Free Voucher and Offer API Available.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Smart-banners - contextual - is it new ?
    By aotagain in forum Affiliate Marketing Lounge
    Replies: 1
    Last Post: 03-03-10, 01:40 PM
  2. Contextual popunder advertising
    By anshul123 in forum Affiliate Marketing Lounge
    Replies: 10
    Last Post: 20-03-09, 03:34 PM
  3. Contextual banner ads
    By pricethat in forum Affiliate Marketing Lounge
    Replies: 0
    Last Post: 31-05-06, 06:22 AM
  4. Contextual text links
    By pricethat in forum Affiliate Marketing Lounge
    Replies: 9
    Last Post: 10-01-06, 04:14 PM
  5. CJ may go contextual like Adsense?
    By 5starAffiliatePrograms in forum Commission Junction
    Replies: 6
    Last Post: 04-10-03, 03:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2