curl in linux help

Discussion in 'OT Technology' started by testerblarger, Jan 24, 2006.

  1. testerblarger

    testerblarger New Member

    Joined:
    Apr 14, 2005
    Messages:
    37
    Likes Received:
    0
    I'm experimenting with the CURL command. It seems to work with most other sites, but for some reason it doesn't work with Amazon.com

    example being:

    curl http://www.amazon.com/

    returns nothing.

    help appreciated
     
  2. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Code:
    [[email protected] ~]$ curl -v http://www.amazon.com
    * About to connect() to www.amazon.com port 80
    *   Trying 207.171.166.102... connected
    * Connected to www.amazon.com (207.171.166.102) port 80
    > GET / HTTP/1.1
    > User-Agent: curl/7.14.0 (i486-pc-linux-gnu) libcurl/7.14.0 OpenSSL/0.9.7g zlib/1.2.3 libidn/0.5.13
    > Host: www.amazon.com
    > Accept: */*
    > 
    < HTTP/1.1 301 Moved Permanently
    < Date: Tue, 24 Jan 2006 03:20:18 GMT
    < Server: Server
    < Set-Cookie: skin=; domain=.amazon.com; path=/; expires=Wed, 01-Aug-01 12:00:00 GMT
    < Location: http://www.amazon.com:80/exec/obidos/subst/home/home.html
    < Vary: Accept-Encoding,User-Agent
    < Content-Length: 0
    < Cneonction: close
    < Content-Type: text/plain
    * Connection #0 to host www.amazon.com left intact
    * Closing connection #0
    There's your answer.
     
  3. testerblarger

    testerblarger New Member

    Joined:
    Apr 14, 2005
    Messages:
    37
    Likes Received:
    0
    got it, have to set curl to accept redirects, since that is what amazon is doing
     

Share This Page