I need to call two or three known URLs really quickly. I am writing a command line app where speed is imperative!
Does curl open a socket itself?
Are there any benchmarks?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’d say you’re better off using cURL (yes, it opens its own sockets), because it knows HTTP better than cobbling a non-standard client together with fsockopen() and friends probably will.
And well – if you’re absolutely serious about needing blazing fast HTTP-loadin’ performance (define “really quickly”), you’ll have to use something other than PHP.
EDIT: Do the pages change often? If not, (mem)cache their contents locally and you shouldn’t have too much problems.