话不多说,请看代码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php /** * 发送get请求 * @param string $url * @return bool|mixed */ function request_get( $url = '' ) { if ( empty ( $url )) { return false; } $ch = curl_init(); curl_setopt( $ch , CURLOPT_URL, $url ); curl_setopt( $ch , CURLOPT_RETURNTRANSFER, 1); $data = curl_exec( $ch ); curl_close( $ch ); return $data ; } $url = "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token=VzR_4bVUteovWOBzxdfgEAQ-qB5bQoMD0ucdU8dYf0snkfP8uqhQVLW4Kj2M-AXYdyQSS7FyzLb8XTwHKRJ1ORHbkwx_t1SkWxiupNRiJuzpbXpxfngF-zMccX4FGb39CBDdACAGFH" ; $data2 =request_get( $url ); ?> |
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持服务器之家!
原文链接:http://www.cnblogs.com/xtmp/p/6419454.html