Kaido Karner wrote:
Generaly speaking, I don't think you should use socket programming in
PHP for HTTP connections - PHP has a good HTTP infrastructure using the
fopen() and file() function calls. these calls will allow you to easily
    

that's not so easy. afaik php fopen() accepts only 200 as a valid response
code, reporting error
even on 202 ...

kaido


  
I did not have a problem with that as I use file() and not fopen() (much easier - you don't have to deal with reading and writing to file descriptors). if you have a problem with the internal HTTP wrappers' behaviour, you can easly use the cURL extension which allows you to do anything you want, and is relativly easy to use (compared to socket programming). there is no reason to use sockets when other people have already implemented that functionality, solved all the bugs and provide you with a clean and useful interface.

-- 
Oded Arbel
m-Wise mobile solutions

Reply via email to