Search found 3 matches

by ckli6
Sun Oct 01, 2006 8:44 am
Forum: PHP - Code
Topic: Socket Bind Error when running script from another PC
Replies: 9
Views: 1551

bind() first. create(), bind(), set_nonblock(), select() -> recvfrom()/sendto(). Oh yeah, don't use recv(), use recvfrom(), that's the right way of getting the remote sender, what you are doing currently is only correct if both scripts are on the same server. Thank you, Mordred. I'll take your appr...
by ckli6
Sun Oct 01, 2006 2:26 am
Forum: PHP - Code
Topic: Socket Bind Error when running script from another PC
Replies: 9
Views: 1551

Hi, Thank you all for all the suggestions and pointers. Actually, this script is embedded in an HTML form. So these values are actually coming from the form: $port, $wait_time, $host (which will return the local pc's ip) and $remote_host. One thing is: I've tried adding usleep(100000) in my while lo...
by ckli6
Sat Sep 30, 2006 1:16 am
Forum: PHP - Code
Topic: Socket Bind Error when running script from another PC
Replies: 9
Views: 1551

Socket Bind Error when running script from another PC

Hi, I have a form with 2 buttons, namely, Listen and Send, Send is for sending a Message to the remote host at the Port specified by the form, Listen is simply Creating a Socket, bind the port and listen for 3 seconds, if a message has been received, it will display the message on the HTML form. The...