daydreamer Posted October 16, 2008 Share Posted October 16, 2008 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? Quote Link to comment Share on other sites More sharing options...
DarkWater Posted October 16, 2008 Share Posted October 16, 2008 I'd use the domain name because just in case a site changes IPs, you wouldn't need to go around fixing everything. DNS isn't that slow. Quote Link to comment Share on other sites More sharing options...
daydreamer Posted October 16, 2008 Author Share Posted October 16, 2008 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? Quote Link to comment Share on other sites More sharing options...
DarkWater Posted October 16, 2008 Share Posted October 16, 2008 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. >_> Quote Link to comment Share on other sites More sharing options...
daydreamer Posted October 16, 2008 Author Share Posted October 16, 2008 just for that little bit extra performance. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted October 16, 2008 Share Posted October 16, 2008 just for that little bit extra performance. There's MUCH better places to focus your optimization goals on. I'd suggest making sure everything else is completely optimal before you worry about DNS. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.