要早点睡哦
你好小铭云,我是小明云
在东京的天空上,我们决定性的改变了世界的模样。
首页
留言板
关于筱铭云
API官网
推荐
筱铭引导页
朋友圈动态
Search
1
筱铭号卡联盟专业的号卡平台开启通讯新时代!
5,295 阅读
2
每天60秒读懂世界每天自动实时播报更新-筱铭云博客
5,293 阅读
3
欢迎使用 Typecho
4,368 阅读
4
你要接受这世上突如其来的失去
4,098 阅读
5
本站同款主题 Typecho — Joe主题
3,739 阅读
筱铭云
诗和远方
心灵鸡汤
Typecho
halo
网络教程
网络知识
程序软件
4K超清壁纸
登录
/
注册
Search
标签搜索
筱铭云博客
筱铭云
源码
Joe主题
Typecho
代码
html
彩虹
4K壁纸
程序
工具箱
API
DNS
halo
每天60秒
网站代码
python
我爱代挂
爱代挂
反诈app
Aree丶筱铭云
累计撰写
43
篇文章
累计收到
4
条评论
️
首页
分类
筱铭云
诗和远方
心灵鸡汤
Typecho
halo
网络教程
网络知识
程序软件
4K超清壁纸
页面
留言板
关于筱铭云
API官网
推荐
筱铭引导页
朋友圈动态
用户登录
登录丨注册
搜索到
8
篇与
的结果
2024-01-07
网站版权年份自动更新代码
很多站长发现,他们需要每年手动更新站点的底部版权信息,尤其在没有统一使用“foot”引用的情况下,这使得工作变得相当繁琐。现在,我们将介绍一种方法,让您轻松自动获取并显示当前的年份,从而省去手动更新的麻烦。只需在全局的“foot”部分或您想要显示版权信息的任何位置加入以下代码,即可实现自动更新。<script type="text/javascript"> <!-- Begin copyright=new Date(); //取得当前的日期 update=copyright.getFullYear(); //取得当前的年份 document.write("© Copyright 2019-"+ update + " All rights reserved. 筱铭云版权所有");//update为自动更新的年份 // End --> </script>
2024年01月07日
2,283 阅读
0 评论
15 点赞
2023-01-30
跳转QQ名片API源码
前言某些人QQ号设置无法搜索时,我们正常在QQ里搜索是找不到的所以写一下跳转qq名片的api,自行去搭建 搭建后 域名:api.php?qq=某些人QQ 然后打开链接,就会自动跳转到关闭搜索的QQ啦! 例如:https://api.50dg.cn/qq/qq.php?qq=57057329 筱铭云API官网:https://api.50dg.cn代码<?php header('Content-Type:application/json; charset=utf-8'); $agent = strtolower($_SERVER['HTTP_USER_AGENT']); //url 参数 ?qq=123456789 $qq = isset($_GET['qq']) ? $_GET['qq'] : ""; if(empty($qq)) { echo json_encode(array('code'=>201,'msg'=>'QQ不能为空'),480); } if(!preg_match("/^[1-9]\d{4,10}$/",$qq)){ echo json_encode(array('code'=>202,'msg'=>'QQ格式不正确'),480); } if(strpos($agent,'windows nt')){ $data = "tencent://ContactInfo/?subcmd=ViewInfo&puin=0&uin=$qq"; } if(strpos($agent,'iphone')){ $data = "mqq://im/chat?chat_type=wpa&uin=$qq&version=1&src_type=web"; } if(strpos($agent,'android')){ $data = "mqq://card/show_pslcard?src_type=internal&version=1&uin=$qq&card_type=person&source=sharecard"; } if(!empty($data)){ header("Location:$data"); exit; }
2023年01月30日
3,257 阅读
0 评论
106 点赞
2023-01-30
知乎热榜API、百度热点API、微博热搜API(开源)- 聚合热榜API开源
环境需求PHP 5.4及以上使用方式:上传即用知乎热榜API源码<?php // 知乎热榜 热度 function zhihuHot() { $_resHtml = str_replace(["\n", "\r", " "], '', vvhanCurl('https://www.zhihu.com/hot', ['User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'], 'https://www.zhihu.com')); preg_match('/<scriptid=\"js-initialData\"type=\"text\/json\">(.*?)<\/script>/', $_resHtml, $_resHtmlArr); $jsonRes = json_decode($_resHtmlArr[1], true); $tempArr = []; foreach ($jsonRes['initialState']['topstory']['hotList'] as $k => $v) { array_push($tempArr, [ 'index' => $k + 1, 'title' => $v['target']['titleArea']['text'], 'desc' => $v['target']['excerptArea']['text'], 'pic' => $v['target']['imageArea']['url'], 'hot' => $v['target']['metricsArea']['text'], 'url' => $v['target']['link']['url'], 'mobilUrl' => $v['target']['link']['url'] ]); } return [ 'success' => true, 'title' => '知乎热榜', 'subtitle' => '热度', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } ?>百度热点API源码<?php// 百度热点 指数function baiduredian(){ $_resHtml = str_replace(["\n", "\r", " "], '', vvhanCurl('https://top.baidu.com/board?tab=realtime', null)); preg_match('/<!--s-data:(.*?)-->/', $_resHtml, $_resHtmlArr); $jsonRes = json_decode($_resHtmlArr[1], true); return $jsonRes; $tempArr = []; foreach ($jsonRes['data']['cards'] as $v) { foreach ($v['content'] as $k => $_v) { array_push($tempArr, [ 'index' => $k + 1, 'title' => $_v['word'], 'desc' => $_v['desc'], 'pic' => $_v['img'], 'url' => $_v['url'], 'hot' => $_v['hotScore'] . 'W个内容', 'mobilUrl' => $_v['appUrl'] ]); } } return [ 'success' => true, 'title' => '百度热点', 'subtitle' => '指数', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ];}?> 微博热搜API源码<?php// 微博 热搜榜function wbresou(){ $_md5 = md5(time()); $cookie = "Cookie: {$_md5}:FG=1"; $jsonRes = json_decode(vvhanCurl('https://weibo.com/ajax/side/hotSearch', null, $cookie, "https://s.weibo.com"), true); $tempArr = []; foreach ($jsonRes['data']['realtime'] as $k => $v) { array_push($tempArr, [ 'index' => $k + 1, 'title' => $v['note'], 'hot' => $v['num'] . '万', 'url' => "https://s.weibo.com/weibo?q={$v['word_scheme']}&t=31&band_rank=12&Refer=top", 'mobilUrl' => "https://s.weibo.com/weibo?q={$v['word_scheme']}&t=31&band_rank=12&Refer=top" ]); } return [ 'success' => true, 'title' => '微博', 'subtitle' => '热搜榜', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ];}?> 三合一聚合源码(知乎/微博/百度/历史上的今天/抖音/哔哩哔哩(热搜+全站日榜)/少数派/36氪/CSDN)<?php /** * 热搜榜 (知乎/微博/百度/历史上的今天/抖音/哔哩哔哩(热搜+全站日榜)/少数派/36氪/CSDN) */ header("Access-Control-Allow-Origin:*"); header("Content-type:application/json; charset=utf-8"); date_default_timezone_set("Asia/Shanghai"); class Api { // 少数派 热榜 public function sspai() { $jsonRes = json_decode($this->Curl('https://sspai.com/api/v1/article/tag/page/get?limit=100000&tag=%E7%83%AD%E9%97%A8%E6%96%87%E7%AB%A0', null, null, "https://sspai.com"), true); $tempArr = []; foreach ($jsonRes['data'] as $k => $v) { array_push($tempArr, [ 'index' => $k +1, 'title' => $v['title'], 'createdAt' => date('Y-m-d', $v['released_time']), 'other' => $v['author']['nickname'], 'like_count' => $v['like_count'], 'comment_count' => $v['comment_count'], 'url' => 'https://sspai.com/post/'.$v['id'], 'mobilUrl' => 'https://sspai.com/post/'.$v['id'] ]); } return [ 'success' => true, 'title' => '少数派', 'subtitle' => '热榜', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } // CSDN 头条榜 public function csdn() { $_resHtml = $this->Curl('https://www.csdn.net', null, "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1", "https://www.csdn.net"); preg_match('/window.__INITIAL_STATE__=(.*?);<\/script>/', $_resHtml, $_resHtmlArr); $jsonRes = json_decode($_resHtmlArr[1],true); $tempArr = []; //头条 foreach ($jsonRes['pageData']['data']['Headimg'] as $k => $v) { array_push($tempArr, [ 'index' => $k +1, 'title' => $v['title'], 'url' => $v['url'], 'mobilUrl' => $v['url'] ]); } //头条1 foreach ($jsonRes['pageData']['data']['www-Headlines'] as $k => $v) { array_push($tempArr, [ 'index' => $k +17, 'title' => $v['title'], 'url' => $v['url'], 'mobilUrl' => $v['url'] ]); } //头条2 foreach ($jsonRes['pageData']['data']['www-headhot'] as $k => $v) { array_push($tempArr, [ 'index' => $k +48, 'title' => $v['title'], 'url' => $v['url'], 'mobilUrl' => $v['url'] ]); } return [ 'success' => true, 'title' => 'CSDN', 'subtitle' => '头条榜', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } //百度百科 历史上的今天 public function history() { $month=date('m',time() ); $day=date('d',time() ); //当前年月日 $today = date('Y年m月d日'); //获取接口数据 $jsonRes = json_decode($this->Curl('https://baike.baidu.com/cms/home/eventsOnHistory/'.$month.'.json', null, null, "https://baike.baidu.com"), true); $tempArr = []; //统计当日总数 $countnum = count($jsonRes[$month][$month.$day])-1; foreach ($jsonRes[$month][$month.$day] as $k => $v) { array_push($tempArr, [ 'index' => $k +1, 'title' => $v['year'].'年-'.strip_tags($v['title']), 'url' => 'https://www.douyin.com/search/'.urlencode($v['title']), 'mobilUrl' => 'https://www.douyin.com/search/'.urlencode($v['title']) ]); } return [ 'success' => true, 'title' => '百度百科', 'subtitle' => '历史上的今天', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } // 抖音 热搜榜 public function douyin() { $jsonRes = json_decode($this->Curl('https://www.iesdouyin.com/web/api/v2/hotsearch/billboard/word/', null, null, "https://www.douyin.com"), true); $tempArr = []; foreach ($jsonRes['word_list'] as $k => $v) { array_push($tempArr, [ 'index' => $k +1, 'title' => $v['word'], 'hot' => round($v['hot_value']/10000,1).'万', 'url' => 'https://www.douyin.com/search/'.urlencode($v['word']), 'mobilUrl' => 'https://www.douyin.com/search/'.urlencode($v['word']) ]); } return [ 'success' => true, 'title' => '抖音', 'subtitle' => '热搜榜', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } // 哔哩哔哩 全站日榜 public function bilibili_rankall() { $jsonRes = json_decode($this->Curl('https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&type=all', null, null, "https://www.bilibili.com"), true); $tempArr = []; foreach ($jsonRes['data']['list'] as $k => $v) { array_push($tempArr, [ 'index' => $k +1, 'title' => $v['title'], 'pic' => $v['pic'], 'desc' => $v['desc'], 'hot' => round($v['stat']['view']/10000,1).'万', 'url' => $v['short_link'], 'mobilUrl' => $v['short_link'] ]); } return [ 'success' => true, 'title' => '哔哩哔哩', 'subtitle' => '全站日榜', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } // 哔哩哔哩 热搜榜 public function bilibili_hot() { $jsonRes = json_decode($this->Curl('https://app.bilibili.com/x/v2/search/trending/ranking', null, null, "https://www.bilibili.com"), true); $tempArr = []; //return $jsonRes; foreach ($jsonRes['data']['list'] as $k => $v) { array_push($tempArr, [ 'index' => $v['position'], 'title' => $v['keyword'], 'url' => 'https://search.bilibili.com/all?keyword='.$v['keyword'].'&order=click', 'mobilUrl' => 'https://search.bilibili.com/all?keyword='.$v['keyword'].'&order=click' ]); } return [ 'success' => true, 'title' => '哔哩哔哩', 'subtitle' => '热搜榜', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } // 知乎热榜 热度 public function zhihuHot() { $jsonRes = json_decode($this->Curl('https://www.zhihu.com/api/v3/feed/topstory/hot-lists/total?limit=50&desktop=true', null, null, "https://www.zhihu.com"), true); $tempArr = []; foreach ($jsonRes['data'] as $k => $v) { preg_match('/\d+/', $v['detail_text'], $hot); array_push($tempArr, [ 'index' => $k + 1, 'title' => $v['target']['title'], 'hot' => $hot[0].'万', 'url' => 'https://www.zhihu.com/question/'.urlencode($v['target']['id']), 'mobilUrl' => 'https://www.zhihu.com/question/'.urlencode($v['target']['id']) ]); } return [ 'success' => true, 'title' => '知乎热榜', 'subtitle' => '热度', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } // 微博 热搜榜 public function wbresou() { $_md5 = md5(time()); $cookie = "Cookie: {$_md5}:FG=1"; $jsonRes = json_decode($this->Curl('https://weibo.com/ajax/side/hotSearch', null, $cookie, "https://s.weibo.com"), true); $tempArr = []; foreach ($jsonRes['data']['realtime'] as $k => $v) { array_push($tempArr, [ 'index' => $k + 1, 'title' => $v['note'], 'hot' => round($v['num']/10000,1).'万', 'url' => "https://s.weibo.com/weibo?q=".$v['note']."&Refer=index", 'mobilUrl' => "https://s.weibo.com/weibo?q=".$v['note']."&Refer=index" ]); } return [ 'success' => true, 'title' => '微博', 'subtitle' => '热搜榜', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } // 百度热点 指数 public function baiduredian() { $_resHtml = str_replace(["\n", "\r", " "], '', $this->Curl('https://top.baidu.com/board?tab=realtime', null)); preg_match('/<!--s-data:(.*?)-->/', $_resHtml, $_resHtmlArr); $jsonRes = json_decode($_resHtmlArr[1], true); //return $jsonRes; $tempArr = []; foreach ($jsonRes['data']['cards'] as $v) { foreach ($v['content'] as $k => $_v) { array_push($tempArr, [ 'index' => $k + 1, 'title' => $_v['word'], 'desc' => $_v['desc'], 'pic' => $_v['img'], 'url' => $_v['url'], 'hot' => round($_v['hotScore']/10000,1).'万', 'mobilUrl' => $_v['appUrl'] ]); } } return [ 'success' => true, 'title' => '百度热点', 'subtitle' => '指数', 'update_time' => date('Y-m-d h:i:s', time()), 'data' => $tempArr ]; } private function Curl($url, $header = [ "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "Accept-Encoding: gzip, deflate, br", "Accept-Language: zh-CN,zh;q=0.9", "Connection: keep-alive", "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1" ], $cookie = null, $refer = 'https://www.baidu.com') { $ip = rand(0, 255) . '.' . rand(0, 255) . '.' . rand(0, 255) . '.' . rand(0, 255); $header[] = "CLIENT-IP:" . $ip; $header[] = "X-FORWARDED-FOR:" . $ip; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); //设置传输的 url curl_setopt($ch, CURLOPT_HTTPHEADER, $header); //发送 http 报头 curl_setopt($ch, CURLOPT_COOKIE, $cookie); //设置Cookie curl_setopt($ch, CURLOPT_REFERER, $refer); //设置Referer curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); // 解码压缩文件 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在 curl_setopt($ch, CURLOPT_TIMEOUT, 5); // 设置超时限制防止死循环 $output = curl_exec($ch); curl_close($ch); return $output; } } $_type = isset($_GET['type']) ? $_GET['type'] : ''; $API = new Api; switch ($_type) { case 'baidu': $_res = $API->baiduredian(); break; case 'zhihu': $_res = $API->zhihuHot(); break; case 'weibo': $_res = $API->wbresou(); break; case 'bilihot': $_res = $API->bilibili_hot(); break; case 'biliall': $_res = $API->bilibili_rankall(); break; case 'douyin': $_res = $API->douyin(); break; case 'history': $_res = $API->history(); break; case 'csdn': $_res = $API->csdn(); break; case 'sspai': $_res = $API->sspai(); break; default: $_res = ['success' => false, 'message' => '参数不完整']; break; } $_res['copyright'] = '聚合热搜榜'; exit(json_encode($_res,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT)); ?>
2023年01月30日
2,690 阅读
0 评论
98 点赞
2023-01-30
搭建属于自己的随机图API[PHP]
教程环境Linux系统宝塔面板PHP7.*以上都可以域名创建项目宝塔后台 –> 网站 –> 添加站点设置自己的域名网站根目录 –> 创建文件夹pcimg,peimgpcimg存放电脑端图片,peimg存放手机端图片创建random.php –> 添加下面代码<?php $agent = $_SERVER['HTTP_USER_AGENT']; //var_dump($agent); if(stripos($agent,'android')!==false || stripos($agent, 'iphone')!==false){ $img_array = glob('peimg/*.{gif,jpg,png,jpeg,webp,bmp,JPG}', GLOB_BRACE); if (count($img_array) == 0) { die('没找到pe图片文件。请先上传一些图片到 ' . dirname(__FILE__) . '/peimg/ 文件夹'); } header('Content-Type: image/png'); echo file_get_contents($img_array[array_rand($img_array)]); } else { $img_array = glob('pcimg/*.{gif,jpg,png,jpeg,webp,bmp}', GLOB_BRACE); if (count($img_array) == 0) { die('没找到pc图片文件。请先上传一些图片到 ' . dirname(__FILE__) . '/pcimg/ 文件夹'); } header('Content-Type: image/png'); echo file_get_contents($img_array[array_rand($img_array)]); } {message type="warning" content="注意事项php代码添加了手机端访问和电脑端访问的判断。可以根据个人的使用环境来进行的变更。"/}
2023年01月30日
1,638 阅读
0 评论
9 点赞
2023-01-30
PHP百度收录数量API查询源码本地化 【代码分享】
前言现在做站会有些站长把收录数量显示在网站底部,一来自己可以知道网站收录数量多少,二来申请友链的伙伴们也知道你网站有多少收录,不过大多数人都是用别人的API接口来实现,假如别人的API接口失效了,自己网站就多了个404的JS文件,这样会导致网站打开速度慢了一点点!这里直接把接口源码分享了!API代码在网站新建一个php文件,把下面的代码复制进去API接口的源码,查询实例: 你网站域名/文件.php?domain=查询域名<?php /* Plugin Name: XY-百度收录量 Description: XY-根据域名返回百度收录量 */ $domain = (isset($_GET['domain']))?$_GET['domain']:$_POST['domain']; if(empty($domain)) echo '查询域名不能为空'; $count = baiduSL ($domain); if(!isset($count)) showjson(array('code'=>200502,'msg'=>'查询失败,请重试!')); if(!$count) $count = 0; $result=array( 'code'=>1, 'domain'=>$domain, 'data'=>$count ); print_r(json_encode($result)); unset($domain,$result,$ch); function baiduSL ($domain) { $baidu='https://www.baidu.com/s?ie=utf-8&tn=baidu&wd=site%3A'.$domain; $bdsite=BD_curl($baidu); $bdsite = str_replace(array("\r\n", "\r", "\n", ' '), '', $bdsite); if (!$count) preg_match('/找到相关结果数约(.*?)个/i',$bdsite,$count); $baiduSL=strip_tags($count[1]); unset($count); return $baiduSL; } function BD_curl($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $ret = curl_exec($ch); curl_close($ch); return $ret; } ?>
2023年01月30日
2,283 阅读
0 评论
46 点赞
2023-01-02
一些简单常用的html代码,记录学习使用
一些简单常用的html代码,记录学习使用1.加图片:<img src="图片地址"> 2.加网页连接:<a href="链接地址">链接对应的文字</a> 3.添加在新窗口打开连接效果:<a href="链接地址" target="_blank">链接对应的文字</a>,如果想消除链接文字下的下划线,可以在href后加:style="text-decoration:none" 另外: target="_blank"将在新窗口打开链接;target="_parent"将在父窗口或框架中打开网页; target="_self"将在本页面打开链接;target="_top"将忽略框架,在顶端打开窗口。 4.走马灯:<marquee>走马灯</marquee> 5.加粗字体:<b>文字</b> 6.斜体:<i>文字</i> 7.加下划线: <u>文字</u> 8.加删除线: <s>文字</s> 9.加大字体: <big>文字</big> 10.控制字体大小: <h1>文字</h1>最大 <h2>文字</h2>次大 <h3>文字</h3> 次次大 <h4>文字</h4>次次次大 <h5>文字</h5> 最小 11.定义字体颜色:<font color="#16进制编码">文字</font> 12.换行:<br/> 13.加段落:<p>段落</p> 14.定义背景图片:<body background="图片地址">,默认背景图片会随着滚动条滚动,如果不想让它滚(),可以加入:body bgproperties=fixed 15.定义文件类型,<html></html>,放在网页文件的开头及结尾
2023年01月02日
1,193 阅读
0 评论
11 点赞
2022-11-29
常用的HTML代码标识HTML知识
1. 贴图:<img src="图片地址"> 2. 加入连接:<a href="所要连接的相关地址">写上你想写的字</a> 3. 在新窗口打开连接:<a href="相关地址" target="_blank">写上你想写的字</a> 4. 消除连接的下划线在新窗口打开连接:<a href="相关地址" style="text-decoration:none" target="_blank">写上你想写的字</a> 5. 移动字体(走马灯):<marquee>写上你想写的字</marquee> 6. 字体加粗:<b>写上你想写的字</b> 7. 字体斜体:<i>写上你想写的字</i> 8. 字体下划线: <u>写上你想写的字</u> 9. 字体删除线:<s>写上你想写的字</s> 10. 字体加大:<big>写上你想写的字</big> 11. 字体标题大小:<h1>写上你想写的字</h1> (h1-h5,h1最大,h5最小) 12. 更改字体颜色:<font color="#value">写上你想写的字</font>其中value值在000000与ffffff(16位进制)之间 13. 修改文字的背景色 <font style="background: red">红色</font> 14. 文字渐变背景色 <font style="background: linear-gradient( to right, #ff1616, #ff7716, #ffdc16, #36c945, #10a5ce, #0f0096, #a51eff, #ff1616);">文字渐变七彩背景色</font> 15. 消除连接的下划线:<a href="相关地址" style="text-decoration:none">写上你想写的字</a> 16. 贴音乐:<embed src="音乐地址" width=300 height=45 type=audio/mpeg autostart="false"> 17. 贴flash:<embed src="flash地址" width="宽度" height="高度"> 18. 贴影视文件:<img dynsrc="文件地址" width="宽度" height="高度" start=mouseover> 19. 换行:<br> 20. 段落:<p>段落</p> 21. 原始文字样式:<pre>正文</pre> 22. Tip样式 <p class="tip">Tip样式</p> 23. Warn样式 <p class="warn">Warn样式</p> 24. 换帖子背景:<body background="背景图片地址"> 25. 固定帖子背景不随滚动条滚动:<body background="背景图片地址" body bgproperties=fixed> 26. 定制帖子背景颜色:<body bgcolor="#value">其中value值在000000与ffffff(16位进制)之间 27. 帖子背景音乐:<bgsound="背景音乐地址" loop=infinite> 28. 打开网站出现欢迎词:<body alert(“欢迎访问本站!”)> 29. 返回上一页:<a href="#" onclick="javascript:history.back(-1);">『返回上一页』</a> 30. 关闭窗口:<a href=javascript :self.close()>『关闭窗口』</a> 31. 关于iframe的透明背景:<iframe ID="iFrame1" SRC="iframe.htm"allowTransparency="true"style="background-color: green"></IFRAME> 32. 将彻底屏蔽鼠标右键 oncontextmenu="window.event.returnValue=false" 33. 可用于Table <table border oncontextmenu=return(false)><td>no</table> 34. 取消选取、防止复制 <body onselectstart="return false"> 35. 不准粘贴 onpaste="return false" 36. 防止复制 oncopy="return false;" oncut="return false;" 37. 禁止复制网页代码:<body bgcolor="#ffffff" oncontextmenu="return false" onselectstart="return false"> 38. IE地址栏前换成自己的图标 <link rel="Shortcut Icon" href="favicon.ico"> 39. 在收藏夹中显示出图标 <link rel="Bookmark" href="favicon.ico"> 40. 关闭输入法 <input style="ime-mode:disabled"> 41. 网页将不能被另存为:<noscript><iframe src=*.html></iframe></noscript> 42. 查看网页源代码:<input type=button value=查看网页源代码 onclick="window.location = "view-source:"+ "http://www.pconline.com.cn""> 43. 删除时确认:<a href="javascript :if(confirm("确定删除?"))location="boos.asp? &areyou=删除&page=1"">删除</a> 44. 去掉(底部)左右滚动条:<body style="overflow:-Scroll;overflow-x:hidden"> 45. 去掉(右侧)上下滚动条:<body style="overflow:-Scroll;overflow-y:hidden" > 46. 两个都去掉:<body scroll="no"></body> 47. 去掉图片链接点击后,图片周围的虚线 <a href="#" onFocus="this.blur()"><img src="logo.jpg" border=0></a> 48. 在打开的子窗口刷新父窗口的代码:window.opener.location.reload() 49. 设定打开页面的大小:<body onload="top.resizeTo(300,200);">打开页面的位置<body onload="top.moveBy(300,200);"> 50. 获得一个窗口的大小:document.body.clientWidth; document.body.clientHeight 51. 判断是否是字符;if (/[^/x00-/xff]/g.test(s)) alert("含有汉字");else alert("全是字符"); 52. ENTER键让光标移到下一个输入框:<input onkeydown="if(event.keyCode==13)event.keyCode=9"> 53. 使图片圆角:<style> img { border-radius: 50% !important; border: 30px solid #eee; }</style> 54. 生成一个圆角按钮 <div style="width:100px;height:50px;background-color:red;border-radius:15px;"> 55. 网页标题左侧显示图标:<link rel="icon" href="图标地址" type="image/x-icon"> 56. 收藏夹显示图标:<link rel="shortcut icon" href="图标地址" type="image/x-icon"> 57. 网页适配手机:<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> 58. 插入其它网页:<iframe id="iframe" align=center src="网页网址" frameBorder=0 width="100%" height="100%" scrolling=no ></IFRAME>
2022年11月29日
1,170 阅读
0 评论
5 点赞
2022-09-04
按照图片尺寸自动分类 手机分辨率 电脑分辨率 python脚本
介绍按照图片尺寸自动分类 手机分辨率 电脑分辨率 python脚本 # coding=utf-8 """ 功能:按图片的尺寸大小进行分类 区分 电脑分辨率图片 手机分辨率图片 """ import os import shutil from PIL import Image # 定义一个分类函数,函数括号中为需要分类的图片文件夹路径 def photo_classify(files_path): # 读取文件夹中所有文件的名称 files_list = os.listdir(files_path) # 循环文件夹中的所有文件 for photo in files_list: # 获取图片的绝对路径 photo_abspath = os.path.join(files_path, photo) # print(photo_abspath) # 判断photo是不是文件夹,若是文件夹则跳过,若不是文件夹则继续执行 if os.path.isdir(photo_abspath): continue else: # 读图片的尺寸 img = Image.open(photo_abspath) # 取图片宽度 weight = img.size[0] # 取图片高度 high = img.size[1] # 对比图片宽高 if weight > high: # 根据图片尺寸Copy文件到新目录 PC new_paths = os.path.join(r'D:\Download\pc', photo) shutil.copyfile(photo_abspath, new_paths) print('pc') else: # 根据图片尺寸Copy文件到新目录 Mobil new_paths = os.path.join(r'D:\Download\mobil', photo) shutil.copyfile(photo_abspath, new_paths) print('mobil') img.close() # 转移完毕后 删除原文件 os.remove(photo_abspath) print('分类成功!') # 图片目录 files_path = r'D:\Download\meinv' if __name__ == '__main__': photo_classify(files_path)
2022年09月04日
2,180 阅读
0 评论
12 点赞