cyfer65 2 Posted January 21, 2012 Report Share Posted January 21, 2012 Is there any way using curl in php to send out a GET request for a file but not to download the file..?I know of the sending the HEAD request with the CURLOPT_NOBODY param...But I need to send the GET request without having to download the actual file back to my server.. Can this be done at all? are there any CURL Params to set to accomplish something this..? 1 Quote Link to post Share on other sites
birbal 168 Posted January 21, 2012 Report Share Posted January 21, 2012 can you tell wha is the purpose of it? which file you are accessing? php or any other? Quote Link to post Share on other sites
cyfer65 2 Posted January 21, 2012 Author Report Share Posted January 21, 2012 I want to test server mem/disk caching settings/properties..The file is mp3Is what im wanting to do even possible though..? Quote Link to post Share on other sites
cyfer65 2 Posted January 22, 2012 Author Report Share Posted January 22, 2012 is there anyway to terminate the connection or the curl execution right after the response headers are received..? Quote Link to post Share on other sites
justsomeguy 1,135 Posted January 23, 2012 Report Share Posted January 23, 2012 A GET request will download the file, that's specifically what you're telling it to do. A HEAD request will not download the file, but I'm not sure why you can't use that. Quote Link to post Share on other sites
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.