Execute a URL through a shell script

Hi,

how can I create a shell script that will execute an http url.

for example I have the following url

http://servername/cgi-bin/dl-cmmgr-mstr.cgi?user=A1&script=LIST+ALL+PROPERTIES+FOR+PROJECT+CONFIGURATION+IN+PROJECT+%22Enterprise+Manager+v8.01%22 

now I need a shell script that will execute this URL , so when I call this shell script from command line or a cron job this url will be run

thanks
-anshu
anshumaEngineeringAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Have a look at curl
"man curl" or this - http://linux.die.net/man/1/curl
wmp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TintinCommented:
Just add

wget

or

curl

to the beginning of the URL.   You may want to add some options depending on what you want to do with the output.
0
KlaasdezwartCommented:
you can do this with php, and run that from cron

<?
$ch = curl_init();
$postData  = "user=A1&script=LIST+ALL+PROPERTIES+FOR+PROJECT+CONFIGURATION+IN+PROJECT+%22Enterprise+Manager+v8.01%22";
$urlcurl =  "http://servername/cgi-bin/dl-cmmgr-mstr.cgi";

curl_setopt($ch,  CURLOPT_URL, $urlcurl);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_exec($ch);
curl_close($ch);
?>
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.