Posts Tagged ‘php’
Using PHP & Curl to call WCF Web Service

Recently we had to call a WCF Web Service that takes XML via PHP. The simple way to do this is using CURL. (Note you have to have PHP-Curl installed) Here is the sample code.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$request = 'http://yourip/query';
$session = curl_init($request);
curl_setopt ($session, CURLOPT_POST, true);
curl_setopt ($session, CURLOPT_POSTFIELDS,
"<xml1>
<xml2>value</xml2
</xml1>"
);
curl_setopt($session, CURLOPT_HEADER, 'Content-type: text/xml');
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($session);
curl_close($session); |
PhpMyadmin #2002 Cannot Log In To MySQL Server

If you get a “#2002 Cannog Log In to MySQL Server” error from PhpMyAdmin Try changing the “localhost” to “127.0.0.1″ in config.inc.php in the root directory


