Hey guys, someone suggested me to have a look at libcURL. I did, but its very complex.
All I needed is lowlevel/network wrappers. like emalloc() & pemalloc() as wrapper on malloc(). There might be some wrappers (platform independent & used in php source code) which I can use to make a connection and then send HTTP requests. I hope this will be the simplest method.