Sponsored Content
Operating Systems AIX how to browse a web site using script Post 302140638 by kirantalla on Monday 15th of October 2007 03:56:25 AM
Old 10-15-2007
thank you guys,

but the issue is i am workin on aix machine and i dont have wget tools installed. and installin wget is not an option. i am pasting my script here .. plz have a look at it ..

Code:
WEBSERVER=aix85
WEBPORT=9088
URLDIR=/DmMethods/servlet/DoMethod
TOFILE=result.txt
echo "before telnet"
telnet $WEBSERVER $WEBPORT |&   # Open pipe to web server
echo "After telnet"
IFS=~
read -p HEAD1 2>/dev/null                    # Ignore telnet headers
read -p HEAD1 2>/dev/null
read -p HEAD1 2>/dev/null
print -p "GET $URLDIR HTTP /1.1" 2>/dev/null    # Send HTTP request to server
print -p "" 2>/dev/null
read -p LINE 2>/dev/null
echo ${LINE}
if [ "${LINE}" != "HTTP/1.0 200 OK" -a "${LINE}" != "HTTP/1.1 200 OK" ]; then
  echo "ERROR: Invalid response from Web Server: ${LINE}"
  exit 8
fi
while [ "${LINE}" != "" ]                    # Skip HTTP Headers
do
  read -p LINE 2>/dev/null
done
while read -p LINE 2>/dev/null               # Process web page contents
do
  echo "${LINE}" >> result1.txt
done

 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Web site setup

Hi, I have a m/c loaded with redhat linux, static IP address and this m/c intern connected to the internet thro leaseline. Now i need to setup a company website has www.abc.xyz.com. What necessary configuration i need to do so that others can view our website. Thanks Bache Gowda (5 Replies)
Discussion started by: bache_gowda
5 Replies

2. UNIX for Dummies Questions & Answers

Web site mirroring

I have a unix server running RedHat Linux 9.0. I want to mirror my site on a different server with the same configuration so if the main server goes down, the other server will take over. How is this best accomplished? (1 Reply)
Discussion started by: wvmlt
1 Replies

3. UNIX for Dummies Questions & Answers

Web Site Creation - testing .*pl etc....

Hiya All, How can I test my PERL Scripts whilst making my web site? I'm hoping there is some software out there that emulates a Web Server - without all the hassle of my building/setting up a Web Server from Stratch (Never done anything like that before - my next big project! 8) ) ... (7 Replies)
Discussion started by: marty 600
7 Replies

4. AIX

intranet web site

hello I would like to create an internal web site, but how do i make it with Aix ? I must to install apache and send my http pages in the declared repertory ? There are some configuration files to modify ?? thank you (2 Replies)
Discussion started by: pascalbout
2 Replies

5. Shell Programming and Scripting

I need help in creating my first web site?

I have always wanted to create my own site, I've only had one class about the basics in creating web pages but know i would like to get into more and more detailed info about doing so anyone with alot of experience please help me out.:b: (0 Replies)
Discussion started by: kprescod4158
0 Replies

6. UNIX for Dummies Questions & Answers

Browse Web pages through command line

Is there any way to browse web pages while on the command line? I know wget can download pages, but I was wondering if there was an option other than that. (2 Replies)
Discussion started by: vroomlicious
2 Replies

7. Web Development

Web Site Performance Issue

Hi All, I am currently managing a web site. I find that during the peak time period,ie,between 1300hrs to 2100hrs everyday,the response slows down whenever i access the applications hosted by the server.However when i try to access the static content in the web server,it loads quickly. The... (2 Replies)
Discussion started by: Hari_Ganesh
2 Replies

8. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies
CURLOPT_HTTP200ALIASES(3)				     curl_easy_setopt options					 CURLOPT_HTTP200ALIASES(3)

NAME
CURLOPT_HTTP200ALIASES - specify alternative matches for HTTP 200 OK SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP200ALIASES, struct curl_slist *aliases); DESCRIPTION
Pass a pointer to a linked list of aliases to be treated as valid HTTP 200 responses. Some servers respond with a custom header response line. For example, SHOUTcast servers respond with "ICY 200 OK". Also some very old Icecast 1.3.x servers will respond like that for cer- tain user agent headers or in absence of such. By including this string in your list of aliases, the response will be treated as a valid HTTP header line such as "HTTP/1.0 200 OK". The linked list should be a fully valid list of struct curl_slist structs, and be properly filled in. Use curl_slist_append(3) to create the list and curl_slist_free_all(3) to clean up an entire list. The alias itself is not parsed for any version strings. The protocol is assumed to match HTTP 1.0 when an alias match. DEFAULT
NULL PROTOCOLS
HTTP EXAMPLE
TODO AVAILABILITY
Added in 7.10.3 RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_HTTP_VERSION(3), libcurl 7.54.0 February 03, 2016 CURLOPT_HTTP200ALIASES(3)
All times are GMT -4. The time now is 03:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy