Created
December 29, 2014 21:24
-
-
Save marwenblel/005972b33bfeaa708fb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello iam trying to excecute this php file with curl. | |
its start charging my browser and no response !!! | |
whats i miss here? | |
<?php | |
$url = 'http://apps.dev/flickr_app/index.php'; | |
$data = <<<XML | |
<books> | |
<book> | |
<name>Book3</name> | |
<author>Auth3</author> | |
<isbn>ISBN0003</isbn> | |
</book> | |
<book> | |
<name>Book4</name> | |
<author>Auth4</author> | |
<isbn>ISBN0004</isbn> | |
</book> | |
</books> | |
XML; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_POST, true); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |
$response = curl_exec($ch); | |
curl_close($ch); | |
echo $response; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment