URL call from SHELL script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting URL call from SHELL script
# 8  
Old 04-18-2007
a little crude
Code:
(sleep 4; echo "GET /path/to/html HTTP/1.1"; echo ""; sleep 5) | telnet webserver 80

# 9  
Old 04-18-2007
I encountered the following message while running the perl script:

Quote:
Can't locate IO/Socket/INET.pm in @INC (@INC contains: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at ./FS_ARCHIVEMSG.pl line 3.
Any idea what does it means?
# 10  
Old 04-18-2007
So if the URL call is:

Code:
http://abc-mmm.com/ctxroot/abc/servlet?task=xyz

Is this what I should be doing?

Code:
(sleep 4; echo "GET /ctxroot/abc/servlet?task=xyz HTTP/1.1"; echo ""; sleep 5) | telnet http://abc-mmm.com 80

# 11  
Old 04-18-2007
remove "http://" from the telnet portion. only abc-mmm.com. the rest should be ok.
Code:
(sleep 4; echo "GET /ctxroot/abc/servlet?task=xyz HTTP/1.1"; echo ""; sleep 5) | telnet abc-mmm.com 80

# 12  
Old 04-18-2007
I got this after trying:

Quote:
HTTP/1.1 400 Bad request
Server: ""
Date: Thu, 19 Apr 2007 02:49:59 GMT
Content-length: 147
Content-type: text/html
Connection: close

<HTML><HEAD><TITLE>Bad request</TITLE></HEAD>
<BODY><H1>Bad request</H1>
Your browser sent a query this server could not understand.
</BODY></HTML>Connection closed by foreign host.
What could be wrong?
# 13  
Old 04-19-2007
Think the error was due to the server down. It's ok now. Thanks!
# 14  
Old 04-19-2007
Quote:
Originally Posted by chengwei
I encountered the following message while running the perl script:

Any idea what does it means?
Your system does not have IO::Socket::INET installed. It is weird, because it is a standard module. So your system probably has an imcomplete, or very trimmed down installation of perl.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Parse the XML data along with the URL in Shell Script?

Hi, Can anybody help to solve this. I want to parse some xmldata along with the URL in the Shell. I'm calling the URL via the curl command Given below is my shell script file export... (7 Replies)
Discussion started by: Megala
7 Replies

2. Shell Programming and Scripting

fire an URL using shell script

Hi, Can anyone tell me how to fire an URL using a shell script? :wall: (8 Replies)
Discussion started by: arijitsaha
8 Replies

3. Shell Programming and Scripting

Shell script for cron url

Hi guys, I have a serious issue with running cron command. My host not supported format below mentioned, just the URL.) http://www.mysite/example.php ( I’m affraid a bit, the host do not going to support the sh as well…anyway) Somehow I need to „wrap” this command, to able to call cron: ... (1 Reply)
Discussion started by: vazzeg
1 Replies

4. Shell Programming and Scripting

How to find invalid URL in a text file using shell script?

How to find and remove invalid URLs in a text file using shell script? (1 Reply)
Discussion started by: vel4ever
1 Replies

5. Shell Programming and Scripting

Refresh a URL from shell script

I have a php page which i run in a browser, it has a the refresh meta tag which refreshes the page after every 15 mins. Now i am running this on a browser. It will refresh and do something and update the database every 15 mins. So now is there any way i can simulate this using a simple shell... (2 Replies)
Discussion started by: tonan
2 Replies

6. Shell Programming and Scripting

script to call url

how to call url using unix script (2 Replies)
Discussion started by: HemaV
2 Replies

7. Shell Programming and Scripting

call another shell script and pass parameters to that shell script

Hi, I basically have 2 shell scripts. One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system. Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn. ... (2 Replies)
Discussion started by: sunrexstar
2 Replies

8. Shell Programming and Scripting

Help with shell script for url processing

Hi, My objective is to make a shell script that, when run, you can input multiple links at once. text is then inserted between the http:// part and the following url. example : http://google.be ==> http://sometext.google.be it would be great if it could then open all the created links (wich... (5 Replies)
Discussion started by: tooster
5 Replies

9. Shell Programming and Scripting

Shell Script to hit a url

Hi all, I have a php file that grabs xml, parses it and updates my db accordingly. I want to automate the execution of this process, rather than having to hit the url manually. I have been looking into using cron to execute a script to do this, however i'm not exactly sure what command i would... (1 Reply)
Discussion started by: restivz77
1 Replies

10. UNIX for Advanced & Expert Users

url calling and parameter passing to url in script

Hi all, I need to write a unix script in which need to call a url. Then need to pass parameters to that url. please help. Regards, gander_ss (1 Reply)
Discussion started by: gander_ss
1 Replies
Login or Register to Ask a Question