cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: CURLOPT_FOLLOWLOCATION not redirecting

From: Stephen Pynenburg <spynenburg_at_gmail.com>
Date: Mon, 2 Feb 2009 15:27:00 -0500

Should be pretty easy to look in the result using regular expressions (look
on PHP docs for preg).
Once you grab the link, you can follow it with a new curl connect.
-Stephen

On Mon, Feb 2, 2009 at 11:07 AM, John Miedema <mail_at_johnmiedema.ca> wrote:

> Thanks Daniel. I realize this is a curl forum, but is there another way
> to get contents of the HTML or javascript redirects? Perhaps using the
> PEAR HTTP_Client or file_get_contents? Much appreciated. John
>
>
> On Mon, 2009-02-02 at 16:51 +0100, Daniel Stenberg wrote:
> > On Mon, 2 Feb 2009, John Miedema wrote:
> >
> > > FILE: test1.htm - uses a meta REFRESH to redirect to test2.htm. Body
> > > contains some text: 'abc'. Redirects properly if opened in a browser.
> >
> > libcurl only follows pure HTTP redirects. It doesn't deal with HTML or
> > javascript or other kinds of redirects.
> >
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2009-02-02