Re: HTTP ERRORS Boolean

From: Date: Wed, 07 Jun 2006 08:21:51 +0000
Subject: Re: HTTP ERRORS Boolean
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237541@lists.php.net to get a copy of this message
Rodrigo de Oliveira Costa schrieb:
Guys is there a way that I can call the func file("www.url.com") and get a result true if there is a page and false if the page doesnt exists (error 404)? the thing is I'm trying to retrieve a page but I cant be sure that it exists so I need my script to try to access it and if it cant access it then he should write something else. Thanks, Rodrigo Read the comments of file, fopen, filegetcontents.
There might be a function already written i think i saw one there giving you the error. Best way to handle would be to go over sockets and catch the headerinformation. since 200 is OK and 404 would be GONE and so on. Barry -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

« previous php.general (#237541) next »