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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.