The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Checking for availability of remote server dylanmilks Shell Programming and Scripting 4 03-01-2007 12:08 PM
Checking for availability of remote server dylanmilks IP Networking 1 02-22-2007 07:48 PM
man pages of any command from a c program in unix spanduu High Level Programming 2 07-04-2006 01:58 PM
Unix Manual (man-page) pages in HTML killerserv News, Links, Events and Announcements 1 06-26-2002 12:05 AM
Dynamic web pages for Unix Web Server me2unix UNIX for Dummies Questions & Answers 5 12-05-2000 06:08 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-28-2007
srivsn srivsn is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 32
Checking availability of Web pages through Unix script

Hi Guru's,

I need to check the availability of a web page for every one hour through a script. Following is the requirement.

1. Go to http://vsn.srivsn.com
2. If any error encountered in openeing the home page, it should trigger an email with the appropriate error message.
3. If page opens with out any problem, Login with username vsn nd pwd vsn.
3. If any error encountered in opening particular user account, it should trigger an email with the appropriate error message.
4. After successful login, it has to navigate to a link and that link has to be opened in the same page.
5. If an error comes in opening the page associated with that link, it should trigger an email with the appropriate error message.
6. If everything is successful, an email should be triggered indicating that the site is available.


I need the scheduling options for this to run the script for every one hour. Am new to this and hardly worked on one or two scripts a year back.

Need help.

Thanks in advance,
srivsn.
  #2 (permalink)  
Old 05-28-2007
praveenkumar_l's Avatar
praveenkumar_l praveenkumar_l is offline
Registered User
  
 

Join Date: May 2007
Posts: 36
To run the script every one hour, put an entry in cron

0 * * * * <script>
  #3 (permalink)  
Old 05-28-2007
Guillermo Lopez Guillermo Lopez is offline
Registered User
  
 

Join Date: May 2007
Posts: 6
One tool that will be useful is wget. This is command line tool that is delivered with almost all Linux distributions and you can also get versions for other systems or you can just try to compile it yourself. Just type wget on your command window and see if the system finds it. Otherwise you should have to install it if you think that will be useful and have to rights to do it.

This is one of the several links where you can find more information:
http://www.die.net/doc/linux/man/man1/wget.1.html

Best regards,
Guillermo

Quote:
Originally Posted by srivsn
Hi Guru's,

I need to check the availability of a web page for every one hour through a script. Following is the requirement.

1. Go to http://vsn.srivsn.com
2. If any error encountered in openeing the home page, it should trigger an email with the appropriate error message.
3. If page opens with out any problem, Login with username vsn nd pwd vsn.
3. If any error encountered in opening particular user account, it should trigger an email with the appropriate error message.
4. After successful login, it has to navigate to a link and that link has to be opened in the same page.
5. If an error comes in opening the page associated with that link, it should trigger an email with the appropriate error message.
6. If everything is successful, an email should be triggered indicating that the site is available.


I need the scheduling options for this to run the script for every one hour. Am new to this and hardly worked on one or two scripts a year back.

Need help.

Thanks in advance,
srivsn.
  #4 (permalink)  
Old 05-30-2007
p.yamunarani p.yamunarani is offline
Registered User
  
 

Join Date: May 2007
Posts: 2
passing username and passwd to http page from unix

hi all,

can any one tell me how to pass username and password to an HTML page from UNIX?
I tried with wget. But, there are no options to pass authentication information to webpage.
plz, can any one suggest me how can I do it?

Thanks in advance.................!
Rani
  #5 (permalink)  
Old 05-30-2007
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,116
Quote:
Originally Posted by p.yamunarani
hi all,

can any one tell me how to pass username and password to an HTML page from UNIX?
I tried with wget. But, there are no options to pass authentication information to webpage.
plz, can any one suggest me how can I do it?

Thanks in advance.................!
Rani
try:
Code:
http://user:pass@hostname.com/blah/blah
  #6 (permalink)  
Old 05-30-2007
p.yamunarani p.yamunarani is offline
Registered User
  
 

Join Date: May 2007
Posts: 2
my username is an E-mail id. At that time how can pass the auth info to webpage from script?
  #7 (permalink)  
Old 05-30-2007
Guillermo Lopez Guillermo Lopez is offline
Registered User
  
 

Join Date: May 2007
Posts: 6
I'm just thinking... I don't know if it would work but you may try to type the URL with the login parameters on it. You should look at the source code of the page to see the names of the fields and the URL where the form submits the data. Just an idea...
Sponsored Links
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0