AbydosGater Posted July 11, 2007 Share Posted July 11, 2007 Hey Guys, I have a question, and i couldnt think of a better place to ask. It doesnt really count as "Help" so i put it in here. PHP Sockets! I have started reading up on them and using them, And i think they are amazing. Just the whole idea behind it is great. So far i have worked on getting users to connect and spitting back stuff they enter right back at them and what not. I even did a small HTTP Server type thing that only works with HTML files and stuff. But what i want to know, What are other practical uses for PHP and sockets? What else could i go about and do with sockets. Have you heard about something thats been done with them, just know about it or have you worked on a sockets project before? I would be ever greatful if you could share what other uses for sockets that you know of, So i can expand my knowledge of sockes by attempting to do as much as possible with them. Thank you for your time in reading, Andy Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/ Share on other sites More sharing options...
trq Posted July 11, 2007 Share Posted July 11, 2007 Man... theres all sorts of stuff you can do. You could build chat clients and servers, p2p file sharing programs, write your own network proticol, whatever. Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-295433 Share on other sites More sharing options...
AbydosGater Posted July 13, 2007 Author Share Posted July 13, 2007 Hmm, I suppose. Hah if i get time somewhere somehow i might start the basis of a PHP_IRC Server. Not to release.. But just to help expand my knowledge. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-297512 Share on other sites More sharing options...
neylitalo Posted July 13, 2007 Share Posted July 13, 2007 The only place I've seen it used is in phpmailer, where it opens a connection to the SMTP server of your choice - you'd probably benefit more from applications similar to that. Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-297679 Share on other sites More sharing options...
AbydosGater Posted July 13, 2007 Author Share Posted July 13, 2007 Ohhh a mail application. That sounds interesting and a bit less time consuming but yet more practical! Thank you Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-297755 Share on other sites More sharing options...
Azu Posted July 16, 2007 Share Posted July 16, 2007 I wander if it would be possible to make a mail server using PHP itself, instead of just connecting to one that already exists? =O Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-299118 Share on other sites More sharing options...
AbydosGater Posted July 16, 2007 Author Share Posted July 16, 2007 Hmm. Im sure it might be.. With alot of thought and time.. oh maybe some effort involved aswell..But whens that not. Its an interesting thought. Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-299562 Share on other sites More sharing options...
trq Posted July 16, 2007 Share Posted July 16, 2007 I wander if it would be possible to make a mail server using PHP itself, instead of just connecting to one that already exists? You could build any type of server you wished provided you understand the proticol invloved and have the time to impliment it. Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-299576 Share on other sites More sharing options...
448191 Posted July 16, 2007 Share Posted July 16, 2007 Unfortunately you need root perms to use ports numbers under 1024. Of course you could configure clients to use non-standard port numbers. Anyhoe, if anyone's looking for a straightforward introduction into socket servers in PHP: http://devzone.zend.com/node/view/id/1086 Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-299602 Share on other sites More sharing options...
AbydosGater Posted July 16, 2007 Author Share Posted July 16, 2007 Yeah Thanks 448191.. I have already read this tutorial..and greatly benifited from it..although i got some errors in the code. Andy Quote Link to comment https://forums.phpfreaks.com/topic/59450-some-practicle-uses-for-php-and-sockets/#findComment-299628 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.