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

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?

Just to call the site.

One of those should work, depending on what tools you have available

$ 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