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

curl-and-php

Re: CURLOPT_FOLLOWLOCATION not redirecting

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 13 Feb 2009 10:11:47 +0100 (CET)

On Thu, 12 Feb 2009, John Miedema wrote:

> 1. It seems that cURL and other HTTP tools (like file_get_contents) perform
> very well for what they are, HTTP request tools. They can handle HTTP header
> redirects because that is part of the HTTP request.
>
> 2. These tools cannot handle JavaScript redirects because they are initiated
> *outside* the HTTP request. A browser (FF, IE, whatever) has a javascript
> interpreter that can detect the various forms of a location redirect,
> construct the URL (if built dynamically in javascript), then issue another
> HTTP request.

This is correct. Although there's also HTML meta tags that can do "redirects"
without javascript while still not being HTTP.

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