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 ! Quote Link to comment Share on other sites More sharing options...
fert Posted February 2, 2007 Share Posted February 2, 2007 cURL Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Cagecrawler Posted February 2, 2007 Share Posted February 2, 2007 http://uk2.php.net/curl Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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 !! Quote Link to comment 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 Quote Link to comment 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 ! Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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! 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.