api - Is curl of php package included in xampp and guide to use appannie -


i have downloaded latest xampp , first time use curl. have account in appannie , have read 1 of posts here regarding his/her attempt access appannie.

here link of post: appannie api basic authentication

well, make simpler here code made:

<?php  $whmusername = "username"; $whmpassword = "password";  $query = "https://api.appannie.com/v1/accounts";  $ch = curl_init(); // sets url curl open curl_setopt($ch, curlopt_url, $query); // here's http auth // 3rd argument twitter username , password joined colon curl_setopt($ch, curlopt_userpwd, $whmusername.":".$whmpassword); // makes curl_exec() return server response curl_setopt($ch, curlopt_returntransfer, true); // , here's result xml $response = curl_exec($ch); curl_close($ch);  // inserted: echo 'hello'; print $response; // inserted: echo 'world'; ?> 

i tried use nothing happened. inserted echo (which have labeled in comment) both before , after response see if php network working , displayed:

hello world 

so wondering if curl library in xampp , have read post: curl not working in xampp localhost

in comments steps found out curl in php.ini in php dir not in comment form , there no php.ini in apache dir.

and 1st post referred regarding appannie, have change username email account used in appannie.

please help? thanks

there 3 different php.ini files require modification curl library work on xampp.

  1. c:\program files\xampp\apache\bin\php.ini
  2. c:\program files\xampp\php\php.ini
  3. c:\program files\xampp\php\php4\php.ini

you need uncomment (if not already) line curl extension:

  ;extension=php_curl.dll   ^----- remove semi-colon 

once you've made change, you'll need restart xampp.

also, make sure there 2 files in windows system32 folder: libeay32.dll , ssleay32.dll. if these files missing, can copy them on php folder.

hope helps!


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -