* Thus wrote Cosmin ([EMAIL PROTECTED]): > I'm trying to make an application using XML-RPC, and I have the > following problem: I use fsockopen() to simulate a POST to my local > web-server. All goes very well except it's very very slow. Here is my > code maybe someone could tell me what I'm doing wrong: > ===================================== > $url= parse_url($this->serverURL); > $requestString= "POST ".$url['path']." HTTP/1.1\r\nHost: > ".$url['host']."\r\nContent-type: > application/x-www.form-urlencoded\r\nContent-length: > ".strlen($this->requestData)."\r\n\r\n".$this->requestData;;
Have you tried to simulate this on a web browser? My guess is there might be some dns issue somewhere causing the webserver to take a while before even processing the request. Try and find out where the bottleneck is by echo'ing between steps to see where the problem is, for example: echo time(), "\n"; > $fp = fsockopen($url['host'], 80, $err_num, $err_msg, 5); echo time(), "\n"; Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php