Hi
I would like to know if there's a code to check if a link(to a page or imaeg) exist ?
use this:
if(!@$fp = fopen("http://www.url.com/pageorimage.ext","r")) { echo "file doesnt exist"; } else { echo "file exists"; } @fclose($fp);
must have allow_url_fopen on in php.ini for this to work
edit:: this may not work if the remote server redirects 404 pages to a different page..
waaa works perfectly thanx alot !
but is there a similar code but in jjavascript ?
nope, javascript is incapable of performing such tasks. js is only good for client side scripting, not server side..