php基础
Miss787Elina
golang新生
展开
-
用Curl模拟post
用Curl模拟post function curlPost($url, $data) { // $uri = "http://www.henanxunmei.com/sites/api/?url=".$url; $uri = "http://www.xiaoabang.com/sites/api/?url=".$url; $ch = curl_init($uri...原创 2018-06-19 17:42:01 · 182 阅读 · 0 评论 -
查找附近网点geohash算法及实现
/** * Encode a hash from given lat and long */ public function encode($lat, $long) { //how many bits does latitude need? $plat = $this->precision($lat); $latbits = 1; $err = 45; whi...翻译 2018-06-27 09:47:08 · 487 阅读 · 0 评论 -
php 解决跨域问题
在方法前加入这几个header 即可header('Access-Control-Allow-Origin: *'); header("Access-Control-Allow-Headers: token,Origin, X-Requested-With, Content-Type, Accept"); header('Access-Control-Allow-Methods: POST,GET...原创 2018-06-27 12:59:05 · 3148 阅读 · 0 评论