View Single Post
Old 08-29-07, 11:01 AM   #5
fivefeet8
Ngemu Mod
 
Join Date: Jul 2003
Location: Fresno, CA
Posts: 1,886
Default Re: Detecting Bad Links

Quote:
Originally Posted by supra
ohhhhh. . well i spose u could do something like this

Code:
$test = get_meta_tags('http://www.example.com/');
and test if $test is null or not. Null being the website is not working
Thanks for your help. I'm think I'm not being specific enough in my question though. PHP is server side, so that function will originate from the server it's running. There's a link that the server will never be able to reach, but the client can depending on where they are connected to the internet.

What I need is a way to detect non working links on the client side. Essentially, if the client can't connect to a certain webpage, they get directed to another. If they can, then they get sent to it.

To be more specific the scenario is this:

A clients connects to the web server, the web server probably needs to send some type of client side script that upon page load, checks if the client can connect to another website. If they can connect to that other website, they get sent there. If they can't then they stay at the original web server they connected to.

I know how to send them to other URLs with javascript, but I need a way to check if they can connect to certain URLs from where they are connected.
__________________
[i7 2600k @4.4ghertz][2x4 GB DDR3 1600][EVGA GTX570 1.280GB SC][EVGA GTX460 physx][Asrock Extreme7 Gen3 Z68][2xSeagate 160 Gb SATA HD raid0][Seagate 250 GB SATA2 HD][Sony Bravia 40' 1080p LCD HDTV][NEC 3520a DVD+-DLw][Windows 7 Ultimate x64][Rosewill 1000w]
fivefeet8 is offline   Reply With Quote