I was writing a program that will retrieve information about a particular IP or domain name from WHOIS servers establishing socket connection using php. I used fsockopen() function to establish the socket connection which actually creates a file. It's working perfectly. But this program was written for a particular purpose and had to make 15-20 connections at a time, which results in overhead of the server and also degrades the performance. Is there any alternative solution which can enhance the performance and moreover will not require the file storage as it is not necessary other than just a开发者_如何学Cccessing the data once? If anyone has some idea please share.
maybe asynchronous curl (eg rolling curl) is much better so you can handle many connections parallel or any ajax solution
Rolling curl is good or use the curl_multi_* funnctions: http://www.php.net/manual/en/function.curl-multi-exec.php
精彩评论