954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

why need socket connection??

hi i am not clear with the socket connection in php,
because before starting a new topic i want to clear with the experts(you all guys),
why we use socket connection??

jogesh_p
Junior Poster in Training
68 posts since Sep 2010
Reputation Points: 16
Solved Threads: 6
 

There is the php library for sockets which is used to give the user the ability to communicate over the socket protocol just like how the curl library gives users the ability to communicate over the curl protocol. It is widely used as an alternative to curl because it works more efficiently due to not being so dependent of apache there by lowering cpu and memory consumption. But when using sockets they can be hard to handle and the protocol can be hard to setup so that's why I prefer curl.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

as far as my knowledge is concern you have to communicate with the assigned port number from 0 to 65535.
ftp 21
http 80 etc...etc...

phpbeginners
Posting Whiz in Training
226 posts since Jul 2009
Reputation Points: 12
Solved Threads: 32
 
There is the php library for sockets which is used to give the user the ability to communicate over the socket protocol just like how the curl library gives users the ability to communicate over the curl protocol. It is widely used as an alternative to curl because it works more efficiently due to not being so dependent of apache there by lowering cpu and memory consumption. But when using sockets they can be hard to handle and the protocol can be hard to setup so that's why I prefer curl.

Thanks a lot to clarify the socket connection and its alternative..

jogesh_p
Junior Poster in Training
68 posts since Sep 2010
Reputation Points: 16
Solved Threads: 6
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: