Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Problems with copying a file from the Internet.


From   Guo Xu <digitalepourpre@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Problems with copying a file from the Internet.
Date   Mon, 12 Sep 2011 11:55:22 +0100

I assume the server throws a HTTP 302 redirection when it cannot
identify your request as made from a browser (using HTTP_USER_AGENT).
This is commonly done to avoid scripts scraping data automatically.

The ideal way to solve this would be to switch the HTTP_USER_AGENT
identifier to a standard browser (e.g. IE, Mozilla), but I'm not sure
how to do this.

Guo

On 12 September 2011 11:07, Ulrich Kohler <kohler@wzb.eu> wrote:
> hi all,
>
> A program of mine wants to copy this file
>
> http://www.iso.org/iso/list-en1-semic-3.txt
>
> from the internet using something like
>
> . copy http://www.iso.org/iso/list-en1-semic-3.txt foo.txt
>
> With Stata 12 I get the error
>
> --
> file http://www.iso.org/iso/list-en1-semic-3.txt not found
> server says file temporarily redirected to
> http://www.iso.org/iso/home.html
> r(601);
> --
>
> although the file is shown without problems in a browser.
>
> Does anybody has an explanation for this?
>
> Uli
>
>
>
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index