LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-02-2007, 01:40 PM   #1
Murdock1979
Member
 
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429
Blog Entries: 2

Rep: Reputation: 30
automating http requests


Hello!

I have a few devices that are updated through a web GUI. I am wondering what the best approach is to this automatically (instead of needing to manually open up a web browser and edit the configurations).

Thank you!
Murdock
 
Old 12-02-2007, 01:51 PM   #2
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Does wget & cron suit your needs?
 
Old 12-02-2007, 02:06 PM   #3
Murdock1979
Member
 
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429

Original Poster
Blog Entries: 2

Rep: Reputation: 30
Thanks!

It seems I can only connect to the devices http requests through port 80. I could probably connect with telneting at 80, but how do I automate telneted http sessions?

thanks again!
Murdock
 
Old 12-02-2007, 07:48 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You could use Perl and the WWW::Mechanize module; it's what it's designed for.
 
Old 12-03-2007, 08:16 AM   #5
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Code:
awk 'BEGIN {
  RS = ORS = "\r\n\r\n"
  http = "/inet/tcp/0/www.yoursite.com/80"
  print "GET http://www.yoursite.com HTTP/1.0"     |& http
  while ((http |& getline) > 0)
     print $0
  close(http)
}
 
Old 12-03-2007, 09:14 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Nice awk script
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
redirect some http requests to port 443. FMH Linux - Software 5 09-17-2007 08:19 AM
forward all HTTP requests to the proxy cccc Linux - Networking 2 10-01-2006 06:42 PM
Can't get my http server to respond to requests... garydamm Linux - Networking 9 01-16-2005 10:00 AM
Help! (I'm getting flooded with http requests) rknoesel Mandriva 6 11-14-2004 05:57 PM
capture http requests at squid ssharma_02 Linux - Networking 1 09-26-2004 09:04 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration