Sponsored Content
The Lounge What is on Your Mind? Purge of Inactive Users with Zero Posts and Other Anti-spam Measures Post 303023537 by Neo on Wednesday 19th of September 2018 03:23:05 AM
Old 09-19-2018
And just deleted any "homepage" links from all users with zero posts who have not been active since 1 September 2018:

Code:
mysql> update user set homepage=''  where homepage!='' and posts=0 and lastactivity < 1535760000;
Query OK, 153 rows affected (0.21 sec)
Rows matched: 153  Changed: 153  Warnings: 0

So, that should get rid of most of the prior "register and just add a link" spammers.
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to logout inactive users????

I would like to automatically logout from the system inactive users depending on their functions. For example there are users that I would like to logout after 15 minutes of inactivity, but there are others that I would like to logout after 30 minutes of inactivity. It's possible to do this??? (6 Replies)
Discussion started by: rrivas
6 Replies

2. UNIX for Dummies Questions & Answers

List all inactive users who has not logged on since last 90 days

Hi, Can I get a script to list out all the users, who has not logged on since last 90 days. Last command in not working due due to /var/adm/wtmpx is more than 2 GB. Thanks in advance. Regards, Roni (10 Replies)
Discussion started by: manasranjanpand
10 Replies

3. Solaris

List all inactive users who has not logged on since last 90 days

I need actuall script which List all inactive users who has not logged on since last 90 days Thanks in advance. Di! (17 Replies)
Discussion started by: haridham
17 Replies

4. Shell Programming and Scripting

Deleting Inactive Solaris users

Hello, I want to do a search for users on my solaris boxes that have been inactive for a defined number of days and then delete them. Any ideas how to determine or calculate the number of days (possibly using the /var/adm/wtmpx file) from the user's last login to the current date of search. ... (0 Replies)
Discussion started by: prince2010
0 Replies
IMAGECOLORCLOSESTALPHA(3)						 1						 IMAGECOLORCLOSESTALPHA(3)

imagecolorclosestalpha - Get the index of the closest color to the specified color + alpha

SYNOPSIS
int imagecolorclosestalpha (resource $image, int $red, int $green, int $blue, int $alpha) DESCRIPTION
Returns the index of the color in the palette of the image which is "closest" to the specified RGB value and $alpha level. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $red -Value of red component. o $green -Value of green component. o $blue -Value of blue component. o $alpha - A value between 0 and 127. 0 indicates completely opaque while 127 indicates completely transparent. The colors parameters are integers between 0 and 255 or hexadecimals between 0x00 and 0xFF. RETURN VALUES
Returns the index of the closest color in the palette. EXAMPLES
Example #1 Search for a set of colors in an image <?php // Start with an image and convert it to a palette-based image $im = imagecreatefrompng('figures/imagecolorclosest.png'); imagetruecolortopalette($im, false, 255); // Search colors (RGB) $colors = array( array(254, 145, 154, 50), array(153, 145, 188, 127), array(153, 90, 145, 0), array(255, 137, 92, 84) ); // Loop through each search and find the closest color in the palette. // Return the search number, the search RGB and the converted RGB match foreach($colors as $id => $rgb) { $result = imagecolorclosestalpha($im, $rgb[0], $rgb[1], $rgb[2], $rgb[3]); $result = imagecolorsforindex($im, $result); $result = "({$result['red']}, {$result['green']}, {$result['blue']}, {$result['alpha']})"; echo "#$id: Search ($rgb[0], $rgb[1], $rgb[2], $rgb[3]); Closest match: $result. "; } imagedestroy($im); ?> The above example will output something similar to: #0: Search (254, 145, 154, 50); Closest match: (252, 150, 148, 0). #1: Search (153, 145, 188, 127); Closest match: (148, 150, 196, 0). #2: Search (153, 90, 145, 0); Closest match: (148, 90, 156, 0). #3: Search (255, 137, 92, 84); Closest match: (252, 150, 92, 0). NOTES
Note This function requires GD 2.0.1 or later (2.0.28 or later is recommended). SEE ALSO
imagecolorexactalpha(3), imagecolorclosest(3), imagecolorclosesthwb(3). PHP Documentation Group IMAGECOLORCLOSESTALPHA(3)
All times are GMT -4. The time now is 06:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy