You are here: Re: cURL question, how to return final URL where Im redirected? « PHP Programming Language « IT news, forums, messages
Re: cURL question, how to return final URL where Im redirected?

Posted by Mikhail Kovalev on 07/13/07 18:57

Thanks it nailed it


On 13 Jul, 14:21, Andy Hassall <a...@andyh.co.uk> wrote:
> On Fri, 13 Jul 2007 04:45:27 -0700, Mikhail Kovalev <mikhail_kova...@mail.ru>
> wrote:
>
> >I'm sending a html form with cURL to some file.php which does
> >something with the sent data and at the end redirects me to some other
> >URL, which is different every time, something like this:
>
> >$ch = curl_init();
> >curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
> >curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
> >...
> >$result = curl_exec($ch);
>
> >$result here is a string of the resulting page at the end
>
> >I need to return the final URL of where I have been redirected when
> >sending the request
>
> http://uk.php.net/manual/en/function.curl-getinfo.php
>
> CURLINFO_EFFECTIVE_URL ?
>
> Or you could set CURLOPT_HEADERFUNCTION and read the Location headers on the
> redirect(s).
>
> --
> Andy Hassall :: a...@andyh.co.uk ::http://www.andyh.co.ukhttp://www.andyhsoftware.co.uk/space:: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация