Link to home
Start Free TrialLog in
Avatar of xcab
xcab

asked on

Using a URL to return a value

Imagine we have a URL as follows:

www.them.com/cgi-bin/validate.pl?name=alfred

The above URL returns a plain text file, containing the string "true" or "false" based on some internal calculation.

Question: How can I invoke the above URL from within my script to retrieve the return value? (If required, assume my script is at www.me.com/cgi-bin/application.pl)

Ideally, I could write:

$returnValue = www.them.com/cgi-bin/validate.pl?name=alfred

... but of course that's not possible.
ASKER CERTIFIED SOLUTION
Avatar of kandura
kandura

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xcab
xcab

ASKER

Thanks for your assistance, kandura.

I wouldn't have found that on my own.