摘要:
PHP curl模拟ip和来源进行访问<pre> public function moniurlqingqiu() { $ch = curl_init(); $curlurl = "http://wx.newmiracle.cn/home/moban/getips"; $referurl = "ht 阅读全文
posted @ 2019-11-15 10:29
newmiracle宇宙
阅读(1208)
评论(0)
推荐(0)
摘要:
php str_getcsv解决explode不能解决的问题 <pre><?php$str = "中国,广东省,广州市,天河区,'113.329884,23.154799',1,'2016-01-01 12:00:00','1,2,3,4,5,6'";$arr = str_getcsv($str, 阅读全文
posted @ 2019-11-15 10:28
newmiracle宇宙
阅读(200)
评论(0)
推荐(0)
摘要:
php生成0~1随机小数方法JavaScript生成0~1随机小数的方法可以调用自带的Math.random(); php生成0~1随机小数方法如下:<pre><?php/** * 生成0~1随机小数 * @param Int $min * @param Int $max * @return Flo 阅读全文
posted @ 2019-11-15 10:28
newmiracle宇宙
阅读(1184)
评论(0)
推荐(0)
摘要:
PHP使用glob方法遍历文件夹下所有文件 遍历文件夹下所有文件,一般可以使用opendir 与 readdir 方法来遍历。<pre><?php$path = dirname(__FILE__);$result = traversing($path);print_r($result); funct 阅读全文
posted @ 2019-11-15 10:28
newmiracle宇宙
阅读(503)
评论(0)
推荐(0)
摘要:
php实现文件与16进制相互转换 <pre><?php/** * php 文件与16进制相互转换 * Date: 2017-01-14 * Author: fdipzone * Ver: 1.0 * * Func * fileToHex 文件转16进制 * hexToFile 16进制转为文件 */ 阅读全文
posted @ 2019-11-15 10:27
newmiracle宇宙
阅读(612)
评论(0)
推荐(0)
摘要:
PHP比较两个版本的方法 写app接口经常要用到 PHP接口的版本和app里面的版本做比较 如果app版本低于接口版本 那么就要提示他升级 <pre><?php/** * 版本处理类,提供版本与数字互相转换,方便入库后进行比较筛选 * Date: 2015-06-30 * Author: fdipz 阅读全文
posted @ 2019-11-15 10:26
newmiracle宇宙
阅读(466)
评论(0)
推荐(0)
摘要:
htm5手机端实现拖动图片 <pre> <!doctype html><html><head> <title>Mobile Cookbook</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-widt 阅读全文
posted @ 2019-11-15 10:25
newmiracle宇宙
阅读(425)
评论(0)
推荐(0)
摘要:
javascript判断碰撞检测 点与矩形的碰撞检测 <pre> /** * * @param x1 点 * @param y1 点 * @param x2 矩形view x * @param y2 矩形view y * @param w 矩形view 宽 * @param h 矩形view 高 * 阅读全文
posted @ 2019-11-15 10:25
newmiracle宇宙
阅读(365)
评论(0)
推荐(0)
摘要:
PHP判断是不是爬虫的方法这个一般用于防止爬虫 和 seo优化(因为爬虫都是按照第一次打开显示的页面 有些ajax 等需要点击才能显示的就爬不到啦)<pre><?php// 判断是否搜索引擎机器人访问function isRobot() { $agent= strtolower(isset($_SE 阅读全文
posted @ 2019-11-15 10:24
newmiracle宇宙
阅读(884)
评论(0)
推荐(0)
摘要:
PHP解析xml的方法<pre><?php /** XML 文件分析类 * Date: 2013-02-01 * Author: fdipzone * Ver: 1.0 * * func: * loadXmlFile($xmlfile) 读入xml文件输出Array * loadXmlString( 阅读全文
posted @ 2019-11-15 10:24
newmiracle宇宙
阅读(740)
评论(0)
推荐(0)

浙公网安备 33010602011771号