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 ..
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