If you are sensible, you won't use the sockets directly, instead preferring someone else to write a HTTP implementation.
There have been countless posts from people who complain that their custom HTTP implementation is broken (which it typically is, because they don't understand HTTP properly).
Don't write your own HTTP implementation, use PHP's.
Mark