2
I'm writing a php application that uses CURL to scrape data off websites. But the time it takes to load a website with curl is very, very slow. A lot slower than the time it takes to load it in Chrome even though Chrome loads a lot of other things like spreadsheets and images while the php application does not.
Anyway, I read that curl might have problems with DNS lookup so accessing by IP could be a lot faster.
But I'm not sure how to do that.
Let's take Google for an example. I can open my commands prompt and do "ping www.google.com". It answers with:
Pinging www.google.com [74.125.232.114] with 32 bytes of data...
So I can use that IP address then, which works, but what if I'd like to access for instance: www.google.com/doodles
If I try entering that address when pinging it says it couldn't find the host, and doing http://74.125.232.114/doodles
does not work either.
(Error: Not Found The requested URL /doodles was not found on this server.)
So how do I access that by IP?