JS 判断iPad, Android, iPhone, iPod, MI PAD实现页面跳转

JS 判断iPad, Android, iPhone, iPod, MI PAD实现页面跳转

<script type="text/javascript" src="//11.mydrivers.com/2018/news/jquery-1.7.2.min.js"></script> <script> function MTiaoZhuan() { var ua = window.navigator.userAgent; var s_ref; try { s_ref = escape(d...

前端 2021-06-05 AM 2014℃ 0条
go短信接口代码

go短信接口代码

package main import ( "net/http" "io/ioutil" "net/url" "fmt" ) func main(){ //账号 account := "***************" //密码 pswd := "***************" // 修改为您要发送的手机号码,多个号码用逗号隔开 mobile := &qu...

Goland 2021-06-04 PM 2569℃ 0条
PHP短信接口代码

PHP短信接口代码

<?php class SendCode{ private $url = 'http://139.196.108.241:8080'; private function post_curls($url, $post) { $curl = curl_init(); // 启动一个CURL会话 curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检...

PHP 2021-06-04 PM 2110℃ 0条
php curl抓取gb2312网页时显示乱码

php curl抓取gb2312网页时显示乱码

if(! mb_check_encoding($rs, 'utf-8')) { $rs = mb_convert_encoding($rs,'UTF-8','GB2312'); }

PHP 2021-05-28 PM 2581℃ 0条
PHP图片文字合成居中

PHP图片文字合成居中

<?php function imageAddText($path, $content, $x = 'auto', $y = 'auto', $fontSize = 38, $font = './t.ttf'){ $temp = array(1=>'gif', 2=>'jpeg', 3=>'png'); // 获取图片信息 $imageInfo = getimagesize($path); $imageType = $temp[$imageInfo[2]]; $getfunc = "imagecreatefro...

PHP 2021-05-28 PM 1889℃ 0条
PHP图像字符水印居中

PHP图像字符水印居中

<?php //让图像上字符串居中 header("content-type:text/html;charset = utf-8"); //(1)创建画布 $filename = "./images/02.jpg"; $img = imagecreatefromjpeg($filename); $str = "WELCOME to liuguofeng.com"; $font = 5; //(2)分配颜色: $color1 = imagecolorallocate($img,255,0,255); $color2 = im...

PHP 2021-05-28 PM 2497℃ 0条
强制提示让用户在浏览器种打开

强制提示让用户在浏览器种打开

<script> // 跳转提示 if (is_weixn_qq()) {; window.location.href = 'https://c.pc.qq.com/middle.html?pfurl='+window.location.href; } function is_weixn_qq(){ // 判断当前是否微信/QQ浏览器 var ua = navigator.userAgent; var isWeixin = !!/MicroMessenger/i.test(ua)...

前端 2021-05-24 PM 2043℃ 0条
中钢协:后期钢价难以持续大幅上涨

中钢协:后期钢价难以持续大幅上涨

查看所有80端口的连接数netstat -nat|grep -i "80"|wc -l对连接的IP按连接数量进行排序netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n查看TCP连接状态netstat -nat |awk '{print $6}'|sort|uniq -c|sort -rnnetstat -n |grep TIME_WAIT| awk '{print $5}' | sort | uniq -c | sort -rnnetstat -n | awk '/^tcp/ {++S[$NF]...

linux 2021-05-24 PM 1942℃ 0条
PHP:在任意html文本内随机位置添加内容-非html标签

PHP:在任意html文本内随机位置添加内容-非html标签

一个简单的php函数,留着以后备用$str = <<<EOF 这是一段测试内容<p class="test">随机位置插入关键词</p>支持插入html代码 EOF; $insert=array('<a href="javascript:;">链接1</a>','<a href="javascript:;">链接2</a>','<a href="javascript:;">链接3</a>')...

PHP 2021-05-18 PM 2109℃ 0条
php对Redis操作代码大全与详解

php对Redis操作代码大全与详解

php对Redis的操作,可以参考下面的代码。$redis = new Redis(); $redis->connect('127.0.0.1',6379,1);//短链接,本地host,端口为6379,超过1秒放弃链接 $redis->open('127.0.0.1',6379,1);//短链接(同上) $redis->pconnect('127.0.0.1',6379,1);//长链接,本地host,端口为6379,超过1秒放弃链接 $redis->popen('127.0.0.1',6379,1);//长链接(同上) $redis->auth('pas...

PHP 2021-05-18 PM 1821℃ 0条
php正则提取html内的图片任意属性的方法

php正则提取html内的图片任意属性的方法

简单的代码:<?php header("Content-Type: text/html;charset=utf-8"); $str = '<div> <a href="#" ><img width="131" height="177" src="http://files.jb51.net/file_images/game/201702/2017020716154162.jpg"/> <h3>2016年</h3&...

PHP 2021-05-18 PM 2453℃ 0条