A
Anonymous
Guest
Hi all..
i know this forum is strictly for php coding - but i think the reason that my apache has gone off twice over the past 3 days is due to the way i have my php code working:-
i am running php scripts for processing some user requests and posting them via http to another french platform on a remote server..
this is how my scripts sends data to this french system.. is there any way where scripts can detect if the http connect is/can be sucessfull...
this french platform has been behaving irregularly as well - it goes off quite often.. this is how my php applications behave when the french system is down and my scripts try to post data to the jsp web-app (on the french system)::- the php scripts just hang in there "trying" to connect, and i think the instances of my php applications end up accumulating , all of them attempting to make the http connections (trying to do the http post) - could it be because of this that the http server on my side (my apache) goes off?
if the http post cannot be performed (since the remote web-app) is down or not accessible) could my script detect this and maybe queue/log the request for processing later.. is it possible to use the "OR" keyword such that if the data cannot be posted to the remote system then a user define function is called to queue the request etc..
thanks
faz
i know this forum is strictly for php coding - but i think the reason that my apache has gone off twice over the past 3 days is due to the way i have my php code working:-
i am running php scripts for processing some user requests and posting them via http to another french platform on a remote server..
this is how my scripts sends data to this french system.. is there any way where scripts can detect if the http connect is/can be sucessfull...
Code:
$url="123.123.123.12:1112/webapp.jsp?arg1=$param1&arg2=$param2&arg3=$param3";
$fcontents = join ('', file ($url));
$fcontents = trim($fcontents);
echo $fcontents;
this french platform has been behaving irregularly as well - it goes off quite often.. this is how my php applications behave when the french system is down and my scripts try to post data to the jsp web-app (on the french system)::- the php scripts just hang in there "trying" to connect, and i think the instances of my php applications end up accumulating , all of them attempting to make the http connections (trying to do the http post) - could it be because of this that the http server on my side (my apache) goes off?
if the http post cannot be performed (since the remote web-app) is down or not accessible) could my script detect this and maybe queue/log the request for processing later.. is it possible to use the "OR" keyword such that if the data cannot be posted to the remote system then a user define function is called to queue the request etc..
thanks
faz