I'm going to build you a wheel--phase III--php POST request with iOS background development

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.