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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I wouldn't have found that on my own.