|
Posted by Jerry Stuckle on August 2, 2008, 9:52 am
Please log in for more thread options Mikhail Kovalev wrote:
>> Mikhail Kovalev wrote:
>>> Suppose I have something like this
>>> $resource = curl_init();
>>> curl_setopt($resource, CURLOPT_FOLLOWLOCATION, TRUE);
>>> curl_setopt($resource, CURLOPT_RETURNTRANSFER, TRUE);
>>> curl_setopt($resource, CURLOPT_URL, '......');
>>> curl_exec($resource);
>>> $lastUrl = curl_getinfo($resource, CURLINFO_EFFECTIVE_URL);
>>> curl_close($resource);
>>> I'm only interested in the $lastUrl address. Is it possible without
>>> wasting bandwidth on downloading the actual trasfer which is at that
>>> address?
>>> Setting RETURNTRANSFER to FALSE outputs transfer directly
>> Not really, to get the URL, cURL must download the page, if for no
>> other reason than to ensure there isn't another redirect.
>
> A header is sufficient for this, or am I wrong?
> (Which is exactly what CURLOPT_NOBODY does, btw.)
Did you try it? If so, did it work?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|