


A multi-user counter with a custom number of digits_PHP tutorial
This counter can be customized to any number of digits and, when provided for free, can display a simple ad.
When running, you need to create a directory datas in the counter directory that the nobody account has the right to overwrite.
The actual running example is in
http://www.hnpts.ha.cn/freecount.htm
Header("Content-type: image/png");
if ($user=="") $user="test";
$fn="datas/".$ user.".txt";
if ($bit=="") $bit=8; //Take the default value
if (is_readable($fn)) {$f=fopen($fn," r");
$c=fgets($f,255);fclose($f);} //Read the original count value
else $c="0"; //New user
$l=strlen($c); //Calculate the actual value length
$cnt="";
for ($i=0;$i $cnt.=$c;$c1=intval($c);$c1++;
$f=fopen($fn, "w");fputs($f,$c1);fclose($f); //Write back
$font=20;
if (($c1%10==9)&&($user !="test")) {$cnt="www.hnpts.ha.cn";$font=16;}
//Display ads when conditions are met
$s=ImageTTFBBox($font,0, "times.ttf", $cnt);
$x=abs($s[4])+8;$y=abs($s[5])+7;
$im = imagecreate($x,$y);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 255,255,255);
if ($font== 20) {$green = ImageColorAllocate($im, 0,255,0);
imagerectangle($im,1,1,$x-2,$y-2,$white);}
else $green = ImageColorAllocate($im, 255,255,255);
ImageTTFText($im,$font,0, 3,$y-5, $green, "times.ttf", $cnt);
ImagePng($im);
ImageDestroy($im);
?>

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

AI Hentai Generator
Generate AI Hentai for free.

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

An avatar on Netflix is a visual representation of your streaming identity. Users can go beyond the default avatar to express their personality. Continue reading this article to learn how to set a custom profile picture in the Netflix app. How to quickly set a custom avatar in Netflix In Netflix, there is no built-in feature to set a profile picture. However, you can do this by installing the Netflix extension on your browser. First, install a custom profile picture for the Netflix extension on your browser. You can buy it in the Chrome store. After installing the extension, open Netflix on your browser and log into your account. Navigate to your profile in the upper right corner and click

1. Where can I read Feilu novels for free? Feilu Novel reads free novel operation tutorials! 1. If you want to know where you can find free novels on the Feilu Novel App, then come and download the [Feilu Novel Free Version App] to experience it! Feilu Novel Free Edition app Category: News Reading Download Feilu Novel Free Edition app is an excellent mobile reading application, which provides users with a large number of high-quality novel resources. There are various types of novels on this platform, including fantasy, cultivation, history, romance, etc. Users can choose the genre they like to read. The reading experience of Feilu Novel Free Edition app is excellent. It has a good interface design, fast loading speed and smooth reading experience. 2. Open the downloaded app, enter the homepage, and click

How to customize shortcut key settings in Eclipse? As a developer, mastering shortcut keys is one of the keys to improving efficiency when coding in Eclipse. As a powerful integrated development environment, Eclipse not only provides many default shortcut keys, but also allows users to customize them according to their own preferences. This article will introduce how to customize shortcut key settings in Eclipse and give specific code examples. Open Eclipse First, open Eclipse and enter

SPDIFOUT connection line sequence on the motherboard. Recently, I encountered a problem regarding the wiring sequence of the wires. I checked online. Some information says that 1, 2, and 4 correspond to out, +5V, and ground; while other information says that 1, 2, and 4 correspond to out, ground, and +5V. The best way is to check your motherboard manual. If you can't find the manual, you can use a multimeter to measure it. Find the ground first, then you can determine the order of the rest of the wiring. How to connect motherboard VDG wiring When connecting the VDG wiring of the motherboard, you need to plug one end of the VGA cable into the VGA interface of the monitor and the other end into the VGA interface of the computer's graphics card. Please be careful not to plug it into the motherboard's VGA port. Once connected, you can

1. The picture below is the default screen layout of edius. The default EDIUS window layout is a horizontal layout. Therefore, in a single-monitor environment, many windows overlap and the preview window is in single-window mode. 2. You can enable [Dual Window Mode] through the [View] menu bar to make the preview window display the playback window and recording window at the same time. 3. You can restore the default screen layout through [View menu bar>Window Layout>General]. In addition, you can also customize the layout that suits you and save it as a commonly used screen layout: drag the window to a layout that suits you, then click [View > Window Layout > Save Current Layout > New], and in the pop-up [Save Current Layout] Layout] enter the layout name in the small window and click OK

What happens when the desktop layout is locked? When using the computer, sometimes we may encounter the situation where the desktop layout is locked. This problem means that we cannot freely adjust the position of desktop icons or change the desktop background. So, what exactly is going on when it says that the desktop layout is locked? 1. Understand the desktop layout and locking functions. First, we need to understand the two concepts of desktop layout and desktop locking. Desktop layout refers to the arrangement of various elements on the desktop, including shortcuts, folders, widgets, etc. we can be free

The editor of this website recently took stock of some free and easy-to-use mobile phone screen recording software to help you record the screen anytime and anywhere on your mobile phone. For example, for live broadcasters and gamers, you can record your own beautiful moments. In a moment, I will give you a summary report below. I hope you like it. Inventory of free and easy-to-use mobile phone screen recording software 1, EV screen recording 1, the editor has been using this EV screen recording, it is really simple and practical, as an office artifact, it has no ads, no plug-ins, and takes up a lot of space. The memory space of your mobile phone is small, so the phone will not become laggy, and there are more video editing functions for everyone to use. The recorded video is very clear, and it supports the lossless transfer of video files between mobile devices and computer devices. Isn’t it very frustrating? You are excited. to

There are many users using Remote Desktop Connection. Many users will encounter some minor problems when using it, such as the other party's taskbar not being displayed. In fact, it is probably a problem with the other party's settings. Let's take a look at the solutions below. How to display the other party's taskbar during Remote Desktop Connection: 1. First, click "Settings". 2. Then open "Personalization". 3. Then select "Taskbar" on the left. 4. Turn off the Hide Taskbar option in the picture.
