Attempting to send data asynchronously with fsockopen() fails. What could be the problem? Sends only if you put die in front of fclose() . Or if you add the output of the result using fgets() but then the request is no longer asynchronous.
if (!$open = fsockopen(site.ru, 80, $errno, $errstr, 30)) return false; fwrite($open, "POST /script.php HTTP/1.1\r\n"); fwrite($open, "Host: site.ru\r\n"); fwrite($open, "Content-Type: application/x-www-form-urlencoded\r\n"); fwrite($open, "Content-Length: 6\r\n"); fwrite($open, "Connection: Close\r\n\r\n"); fwrite($open, "params=1"); fclose($open);