curl-and-php
follow redirect for wikipedia?
Date: Wed, 08 Sep 2010 16:54:33 -0400
I am having trouble using curl to follow a redirect from wikipedia using Curl and PHP.
http://en.wikipedia.org/wiki/Barack_Obama is an example address
or
http://en.wikipedia.org/wiki/George_W._Bush for another example.
It redirects to the same address in a 301 Permanently moved.
I have set the curl options to follow redirect and
maximum 10 redirections.
When I do this it ends up giving me back some binary code.
All I want to do is grab the source code from this page.
Any suggestions on options for dealing with a redirect like this?
I can post the code but it's on my other system.
Thanks for suggestions.
Dan
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2010-09-08