![Share on Facebook Facebook](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/facebook.png)
![Share on Twitter twitter](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/twitter.png)
![Share on Reddit reddit](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/reddit.png)
![Pin it with Pinterest pinterest](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/pinterest.png)
![Share on Linkedin linkedin](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/linkedin.png)
![Share by email mail](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/mail.png)
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: |
<?php $data = array ( 'type' => 'direct', 'userfile[]' => '@c:Apache Server Doc Folderpicture.jpg', 'private' => '0', ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "http://www.url.com/upload.php"); curl_setopt($curl, CURLOPT_VERBOSE, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); $result = curl_exec($curl); curl_close($curl); ?> |
And there is a reference for POST JSON here :
http://www.lornajane.net/posts/2011/posting-json-data-with-php-curl
![Share on Facebook Facebook](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/facebook.png)
![Share on Twitter twitter](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/twitter.png)
![Share on Reddit reddit](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/reddit.png)
![Pin it with Pinterest pinterest](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/pinterest.png)
![Share on Linkedin linkedin](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/linkedin.png)
![Share by email mail](https://blog.lifetimecode.com/wp-content/plugins/social-media-feather/synved-social/image/social/regular/96x96/mail.png)