[SOLVED] checking if a url exists
Moderator: General Moderators
[SOLVED] checking if a url exists
after stripping all the links from a webpage and again stripping the hrefs from the links and storing them in an array. i want to check to see if the urls exist (they are absolute) and if not echo "href doesnt exist" and echo "href does exist" if they do. how can in do this?
also, im having problems with file_get_contents("http://etc");
get an error message when calling the function:
Fatal error: Call to undefined function: file_get_contents
anyone know why this is?
get an error message when calling the function:
Fatal error: Call to undefined function: file_get_contents
anyone know why this is?
-
TheBentinel.com
- Forum Contributor
- Posts: 282
- Joined: Wed Mar 10, 2004 1:52 pm
- Location: Columbus, Ohio
Sounds like you might be on an older version of PHP. file_get_contents was introduced in 4.0. I believe you can see your version and other stuff by saying:sh33p1985 wrote: Fatal error: Call to undefined function: file_get_contents
print (php_info());
You will probably need to look into using fopen:
http://www.php.net/fopen