michaellunsford Posted December 9, 2006 Share Posted December 9, 2006 To determine if the file has changed, I'm using PHP's curl to return only the headers from a URL. Some of these files can be megabytes in size. Will the server still send the entire file, even though I only want the header? Is there a better way to do this? Quote Link to comment Share on other sites More sharing options...
linuxdream Posted December 9, 2006 Share Posted December 9, 2006 It will if you do it right. Have you tried it yet? Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted December 9, 2006 Author Share Posted December 9, 2006 Hacked at it for about three hours. It took an eternity to figure out how to turn the linux "curl -I" command into the PHP equivalent.I eventually settled on an obscure and underdocumented setting called CURLOPT_CUSTOMREQUEST to generate my own head request -- which seems to be working. 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.