Jump to content

cURL, using IP's Vs Domains. Fastest?


daydreamer

Recommended Posts

I am using cURL to visit/download pages on my server.

 

I was just thinking about the most effective and fastest way to write my code.

 

Wouldn't it be quicker to write:

 

curl_setopt($curl, CURLOPT_URL, 'http://66.102.9.99');

 

than:

curl_setopt($curl, CURLOPT_URL, 'http://www.google.co.uk');

 

because cURL wont have to go to a DNS and resolve google.co.uk to 66.102.9.99?

Link to comment
https://forums.phpfreaks.com/topic/128765-curl-using-ips-vs-domains-fastest/
Share on other sites

true, but it would still be faster even if by only milliseconds wouldn't it?

 

Dont major websites have static IP's though because its better for search engine optimization?

 

I mean, most sites have static IPs, but you never know.  What does the millisecond difference matter?  I don't even think you'd be able to measure the speed change accurately. >_>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.