Unstoppable Domains โ€” Expired Auctions

[Resolved] Fsockopen and curl, which is better when used to fetch contents from web?

SpaceshipSpaceship
Watch

recoil

Established Member
Impact
0
fsockopen and curl,which is more beter when used to fetch contents from web?

Which method cost less time and fater?
Thanks.

addition - I just found something about the two methods
from http://curl.haxx.se/libcurl/php/
Performance Comparison*

10 per minute for fopen/fread for 100 HTTP files
2000 per minute for PHP/CURL for 2000 HTTP files

Could anyone explain the words please,for my very poor english?
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
your best bet would be to run a loop trying each method x amount of times and use mktime to work out how long it takes.

I would hazard a guess that fsockopen would be quickest however as it is a fully integrated php function where as cURL is an external extension.

The addition in your post seems to contradict what I have already said however as they are claiming that cURL can open 20 times more pages a minute. It is also claiming that it can handle 200 times more scripts running consecutively.
 
Last edited:
0
•••
Sites with safe mode installations will disable fsockopen, so cURL can sometimes even be more portable. Oops, I meant fopen. Ignore.
 
0
•••
Best is cURL as its fastest (doesn't use as much resources).
You'll see a lot of proxy sites for example get their servers overloaded with proxy scripts using fsockopen.

cURL is faster and newer technology, so use it.
 
0
•••
cURL.

However, in most cases you do not need either fsockopen OR cURL - file_get_contents will do just fine (if allow_url_fopen is enabled)
 
0
•••
Appraise.net
Spaceship
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back