reneeshtk Posted April 6, 2007 Share Posted April 6, 2007 Hi all Please help me... I want to check a phone number exist or not. For checking this there is another site developed by some body else. In it two boxes for entering code and number and button for submitting. If the number exists site shows one message and if not another. My problem is that I also have the fields and submit button in my site, how can I post this values to the number checking site and retrieving values from that site. I want to show the retrived messages in my site.. please help Link to comment https://forums.phpfreaks.com/topic/45873-need-help-for-passing-values-to-one-site-and-retreving-that-sites-response-from/ Share on other sites More sharing options...
per1os Posted April 6, 2007 Share Posted April 6, 2007 <?php $response = file_get_contents('http://www.site.com/action.url?areacode='.$_POST['areacode'].'&number='.$_POST['number']); print $response; // should return the html ?> Now, if the data has to be posted, you need to look at the form on the page you are requesting and get all the fields and use CURL. www.php.net/curl to send the data as being posted. This will return html, so you will have to parse the page. Good luck! Link to comment https://forums.phpfreaks.com/topic/45873-need-help-for-passing-values-to-one-site-and-retreving-that-sites-response-from/#findComment-222967 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.