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
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
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.
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.
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
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.
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.
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)
An example of a page containing this unit... (at the bottom)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; ?>
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
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.
This is a better way of getting the url:-
Also take a look at this class:-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();
http://phpclasses.fonant.com/browse/package/3245.html
Ta
Barry
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
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks