PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1845
Number of posts: 5013

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: Trying to write a raw tcp connection Posted by DarQ on 26 Mar 2004 at 10:13 AM

why do you use a persistant connection? try

http://php.net/fsockopen/
instead of
http://php.net/pfsockopen/

btw: there can be MANY problems, it doesnt have to be php related, although it can be. at least i don't see a problem with your tiny example code. and usually, these tiny pieces of code that do a single thing with mostly a single function work properly.


: I have been working on this for 2 days with little luck. Can someone give me some links to some sites that explain more about raw tcp and what it takes to make the connection. This is my code. It keeps telling me can not connect, but sometimes it does connect. The code is to connect to a serial port server that has a device attached via serial connection. Thanks ahead of time for any responses.
:
: <?php
:
: $host1 = "192.168.1.81";
: $port = "8001";
:
: $pserv1 = pfsockopen($host1, $port);
: fclose($pserv1);
: ?>
:

DarQ
http://mark.space.servehttp.com

Thread Tree
Hondo Trying to write a raw tcp connection on 26 Mar 2004 at 7:57 AM
DarQ Re: Trying to write a raw tcp connection on 26 Mar 2004 at 10:13 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.