You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
342 B
27 lines
342 B
<?php
|
|
$socket = fsockopen("localhost", 8888, $errno, $errstr);
|
|
|
|
if($socket)
|
|
{
|
|
echo "Connected!\n";
|
|
}
|
|
else
|
|
{
|
|
echo "Connection failed!\n";
|
|
}
|
|
|
|
fputs($socket, "feed");
|
|
|
|
$buffer = "";
|
|
|
|
while(!feof($socket))
|
|
{
|
|
$buffer .=fgets($socket, 4096);
|
|
}
|
|
|
|
print_r($buffer);
|
|
echo "\n\n";
|
|
var_dump($buffer);
|
|
|
|
fclose($socket);
|
|
?>
|
|
|