一句代码的事,就不多说了 ➡
//自定义登录页面背景 function custom_login_head(){ $str=file_get_contents('http://cn.bing.com/HPImageArchive.aspx?idx=0&n=1'); if(preg_match("/<url>(.+?)<\/url>/ies",$str,$matches)){ $imgurl='http://cn.bing.com'.$matches[1]; echo'<style type="text/css">body{background: url('.$imgurl.');background-attachment:fixed;width:100%;height:100%;background-image:url('.$imgurl.');background-attachment:fixed;-moz-background-size: 100% 100%;-o-background-size: 100% 100%;-webkit-background-size: 100% 100%;background-size: 100% 100%;-moz-border-image: url('.$imgurl.') 0;background-attachment:fixed;background-repeat:no-repeat\9;background-image:none\9;}h1 a { background-image:url('.get_bloginfo('url').'/favicon.ico)!important;width:32px;height:32px;-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;}#loginform {background-color:rgba(251,251,251,0.3)!important;}.login label,a{color:#000!important;}</style>'; }} add_action('login_head', 'custom_login_head'); add_filter('login_headerurl', create_function(false,"return get_bloginfo('url');")); add_filter('login_headertitle', create_function(false,"return get_bloginfo('name');"));
最近发现这篇文章被转发了好多。。。。。
-- 完 --
好机智的楼主!
博主你好,能说一下你的评论下面这些扩展功能是怎么做的吗?
谢谢
@Amigo jQuery
我是这么抓的,不知道效率如何
preg_match_all("/g_img={url:'(.*)'/U",$d,$img);
不过你的那个我已经加入队列了,那天我那个失效了,你的还可以用 😆
@小幻 布吉岛呢,用必应的感觉快了很多
我是直接在必应首页抓的,真没想到还有那么个页面。。。。
@小幻 其实很多东东里面都是用这个页面
@小幻 不过你每次访问都会重新抓取一次,很容易被……
@小幻 ➡ 谁会没事老是近登陆页面,直接前台就进去了
@小幻 😕 其实是不会用php缓存。。。。。
@小幻 还好我机智,存到了数据库里 😀