Recently encountered some good blog, inspired, coupled with the recent project, use to share it; Please crossing, find out what is not in time to me: Thank you ~
Reprint please indicate good source: Http://blog.csdn.net/happylaoxu----->http://blog.csdn.net/happylaoxu
Phase three, I'll build you a wheel. Start:
On
<?phpfunction send_post ($url, $post _data) { $postdata = http_build_query ($post _data); $options = Array (' http ' = = Array (' method ' = ' + ' POST ', ' header ' = ' + ' content-type:application/ X-www-form-urlencoded ', ' content ' = $postdata, ' timeout ' = 15 * 60//Time-out (in s) ) ); $context = Stream_context_create ($options); $result = File_get_contents ($url, False, $context); return $result; } Method of Use $post _data = Array (' Doctorid ' = ' one ' , ' introduction ' = ' I'm strong ', ' location ' = ' = ' University ', ' GPS ' = ' 123.3,233.2 ', ' city ' = ' cities ' ; $receive = Send_post (' http://Your domain---./mental/doctor/doctorinformationedit.php ', $post _data); Echo $receive;? >
------This is the PHP version of the POST request is not very convenient.
----There are more versions. You can look it up online and use it in much the same way.
By: small red flag
Happylaoxu
I'm going to build you a wheel--phase III--php POST request with iOS background development