fsockopen

Status
Not open for further replies.
Messages
75
Reaction score
0
Points
6
I have tested the fsockopen php command and I keep getting erroneous responses. Is there something wrong with the php system?

---------- Post added at 05:52 PM ---------- Previous post was at 04:32 PM ----------

To add to my previous post; I am including the script I am trying to run. The contents of my hb.php script are as follows:

<?php

$ip = $_GET['ip'];
$port = $_GET['port'];
$timeout = 4;
$on = file_get_contents('./images/on.png');
$off = file_get_contents('./images/off.png');

if ($ip and $port and $timeout) {
$verbinding = @fsockopen("$ip", $port, $errno, $errstr, $timeout);
}
if($verbinding) {
echo $on;
}
else {
echo $off;
}
?>
 
Status
Not open for further replies.
Top