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 Link to comment https://forums.phpfreaks.com/topic/77155-solved-send-a-http-request/ 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. Link to comment https://forums.phpfreaks.com/topic/77155-solved-send-a-http-request/#findComment-390641 Share on other sites More sharing options...
daveh33 Posted November 13, 2007 Author Share Posted November 13, 2007 Many thanks that works great Link to comment https://forums.phpfreaks.com/topic/77155-solved-send-a-http-request/#findComment-390654 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.