Any other good option for fsockopen?

scuhgaula

New Member
I'm trying to make the code below work with curl or something. I have already taken a look at the curl fsockopen conversion but it doesn't work. The code works except that fsockopen is disabled on my host. Any help will be appreciated.\[code\]$host = substr($hostport,0,50);$port = substr($hostport,50,10);$issecure = substr($hostport,60,1);if($issecure=="Y"){ $host = "ssl://".$host;}$fsok = fsockopen(trim($host) , intval(trim($port))); if(FALSE == $fsok ){ echo "Target Host not Found/Down"; return ;}fwrite($fsok, $bodyData ); $port ='';$host ='';$hostport= '';$bodyData='';while ($line = fread($fsok, 25000)){ echo $line;}fclose($fsok); return $line;\[/code\]
 
Back
Top