Hi
Is using fsock faster in terms of execution compared to using cURL ? cURL too should be using fsock but cURL also does a lot of other things in the settings which make it slow doesnt it ?
Thanks
Hi
Is using fsock faster in terms of execution compared to using cURL ? cURL too should be using fsock but cURL also does a lot of other things in the settings which make it slow doesnt it ?
Thanks
The difference is whether you want to do all those "other things" yourself, or let the application do it for you.
For POSTing data alone to a site, if we do it ourselves it seems faster because Im setting the "other things" but for cURL its necessary to set it or it'll set it on its own.
If I were to use fsock in PHP then I might as well use sockets in VC++ - there shouldnt be any difference in speed would there ?
I read on php.net today that Curl was much faster then sockets, and much more reliable.
When it comes to reading https sites atleast...
Performance is likely to be limited by the speed of the host you're connecting to.
I've found that using fopen($url, "r", $context) is not flexible enough for serious web client applications- and therefore wrote my own HTTP implementation with fsockopen instead.
Performance is likely very dependent on what you're doing though.
Remember that 90% of statistics are made up on the spot
Always favour correctness over performance.
Mark