hi james,
thanks for your reply  ..
i was able to connect ( i should have written that in the email) its 
getting the info to flush to the screen that i cant do .. it just hangs..

so if you add
something like

while (!feof($fp)) {
         echo fgets ($fp,128);
     }
     fclose ($fp);

to the end
you get nothing..

...
herein lies my second sleepless day..
i have been tyring to use the sockets() functions which have been 
added.. but they are badly documented and extremely unfriendly..

how did you manage to interact with your telnet server?
cheers
brendan


James Cox wrote:

> Hi,
> 
> I had recent problems like this, and I traced it to firewall issues; however
> i just checked the destination, and  found it is possible to telnet to that
> port, so it's not a firewall issue on their side.
> 
> Try using the following code -- and let it run, see what response you get.
> 
> <?php
> 
> $host = "pericles.ipaustralia.gov.au";
> 
> $fp = fsockopen($host, 23, &$errno, &$errstr, 5);
>    if (!($fp)) {
>       echo "SOCKET ERROR: $errno - $errstr<br>\n";
> }
> 
> ?>
> 
> Hope that helps,
> 
> James Cox
> 
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> James Cox :: Senior Support Engineer
> Wherewithal, Inc. e: [EMAIL PROTECTED]
> Wherewithal. Capture Creative Connections.
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> 
>>-----Original Message-----
>>From: brendan [mailto:[EMAIL PROTECTED]]
>>Sent: 19 December 2001 04:12 AM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] telneting sockets help..
>>
>>
>>hi
>>
>>i have been trying to write a telnet client to a tn3270 IBM mainframe
>>database ( pericles.ipaustralia.gov.au:23 ) using fsockopen ...
>>i thought it wouldnt be that bad given i have done something similar
>>with usenet ..
>>however i cannot get it to work no matter what I do .. i just get a
>>permanent hang ...
>>has anyone ever attempted this or have any solutions?
>>
>>i know this is rather open ended but i cant offer any code which even
>>kind of works..
>>
>>it would be much appreciated..
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>>
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to