Hi All
I need to send a string to a particular server and a particular port! and for this i use:
$fp = fsockopen ("212.56.142.234",2006, $errno, $errstr, 30);
The data is sent:
fputs ($fp, $str);
The next line is:
$Result = fgets ($fp,4096);
This should receive an answer from the above connection! it should be a very simple ascii string.
At first i was using the following:
while (!feof($fp)) {
$Result = fgets ($fp,4096);
}
But this took ages and it did not work most of the times!
Then i removed the loop and left:
$Result = fgets ($fp,4096);
But that didn't work as i received a null value!
Can anyone pls, pls help me in solving this thanks!!
Nick
I need to send a string to a particular server and a particular port! and for this i use:
$fp = fsockopen ("212.56.142.234",2006, $errno, $errstr, 30);
The data is sent:
fputs ($fp, $str);
The next line is:
$Result = fgets ($fp,4096);
This should receive an answer from the above connection! it should be a very simple ascii string.
At first i was using the following:
while (!feof($fp)) {
$Result = fgets ($fp,4096);
}
But this took ages and it did not work most of the times!
Then i removed the loop and left:
$Result = fgets ($fp,4096);
But that didn't work as i received a null value!
Can anyone pls, pls help me in solving this thanks!!
Nick