Jump to content


This topic is now archived and is closed to further replies.


Link verification with PHP

Recommended Posts

I have an idea for a link exchange but have no idea on how to implemet it :(

I would have a link exchange sign up page with the following fields that would be entered into a database;
[*]Link URL
[*]Link Name

Quite easy realy but upon someone entering these details they would be given a banner, just a small gif to place onto the front page of their website and what I would like my links page to do is only display the link if my banner is on their website.

Does anybody have any ideas on how I would achieve this?

Share this post

Link to post
Share on other sites
I can't think of any way to determine that a specific image is actually [i]visible[/i] on a particular web site.

Yes, it might be on the server - but not included on any page
Yes, it might be included in some page - but wrapped with a CSS 'hide' tag

Maybe you'll find something useful at http://www.hotscripts.com/search/12084309.html

Share this post

Link to post
Share on other sites
Two ideas for ya':

1) Make the GIF banner be printed with a PHP script. (My signature graphic below is an example. It's generated by a PHP script.)
Each person that enters information for your link referral program should have an associated name (link name, perhaps). The code you give them should be http://your-site.com/graphic.php?their_link_name.
With that PHP script (graphic.php), keep a list of those link names that have requested the image (like in linknames.txt). That proves that they have the image in their HTML.
On your links page, check each link name against linknames.txt. If it's not there, don't display their link.

2) PHP could fetch each page and find the URL to your gif file in their HTML. Note: Fetching external websites and verifying an image to be in their HTML code in real-time takes quite a bit of time.

P.S. Does this make any sense to you? It makes sense in my mind, at least. :)

Share this post

Link to post
Share on other sites
Cheers guys, I had a look at those scripts and as usual each one is way too much then what I need :) but all useful.

pkSML - I hear what you are sayign with idea 1 and this could quite easily be implemented with a cron job so it will only run every say 12 hours instead of every time a visitor hits my page and idea 2 I could use wither a PHP curl or file_get_contents command which will probably be the quickest.

I will look into these tomorrow.


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.