Page 1 of 1
Is there a way to ensure a user is still linking to my websi
Posted: Wed Jul 14, 2010 12:00 am
by Smudly
I am working on a link exchange section on my site. The user can gain special access on my site for as long as they link to my website from theirs. Is there a way to create a php or java script that automatically checks if they are still linking to my website? Any ideas on how I could do this?
Re: Is there a way to ensure a user is still linking to my w
Posted: Wed Jul 14, 2010 2:15 am
by Apollo
Setup a cron job to retrieve the particular page (e.g. with
file_get_contents) and see if it contains the link.
Re: Is there a way to ensure a user is still linking to my w
Posted: Wed Jul 14, 2010 2:19 am
by John Cartwright
Apollo wrote:Setup a cron job to retrieve the particular page (e.g. with
file_get_contents) and see if it contains the link.
Right, file_get_contents() or cURL (to more closely resemble a real user request) along with preg_match() for your particular link code.
However, it is worth noting just because your link appears in the html source, does not neccesarily mean it will be visible to the user. I.e., hidden elements.