Hi,
Currently i am using this code to connect to a server get some info. and disconnect. But the problem is that its too slow and i am not sure why.
So someone told me to use cURL to speed things up ...can anyone tell me how do i achieve the same by using cURL ?
Thanks.
PHP Code:<?
$svr = "sub.main.com";
$port = 123;
$url = "someurl.com";
$f = @fsockopen($svr, $port, $errno, $errstr, 30);
if (!$f)
{
return 10;
}
else
{
$rawoutput = "";
fputs($f, "$url\r\n");
while (!feof($f))
{
$rawoutput .= fread($f,128);
}
fclose($f);
}
?>








Bookmarks