The UNIX and Linux Forums  


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
Difference between hard link and soft link kamakshi s UNIX for Dummies Questions & Answers 2 06-26-2008 09:05 AM
need some info about symbolic link and hard link detective linux UNIX for Dummies Questions & Answers 2 01-08-2008 07:36 AM
Difference between hard link and soft link in unix RAJACHOKALINGAM UNIX for Dummies Questions & Answers 2 08-01-2006 05:10 AM
Link to the Open Group (UNIX Standards) Neo UNIX IEEE Std 1003.1-2001 (POSIX.1) 0 08-18-2002 07:40 PM
Differences between hard link and soft link penguin-friend UNIX for Advanced & Expert Users 3 03-08-2002 03:49 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-19-2009
c0mrade c0mrade is offline
Registered User
  
 

Join Date: May 2008
Posts: 35
open a web link from

Hello,

I am looking a way on how to add in my sh script a line that once run would visit a web link www.domain.com/something.php?smt=SOMEDATA and close.


Thank you,
C
  #2 (permalink)  
Old 03-19-2009
pludi's Avatar
pludi pludi is online now Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,947
Do you want to get the result of that request or do you just want to call that site so that there's a log entry?
  #3 (permalink)  
Old 03-19-2009
c0mrade c0mrade is offline
Registered User
  
 

Join Date: May 2008
Posts: 35
Just to call the site.
  #4 (permalink)  
Old 03-19-2009
pludi's Avatar
pludi pludi is online now Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,947
One of those should work, depending on what tools you have available

Code:
$ lynx -source http://www.domain.com/something.php?smt=SOMEDATA >/dev/null 2>&1
$ links -source http://www.domain.com/something.php?smt=SOMEDATA >/dev/null 2>&1
$ w3m -dump_head http://www.domain.com/something.php?smt=SOMEDATA >/dev/null 2>&1
$ netcat www.domain.com 80 <<EOF >/dev/null 2>&1 # Sometimes installed as nc, the line prior to EOF is completely empty
HEAD /something.php?smt=SOMEDATA HTTP/1.1
Host: www.domain.com
Connection: close
Accept */*

EOF
$
The following only works in bash and some versions of ksh
$ exec 3>/dev/tcp/www.domain.com/80 && echo "HEAD /something.php?smt=SOMEDATA HTTP/1.1
Host: www.domain.com
Connection: close
Accept */*

" >&3

Closed Thread

Bookmarks

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 12:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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