| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-and-php mailing list Archives
Re: Fake-referer and remote file-exist check & size-check using libcurl?...
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 27 Feb 2003 16:08:24 +0100 (CET)
On Thu, 27 Feb 2003, Fernando Cassia wrote:
> 1) Can I use libcurl to replace the "file_size" function and query the
(Please note that I'm not a PHP-dude, I'm talking from a general libcurl
Yes, probably. If you use a HEAD request to the site with the JPEG, it'll
You make a HEAD request by using the CURLOPT_NOBODY option.
> 2) How can I check if the remote file I'm querying exists (is a jpeg) or
Sure. If you attempt to get it, you'll get a set of headers and a 404 code
> 3) Anyone cares to post a "fake-referer" http-get, first checking if the
Steps:
1. Set CURLOPT_REFERER to a suitable URL
Not that I understand why you need to get the size first. You'll figure out
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2003-02-27 These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info