manuelgod Posted February 2, 2007 Share Posted February 2, 2007 Hi, does anyone know here an easy way to have a script make a "call home" to verify data on another server? I was thinking of using like a POST but the user needs to activate it, so I understand there is another way using fsockopen but don't understand it much. Anyone has a simlar idea? Source code examples would be appreciate it ! Thanks in advance guys ! Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/ Share on other sites More sharing options...
fert Posted February 2, 2007 Share Posted February 2, 2007 cURL Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175178 Share on other sites More sharing options...
manuelgod Posted February 2, 2007 Author Share Posted February 2, 2007 Could you enlight me in this topic (cURL) ( How to use it, etc.... examples ) Thanks for the quick reply Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175181 Share on other sites More sharing options...
Cagecrawler Posted February 2, 2007 Share Posted February 2, 2007 http://uk2.php.net/curl Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175182 Share on other sites More sharing options...
fert Posted February 2, 2007 Share Posted February 2, 2007 POST example $post=array("foo"=>"bar","bar"=>"foo"); $cur=curl_init("http://www.site.com/page.php"); curl_setop($cur,CURLOPT_POST,true); curl_setopt($cur,CURLOPT_POSTFIELDS,$post); $value=curl_exec($cur); curl_close($cur); I believe that will work Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175184 Share on other sites More sharing options...
manuelgod Posted February 2, 2007 Author Share Posted February 2, 2007 Thanks !!!! I am going to try it Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175195 Share on other sites More sharing options...
manuelgod Posted February 2, 2007 Author Share Posted February 2, 2007 I am getting an error that seems that these commands require a library Any other way of doing this without any need for external lib's ??? Thanks !! Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175197 Share on other sites More sharing options...
fert Posted February 2, 2007 Share Posted February 2, 2007 The only other way would be with Ajax Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175199 Share on other sites More sharing options...
manuelgod Posted February 2, 2007 Author Share Posted February 2, 2007 Darn, another language I need to learn Ohh Well... Thanks ! Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175211 Share on other sites More sharing options...
Sir William Posted February 2, 2007 Share Posted February 2, 2007 You could do fsockopen as well. http://www.php.net/manual/en/function.fsockopen.php It's what people used before cURL. Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175233 Share on other sites More sharing options...
manuelgod Posted February 2, 2007 Author Share Posted February 2, 2007 Thanks! I was thinking of that too but I am trying to see how it would work by placing a POST and getting a variable from it too Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175814 Share on other sites More sharing options...
utexas_pjm Posted February 3, 2007 Share Posted February 3, 2007 You might want to have a look at using a web service architecture like SOAP. PHP5 http://www.php.net/soap PHP4 http://dietrich.ganx4.com/nusoap/ Best, Patrick Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175839 Share on other sites More sharing options...
Attilitus Posted February 3, 2007 Share Posted February 3, 2007 Is is possible to use cURL to merely access a url and "get the contents" of it to check against an internal local-script variable? Would this be faster than file_get_contents? Thanks! Link to comment https://forums.phpfreaks.com/topic/36732-calling-home/#findComment-175844 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.