Hi, i have a script, the script work great on a lot of servers, but today i got very weird problem with if condition and include function on a customer server.. on the script my function work with if condition....( if include myfile do "a", and if not do "b" ) if(include("http://url/file.php")){ echo "a"; }else{ echo "b" } and the problem and the weird thing is on this server it check the include, it make the include, but it echo "b" not "a" !!!!! anybody have any idea about the reason of this problem please ??? !!!
You cannot include a php file from another server ... if the script is on the same server, you can (first) check if the file exists (with file_exists command as previous comments suggested you) and then include it, but if scripts are located on different servers you have to find other solutions (curl, web services ... )
Curl can be used to get contents Like wise you can also used to check the existence of the file from header