不一样的访客欢迎画面:利用cookies抓取访客头像
哈哈大家好我终于又憋出来一篇了,一天没见是不是很想我!! 之前在小蝴蝶这里评论过的同志们应该已经看到效果了: 由于实在憋不出来东西写了,所以无聊检查了一下网站记录的cookies,其中有一个大家很熟悉,就是我们常见访客欢迎词要用到的 comment_author ,而另一
哈哈大家好我终于又憋出来一篇了,一天没见是不是很想我!!
之前在小蝴蝶这里评论过的同志们应该已经看到效果了:


由于实在憋不出来东西写了,所以无聊检查了一下网站记录的cookies,其中有一个大家很熟悉,就是我们常见访客欢迎词要用到的
comment_author
,而另一个很少有人用,就是comment_author_email
comment_author_email能用来干嘛内?用来抓头像咯.
好了上代码,以下代码扔到你要欢迎访客的地方:
<?php if($_COOKIE["comment_author_email_" . COOKIEHASH]!="") : $fkimg = $_COOKIE['comment_author_email_'.COOKIEHASH];?> <?php echo get_avatar($fkimg, 50);?> <?php endif; ?>
如果要实现小蝴蝶那样仿QQ视频的访客欢迎画面,则把代码改成如下(具体css值需要根据你的主题修改)
<?php if($_COOKIE["comment_author_email_" . COOKIEHASH]!="") : $fkimg = $_COOKIE['comment_author_email_'.COOKIEHASH];?> <div class="fkimg"><?php echo get_avatar($fkimg, 68);?></div> <img src="/static/imghw/default1.png" data-src="/imgr?src=http%3A%2F%2Fxiaohudie.net%2F%E4%BD%A0%E7%9A%84%E5%A4%B4%E5%83%8F%E5%9B%BE%E7%89%87%E5%9C%B0%E5%9D%80" class="lazy" style="max-width:90%" alt="不一样的访客欢迎画面:利用cookies抓取访客头像" > <?php else: ?> <img src="/static/imghw/default1.png" data-src="/imgr?src=http%3A%2F%2Fxiaohudie.net%2F%E4%BD%A0%E7%9A%84%E5%A4%B4%E5%83%8F%E5%9B%BE%E7%89%87%E5%9C%B0%E5%9D%80" class="lazy" style="max-width:90%" alt="不一样的访客欢迎画面:利用cookies抓取访客头像" > <?php endif; ?>
然后加上css
.fkimg{ float: left; box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.46); margin: 5px 10px 10px 0; width: 68px; height: 68px;}
好了就这么多,昨天那篇吐草被包子破了百,践行诺言来放福利了..
另外跪求大家还是不要破百了,因为我没有新衣服拍了
原文地址:不一样的访客欢迎画面:利用cookies抓取访客头像, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Recently, I encountered a problem. I needed to transform my avatar into an anime style. My first thought was to find ready-made wheels. ▲Convert pictures to pixel style to convert avatars into anime style, hoping to convert real photos into anime/cartoon style non-realistic images while maintaining the original image information and texture details. At present, in addition to Baidu API, there are many open source libraries on Github that we can use directly. Among them, AnimeGAN is a study from Wuhan University and Hubei University of Technology. It uses a combination of neural style transfer + generative adversarial network (GAN), and the effect is very consistent with our needs. AnimeGAN first used the Tensorflow framework, but after querying the information, it was found that the project already supports PyTorch.

1. WeChat is a social platform that pays attention to privacy protection. Users cannot see who has visited their Moments or personal homepage. 2. This design is intended to protect user privacy and avoid potential harassment or snooping. 3. Users can only see the likes and comments records in their circle of friends, further ensuring the confidentiality of personal information.

If we change our system account avatar but don’t want it anymore, we can’t find how to change the default avatar in win11. In fact, we only need to find the folder of the default avatar to restore it. Restore the default avatar in win11 1. First click on the "Windows Logo" on the bottom taskbar 2. Then find and open "Settings" 3. Then enter "Account" on the left column 4. Then click on "Account Information" on the right 5. After opening, click "Browse Files" in the selected photo. 6. Finally, enter the "C:\ProgramData\Microsoft\UserAccountPictures" path to find the system default avatar picture.

How to use GitLab for project document management 1. Background introduction In the software development process, project documents are very important information. They can not only help the development team understand the needs and design of the project, but also provide reference to the testing team and customers. In order to facilitate version control and team collaboration of project documents, we can use GitLab for project document management. GitLab is a version control system based on Git. In addition to supporting code management, it can also manage project documents. 2. GitLab environment setup First, I

After registering a win10 account, many friends feel that their default avatars are not very good-looking. For this reason, they want to change their avatars. Here is a tutorial on how to change their avatars. If you want to know, you can come and take a look. . How to change the win10 account name and avatar: 1. First click on the lower left corner to start. 2. Then click the avatar above in the pop-up menu. 3. After entering, click "Change Account Settings". 4. Then click "Browse" under the avatar. 5. Find the photo you want to use as your avatar and select it. 6. Finally, the modification is completed successfully.

Scrapy is a Python-based crawler framework that can quickly and easily obtain relevant information on the Internet. In this article, we will use a Scrapy case to analyze in detail how to crawl company information on LinkedIn. Determine the target URL First, we need to make it clear that our target is the company information on LinkedIn. Therefore, we need to find the URL of the LinkedIn company information page. Open the LinkedIn website, enter the company name in the search box, and

How to change the boss direct recruitment avatar back to the default? The boss direct recruitment avatar can be adjusted at will, but most friends don’t know how to change the boss direct recruitment avatar back to the default. Next is the boss direct recruitment avatar brought to players by the editor. Change back to the default method tutorial, interested players come and take a look! How to change the Boss Direct Recruitment avatar back to the default 1. First open the Boss Direct Recruitment APP, click on the avatar above in the [My] area in the lower right corner of the main page; 2. Then enter the personal information interface and continue to click on the avatar; 3. Then select [ Take photo] and [Select from album] to change back to the default.

Instagram is one of the most popular social media today, with hundreds of millions of active users. Users upload billions of pictures and videos, and this data is very valuable to many businesses and individuals. Therefore, in many cases, it is necessary to use a program to automatically scrape Instagram data. This article will introduce how to use PHP to capture Instagram data and provide implementation examples. Install the cURL extension for PHP cURL is a tool used in various
