Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: what's the app to read the content of a website from an url?
1 point by fenghao120 on May 19, 2013 | hide | past | favorite | 4 comments
I don't remember the name.



Maybe you're looking for wget or curl.

wget: http://manpages.ubuntu.com/manpages/natty/man1/wget.1.html

curl: http://manpages.ubuntu.com/manpages/natty/man1/curl.1.html

I use wget when I want to download some of a url's files.

I use curl when I'm interested in how to interact with a site at the http level: requests, responses, response codes, etc.

This will create curl.1.html on my machine, containing the url's html:

  wget http://manpages.ubuntu.com/manpages/natty/man1/curl.1.html
  --2013-05-19 04:40:53--  http://manpages.ubuntu.com/manpages/natty/man1/curl.1.html
  Resolving manpages.ubuntu.com (manpages.ubuntu.com)... 91.189.95.36
  Connecting to manpages.ubuntu.com (manpages.ubuntu.com)|91.189.95.36|:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: unspecified [text/html]
  Saving to: ‘curl.1.html’
  
      [   <=>                                 ] 105,108      184KB/s   in 0.6s   
  
  2013-05-19 04:40:54 (184 KB/s) - ‘curl.1.html’ saved [105108]
And here's a curl example:

  curl -Iv http://manpages.ubuntu.com/manpages/natty/man1/curl.1.html
  * About to connect() to manpages.ubuntu.com port 80 (#0)
  *   Trying 91.189.95.36...
  * Connected to manpages.ubuntu.com (91.189.95.36) port 80 (#0)
  > HEAD /manpages/natty/man1/curl.1.html HTTP/1.1
  > User-Agent: curl/7.29.0
  > Host: manpages.ubuntu.com
  > Accept: */*
  > 
  < HTTP/1.1 200 OK
  HTTP/1.1 200 OK
  < Date: Sun, 19 May 2013 10:44:20 GMT
  Date: Sun, 19 May 2013 10:44:20 GMT
  < Server: Apache/2.2.22 (Ubuntu)
  Server: Apache/2.2.22 (Ubuntu)
  < Accept-Ranges: bytes
  Accept-Ranges: bytes
  < Vary: Accept-Encoding
  Vary: Accept-Encoding
  < Content-Type: text/html
  Content-Type: text/html
  
  < 
  * Connection #0 to host manpages.ubuntu.com left intact



Mozilla Firefox?


Web Browser




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: