View Full Version : get_headers() alternative in php4
11-06-2007, 07:53 AM
I want to check a file on my server root directory. I have to give a full URL in the path. The file_exists() do not work with this, get_headers() function is in php5. Can anyone suggest an alternative.
11-06-2007, 09:20 AM
If you want to check whether file exist simply use
//file to check if exist
$file = 'File Name';
//file exist do whatever you want
To work in your case just save that code somewhere in your root directory and run it
11-06-2007, 10:33 AM
Thanks for helping me. I will try to figure it out.
11-06-2007, 04:56 PM
Solution: Update to PHP5.
11-07-2007, 01:17 AM
or simply use the appropriate PHP4 functions
to check if a url exists you could use fsockopen() (http://www.php.net/fsockopen)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.