Alternative to CURL due to long waiting Alternative to CURL due to long waiting curl curl

Alternative to CURL due to long waiting


This might be a useful starting point, flagrantly copypasted from here

function curl_post_async($url, $params){    $post_string = http_build_query($params);    $parts=parse_url($url);    $fp = fsockopen($parts['host'],         isset($parts['port'])?$parts['port']:80,         $errno, $errstr, 30);    //pete_assert(($fp!=0), "Couldn't open a socket to ".$url." (".$errstr.")");(optional)    $out = "POST ".$parts['path']." HTTP/1.1\r\n";    $out.= "Host: ".$parts['host']."\r\n";    $out.= "Content-Type: application/x-www-form-urlencoded\r\n";    $out.= "Content-Length: ".strlen($post_string)."\r\n";    $out.= "Connection: Close\r\n\r\n";    if (isset($post_string)) $out.= $post_string;    fwrite($fp, $out);    fclose($fp);}


http://php.net/manual/en/function.fsockopen.php

$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);if (!$fp) {    echo "$errstr ($errno)\n";} else {    $out = "GET / HTTP/1.1\r\n";    $out .= "Host: www.example.com\r\n";    $out .= "Connection: Close\r\n\r\n";    fwrite($fp, $out);    while (!feof($fp)) {        echo fgets($fp, 128);    }    fclose($fp);}


You could create a server socket on the other machine that your PHP web page connects to. This way, you decide the protocol. Otherwise, look to see if a background process meets your needs.