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
IMAGECOLORCLOSEST(3)							 1						      IMAGECOLORCLOSEST(3)

imagecolorclosest - Get the index of the closest color to the specified color

SYNOPSIS
int imagecolorclosest (resource $image, int $red, int $green, int $blue) DESCRIPTION
Returns the index of the color in the palette of the image which is "closest" to the specified RGB value. The "distance" between the desired color and each color in the palette is calculated as if the RGB values represented points in three- dimensional space. If you created the image from a file, only colors used in the image are resolved. Colors present only in the palette are not resolved. 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. 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 of the image, to the specified one 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), array(153, 145, 188), array(153, 90, 145), array(255, 137, 92) ); // 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 = imagecolorclosest($im, $rgb[0], $rgb[1], $rgb[2]); $result = imagecolorsforindex($im, $result); $result = "({$result['red']}, {$result['green']}, {$result['blue']})"; echo "#$id: Search ($rgb[0], $rgb[1], $rgb[2]); Closest match: $result. "; } imagedestroy($im); ?> The above example will output something similar to: #0: Search (254, 145, 154); Closest match: (252, 150, 148). #1: Search (153, 145, 188); Closest match: (148, 150, 196). #2: Search (153, 90, 145); Closest match: (148, 90, 156). #3: Search (255, 137, 92); Closest match: (252, 150, 92). SEE ALSO
imagecolorexact(3), imagecolorclosestalpha(3), imagecolorclosesthwb(3). PHP Documentation Group IMAGECOLORCLOSEST(3)
All times are GMT -4. The time now is 07:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy