follow redirect for wikipedia?

[email protected]
Newsgroups gmane.comp.web.curl.php
Message-ID <[email protected]>
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.