I have a php application which needs to get user data by making repeated SOAP calls--up to 700. Unfortunately, the kind of reporting purposes that will serve seems to make it necessary to make the repeated calls. Anyway, I have a For loop (which could repeat for up to 700 times) which calls a function and the function, in turn, makes the SOAP call. But I am getting an error about the SOAP call timing out after 30 seconds. Obviously, I need to wait for the next SOAP calls after the first one returned to the calling function. So how to do this. Here is a code fragment:
//calling function
foreach($xml_apicheck->children() as $child)
{
getprincipalinfoandemail($endusersconame);
}
//called function
function getprincipalinfoandemail($loginid) {
//making the SOAP calls and emailing//works for the first time called
return true;
}
See Question&Answers more detail:os