papaface Posted March 30, 2009 Share Posted March 30, 2009 Hello, I am trying to work with the API for my website. Basically I need to load a specific url to instigate a series of functions. The API will call back my script later automatically. I am trying to find a reliable way of invoking a given URL so that it starts processing the API file BUT I don't want php to sit and wait until the API has finished doing its stuff. I want to update a field in my database when the API is run. I have tried if (get_headers($url)), but this takes to long. I have tried if (curl_exec($ch)) with timeout, but this is unreliable as it seems to start counting the moment curl is exec'd rather than the time from when the url is successfully loaded. I have tried file_get_contents($url), but like curl this is unreliable. Does anyone have any other ideas as to how I could do this? Any help would be appreciated! Quote Link to comment Share on other sites More sharing options...
papaface Posted March 30, 2009 Author Share Posted March 30, 2009 Anyone? :'( Quote Link to comment Share on other sites More sharing options...
papaface Posted March 31, 2009 Author Share Posted March 31, 2009 Oh well I guess this is to much of a challenge. Quote Link to comment Share on other sites More sharing options...
lostnucleus Posted March 31, 2009 Share Posted March 31, 2009 i didnt get completly wat you want to do , but you are left with only one other way of connecting , i.e by using sockets fsockopen($url,$port,$errno,$errstr,$yourTimeOut); ........hope this will help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.