Jump to content

[SOLVED] Sockets


FIREBALL5

Recommended Posts

Hi, I am trying to create sockets, and I am getting "Permission denied". I know I have the right address and port no., but it's not even willing to bind the sockets.

 

 
$addr = "69.36.243.188";
//$addr = "www.freechess.org";
$port = 23;

$mysocket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
if ($mysocket === false) exit(socket_strerror(socket_last_error($mysocket))); // Gives me: Permission denied

 

Link to comment
https://forums.phpfreaks.com/topic/126110-solved-sockets/
Share on other sites

I did try port 5000.

 

ALERT: Apparently the host didn't allow socket connections, so this was why the permission was denied. As for my syntax, I'm not sure, but it was my host that was disallowing the sockets, not the code. I am going to mark this case as solved.

Link to comment
https://forums.phpfreaks.com/topic/126110-solved-sockets/#findComment-652599
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.