daveh33 Posted November 13, 2007 Share Posted November 13, 2007 For my script to function correctly I have to validate a variable - I need to send a http request I have the url I need to send the request to e.g http://domain.com/validate.asp?t=****&u=***** Now I have the variables $t & $u - I need to send this as a http request and log the response I get back, it will be either: - <response success="false"> </response> or <response success="true"> </response> I have never used a http request before - an example would be very useful Quote Link to comment Share on other sites More sharing options...
Orio Posted November 13, 2007 Share Posted November 13, 2007 You can use: <?php $file = file_get_contents("http://domain.com/validate.asp?t=****&u=*****"); if(strpos($file, "true")) echo "True found"; else echo "False"; ?> You need allow_url_fopen enabled. Orio. Quote Link to comment Share on other sites More sharing options...
daveh33 Posted November 13, 2007 Author Share Posted November 13, 2007 Many thanks that works great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.