Results 1 to 5 of 5
Hi guys,
im new to linux and i want to be able hit a URL in a browser from my linux box. The purpose of hiting the url is to ...
- 08-13-2008 #1Just Joined!
- Join Date
- Aug 2008
- Posts
- 6
hiting url from linux machine
Hi guys,
im new to linux and i want to be able hit a URL in a browser from my linux box. The purpose of hiting the url is to synchronize some data i have between databases.
I have looked at a couple of options like wget and CURL but when i try these out with some random URL i just get a message -- connecting.. and i dont know id my linux box has hit the url or not.
I dont need to display the page i just want to be sure that the request makes it to the browser so my synch method is kicked off.
Any suggestions? Maybe i need to do something more intensive like creating a perl script or something to do this? cheers!
- 08-13-2008 #2
What is a "hit"? A HTTP GET request?
If so, create a file
Pipe that file to netcat:Code:GET / HTTP1.1 Host: dontmind
cat requestfile | nc thehost 80
This should "hit" this host.
- 08-14-2008 #3Just Joined!
- Join Date
- Aug 2008
- Posts
- 6
cool thanks, ya its a Get request i want to send, sorry for not being abit more specific.
- 08-14-2008 #4Just Joined!
- Join Date
- Aug 2008
- Posts
- 6
ok so just to be 100% sure , what should i be using after the nc command for the "thehost" string?
- 08-14-2008 #5
The host's IP address of course, or a hostname that can be resolved to such an IP.

Say you wanted to obtain the page
Then you would putCode:http://www.gnu.org/philosophy/free-sw.html
cat requestfile | nc gnu.org 80Code:GET philosophy/free-sw.html HTTP1.1 Host: www.gnu.org
This is essentially the same your browser sends to the side if you visit it.


Reply With Quote