RE: webpage link validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> Several ways that I can think of:
> 
>       * use the file_get_contents() which like you said, could be
>         overkill
>       * shell out to wget to retrieve just the headers for the path.
>         You'd be looking for a 200 return code, which indicates the URI
>         exists.
>       * lastly, you could use fopen() to open the file, and use the
>         return from the fopen() call to indicate a success of failure
> 
> Thanks,
> Ash

you forgot probably the best one, an HEAD call via curl library ( http://uk3.php.net/curl ) if present

Regards

_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux