I've spent hours trying to get the simplest code you've ever seen to work, and I am finally defeated. I really need your help guys!
Here is the link:
http://www.clanplay.com/fsockopen.php
Here is the code:
<HTML>
<HEAD>
<TITLE>FSOCKOPEN EXAMPLE - 195.149.21.46:28950</TITLE>
</HEAD>
<BODY>
<?php
$fp = fsockopen("udp://195.149.21.46", 28950, $errno, $errstr);
if (!$fp) {
echo "ERROR: $errno - $errstr<br>\n";
} else {
fwrite($fp,"\n");
echo fread($fp, 26);
fclose($fp);
}
?>
</BODY>
</HTML>
As you can see, it just goes on forever until it eventually times out. But this server is there. Right now. The server I specified is definitely active.
What's more I've tried it with many, many other addresses, and the same thing happens every time, so it must be the function!
Can anyone get that to work on their server?
Surely this is 'text book' stuff?!? Can anyone please shed some light on why it won't work? I've tried it on the 2 web providers I pay for, and also on my local machine with Apache. Nothing.
Help please! :eek: