cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-and-php mailing list Archives

Re: Object Moved problem on web host provider (works on local machine)

From: David Colter <dolan2go_at_yahoo.com>
Date: Thu, 24 Apr 2008 05:23:04 -0700 (PDT)

Ryan and others,

Have you figured out how to do those redirects without
FOLLOW_LOCATION being allowed?

In case you've not, try looking at the LiveHTTPHeader
info and 'recreating' those redirects with tailored
curl_setopt's and curl_exec for each 302, redirected
page. This has caused me to have up to 10 curl_exec's
to end up at the page I want. It takes awhile, typo's
preventing success are definately a factor, and I
usually manage cookies for myself. (I must be missing
something in the way that curl handles cookies) That
just means I return only the header (for pages along
the path) and parse for cookie info to reuse further
along in the script. This results in lots of
repetition and several hundred lines of code.

That's the only work-around I've found for running
curl/php with a hosting company that is using safe
mode.

Hope that helps.

David

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-04-24

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET