• 0

Randomizing sig pictures?


Question

Recommended Posts

  • 0

yeah...i don't get it either.

ah well...what i got works for my needs...

On another note...anyone got an idea where i can pick a sig based on the time, not on a random number?

I'd like to take the current time and throw it through a hash function with the output being a number 1 through x...

Basically, how do I set a PHP variable equal to the current time as a number, not a string?? Is that possible?

  • 0

Ok, well I got it now. I wrote a script that increments my sig once every 5 minutes. This way I can coordinate my avatars with my sigs so they always match :D

Here's the code for anyone who may be interested in something similar:

<?php 

Header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); 
Header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); 
Header("Pragma: no-cache"); 
Header("Content-Type: image/gif");

//Get current time (seconds since 01/01/1970 12:00am) and divide by 300 (convert from seconds to '5-minute' increments
$seed = time()/300;

//Take the seed and get the remainder from dividing it by 14 (the number of sigs I have) and then add 1 to get 1-14 instead of 0-13
$n = ($seed%14) + 1;

//This part is pretty specific to where your sigs are and how you named them. ?It's best if you name them using numbers...that's the easiest way.
if($n < 10) {
header("Location: http://eecs.cwru.edu/~jwa4/design/Assets/Images/Banners/b0".$n.".gif");
}
else header("Location: http://eecs.cwru.edu/~jwa4/design/Assets/Images/Banners/b".$n.".gif");

?>

So this code will simply increment $n from 1-14 and then back to 1 every 300 seconds, or 5 minutes.

the interval can be changed to anything you want...from 1 second to a year if you want....and as long as you name your sigs with numbers, than you can make this work for any number of sigs (or avatars) you want.:DD

Edited by Jack31081
  • 0

I've used this plain jane one clicky by white rabbit.

Hey Jack..instead of a timed one, I have always wanted one that could synchronize the sig and av so I could have rotating "sets"..that would be cool.

heheh I know..so would a self refilling bottle of beer :)

btw: Silly..did yah ever get that upload script workin?

  • 0

Blaise, that's exactly what I have.

I have one script that picks my sig, and one that picks my avatar. my sigs are named b01.gif - b14.gif and my avatars are a01.gif - a14.gif. a01 goes with b01 and so on. The two scripts are the same so my sig and avatar are always paired up...and each changes every 5 minutes.

:yes:

  • 0
Blaise, that's exactly what I have.

I have one script that picks my sig, and one that picks my avatar. my sigs are named b01.gif - b14.gif and my avatars are a01.gif - a14.gif. a01 goes with b01 and so on. The two scripts are the same so my sig and avatar are always paired up...and each changes every 5 minutes.

:yes:

I like yours, do you mind if I give it a try?

  • 0
Yes, thank you. I just don't know how to prevent people from overwriting pics already uploaded, so I haven't released the URL.

:o

oh cr@p! I forgot about that, I've been using that simple one, since the one that allows users to make their own accounts is buggy (keeps asking them to authenticate over & over).

/me puts notice for folks to tag files with their username

Thanks cuz :)

Oh..Jack..thanks for the info and for sharin, I have load of old neobits/bytes sig avs I want to use

but didn't since I couldn't synch em (Y)

  • 0
Yes, thank you. I just don't know how to prevent people from overwriting pics already uploaded, so I haven't released the URL.

Looks like you're writing/have written a script that allows people to upload images to a server of yours?

If you're trying to keep each user's images separate so people don't go overwriting existing images, let me know...I may be able to help you out on that front, assuming that you're using a MySQL database to store image info. That's the only way I could think of to keep user's images separate from one another...

  • 0
Looks like you're writing/have written a script that allows people to upload images to a server of yours?

If you're trying to keep each user's images separate so people don't go overwriting existing images, let me know...I may be able to help you out on that front, assuming that you're using a MySQL database to store image info. That's the only way I could think of to keep user's images separate from one another...

I got the script from Blaise, who got it from somewhere else. :D

See script:

<html>

<head>

<title>Upload Status</title>

<body text="#000000" link="#000000" vlink="#000000" alink="#000000" leftmargin="0"

topmargin="0" marginwidth="0" marginheight="0">

<?

/*

+--------------------------------------------------------------------------

| SIGUP.COM UPLOADER SCRIPT

| ========================================

| by Marc Perkel (extreme)

| © 2002,2003,extreme design group

| http://www.sigup.com

| ========================================

| Web: http://www.sigup.com

| Email: [email protected]

+---------------------------------------------------------------------------

|

| > Uploader script

| > Script written by Marc Perkel

| > Date started: 2nd of December 2002

|

+--------------------------------------------------------------------------

*/

if ($superdat_name != "") {

copy("$superdat", "/usr/local/www/data/members/crissabl/silly_walk/sigup/images/$superdat_name") or

die("There has been an error while trying to upload, contact the webmaster");

} else {

    die("You did not select an image.");

}

mail("[email protected]", "Somone uploaded an image",

"$email sent $superdat_name, a $superdat_size byte file with a MIME type of $superdat_type");

?>

<!--Header/Logo-->

<p align="center"><font face="Verdana">Image Preview:</font></p>

<p align=center><a href="http://www.securenet.net/members/crissabl/silly_walk/sigup/images/<? echo "$superdat_name"; ?>"<font face="Verdana"><img SRC="http://www.securenet.net/members/crissabl/silly_walk/sigup/images/<? echo "$superdat_name"; ?>" ALT="Uploaded Image"></font></a></p>

<p align=center><font face="Verdana">Image URL: <a href="http://www.securenet.net/members/crissabl/silly_walk/sigup/images/<? echo "$superdat_name"; ?>">http://www.securenet.net/members/crissabl/silly_walk/sigup/images/<? echo "$superdat_name"; ?></a>.</font></p>

<p align="center">

<br>

<p> 

<table width="100%" border="1" cellspacing="0" cellpadding="1" bgcolor="#FFFFFF"

bordercolor="#333333" valign="bottom">

<tr>

<td><b><font face="Verdana" size="1" color="#CCCCCC"><p align="center"><a

href="http://sigup.com" target="_blank">Upload Script Copyright 2003 Extreme Design

Group. All rights reserved.</font></b> </a></td>

</td>

</tr>

</table>

</body>

</html>

Problem is, you have to CHMOD the directory to full access, and anyone can use the same filename and overwrite an older image.

  • 0

well the first thing that comes to mind is to have each person that wants to use this system log in w/ a user/pass (registration is free of course). The whenever a user uploads a file, have the script append the user's username to the front of the filename, if that's possible.

Of course, you'd need to have mysql installed on the server for this to work, but that shouldn't be that tough to do.

**EDIT** Or only give them access to a subfolder with there username in it...then they can only access and overwrite their own files.

it's an idea.

  • 0

Well, off the top of my head...

the time() function in PHP returns the number of seconds since mindnight, 01/01/1970. If you knew the number of seconds from then to the point you want to countdown to, then all you have to do is subtract time() from that amount...as you get closer to that time, time() returns a larger and larger number and your result gets smaller and smaller, hitting zero at the time you specified.

Once you have a variable with the number of seconds between now and the time you're counting down to, it's a simple matter to split that up into days, hours, minutes and use each of those values to either display directly to the screen...

However, I don't know how Bxboy does it with a picture. You'd have to ask him.

  • 0

Jack,

This is the one I wanted to use, I set up the mysql and tables etc..all seemed to work ..for me.

but in IE it keeps asking you to select an image type, even after you already have.

Also some people would be asked over and over to supply there creds..after successfully creating an account. Tis why I dropped the link to it and use the simple one.

Here's the url: http://blaise.us/pogouploader/uploader.php

Try to create an account, you'll see what I'm talkin about :cry:

I attached the php, the code is way too long to post.

uploader.php

uploader.php

  • 0

Ok. Well the first thing I see, which may explain why users keep getting asked for their creds, is a lack of cookies or sessions. How are you keeping the user's info stored from page load to page load?

Other than that, it worked fine for me.

Lot's o' PHP...I'll keep looking through it.

  • 0
Ok.  Well the first thing I see, which may explain why users keep getting asked for their creds, is a lack of cookies or sessions.  How are you keeping the user's info stored from page load to page load?

lol...oops!

I did not even think that through, just, setup the mysql ran the install.php and gave no thought whatever to cookies.

/me eyes copy of php bible warily and guiltily, laying underneath an unopened mysql manual :blush:

I attached the complete package that came with the script incl the readme.

Thanks for your input so far man, its appreciated (Y)

full.zip

full.zip

  • 0

I just wanted everyone to know that I've put my version of both a random signature generator and a time-interval based signature 'cycler' on my website (click my sig, go to 'web.design.stuff').

So if anyone wants to use it, that's where it is.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • In what way is any of what I said incorrect? To install an update you need to close all browser instances, upping it from once a month to once a fortnight is an inconvenience for users. Particularly when updates don't offer functionality that users want (notably copilot). Security updates should come as they are needed, not on a release schedule
    • Dopamine 3.0.6 by Razvan Serea Dopamine is an awesome free audio player which tries to make organizing and listening to music as simple and pretty as possible. Dopamine has been designed for Windows 7, Windows 8.x and Windows 10 and plays mp3, ogg vorbis, flac, wma and m4a/aac music formats quite well. The best part? It's created by long-time Neowin member, Raphaël Godart. If you’re looking for a music player to handle a large music collection, you should definitely give Dopamine a try. Dopamine 3.0.6 changelog: Fixed Manually edited album covers are overwritten on the next collection refresh Fixed AppImage package not working on modern GNU/Linux distributions Deleting song from playlist sometimes fails Playback controls only work when clicking on upper half of the buttons It's unclear that files must be tagged with an external ReplayGain scanner (for example rsgain) before normalization can take effect. Change to Artist or Album tags is not reflected in the song list view nor in the Now Playing information ReplayGain issues Smart playlist filters ignore text containing accents or other special characters Some MP3 files trigger an "MPEG header not found" error due to a too-narrow initial MPEG header scan range Changed Updated the Vietnamese translation Download: Dopamine 3.0.6 | 122.0 MB (Open Source) Links: Home Page | Forum Discussion | Screenshot | Other OSes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • BleachBit 6.0.1 Beta by Razvan Serea When your computer is getting full, BleachBit quickly frees disk space. When your information is only your business, BleachBit guards your privacy. With BleachBit you can free cache, delete cookies, clear Internet history, shred temporary files, delete logs, and discard junk you didn't know was there. Designed for Linux and Windows systems, it wipes clean thousands of applications including Firefox, Microsoft Edge, Google Chrome, Opera, Safari, and more. Beyond simply deleting files, BleachBit includes advanced features such as shredding files to prevent recovery, wiping free disk space to hide traces of files deleted by other applications, and vacuuming Firefox to make it faster. Better than free, BleachBit is open source. BleachBit has many useful features: Delete your private files so completely that "even God can't read them" according to South Carolina Representative Trey Gowdy. Simple operation: read the descriptions, check the boxes you want, click preview, and click delete. Multi-platform: Linux and Windows Free of charge and no money trail Free to share, learn, and modify (open source) No adware, spyware, malware, browser toolbars, or "value-added software" Translated to 64 languages besides American English Shred files to hide their contents and prevent data recovery Shred any file (such as a spreadsheet on your desktop) Overwrite free disk space to hide previously deleted files Portable app for Windows: run without installation Command line interface for scripting and automation CleanerML allows anyone to write a new cleaner using XML Automatically import and update winapp2.ini cleaner files (a separate download) giving Windows users access to 2500+ additional cleaners Frequent software updates with new features Going beyond standard deletion of files, BleachBit has several advanced cleaners: Clear the memory and swap on Linux Delete broken shortcuts on Linux Delete the Firefox URL history without deleting the whole file—with optional shredding Delete Linux localizations: delete languages you don't use. More powerful than localepurge and available on more Linux distributions. Clean APT for Debian, Ubuntu, Kubuntu, Xubuntu, and Linux Mint Find widely-scattered junk such as Thumbs.db and .DS_Store files. Execute yum clean for CentOS, Fedora, and Red Hat to remove cached package data Delete Windows registry keys—often where MRU (most recently used) lists are stored Delete the OpenOffice.org recent documents list without deleting the whole Common.xcu file Overwrite free disk space to hide previously files Vacuum Firefox, Google Chrome, Liferea, Thunderbird, and Yum databases: shrink files without removing data to save space and improve speed Surgically remove private information from .ini and JSON configuration files and SQLite3 databases without deleting the whole file Overwrite data in SQLite3 before deleting it to prevent recovery (optional) BleachBit 6.0.1 Beta release notes: BleachBit 6.0.1 beta is now available for testing. This maintenance-focused release includes bug fixes, updated translations, and a range of safe enhancements. This release fixes a Windows security issue that could allow arbitrary file deletion during privileged cleaning (reported by Zeze with TeamT5). It also adds new cleaners (including a DNS cache cleaner, Claude Code, and Visual Studio Code forks), support for multiple Chrome and Edge profiles, new deep scan options for developer directories like node_modules and venv, and safer, faster file shredding. All Platforms Added cleaners for Claude Code, DNS cache, and many Visual Studio Code forks. Added support for multiple Chrome and Edge profiles. Chrome can now clean downloaded AI models. Deep Scan can optionally remove venv, __pycache__, node_modules, and .angular directories. Deep Scan is faster by skipping directories on the keep list. File shredding is safer, faster, and leaves fewer recoverable traces. Improved handling of cookies, symlinks, Unicode filenames, external processes, and configuration files. Improved Expert Mode warnings and long warning dialogs. Fixed crashes related to cleaner detection, invalid Unicode, and malformed cleaner data. Clipboard is now cleared automatically after shredding files via paste operations. Linux Added AppImage support. Added cleaners for Visual Studio Code, Codeium, Librewolf (.deb), Transmission (Flatpak), and Profanity. Improved Linux trash detection, including Snap-installed applications and mounted drives. Fixed Wayland root CLI issues and several Snap-related problems. Improved package dependencies, AppStream metadata, and desktop file handling. Fixed startup crashes when Python Requests is unavailable. Windows Fixed a security vulnerability that could allow arbitrary file deletion when cleaning with elevated privileges. Added %WindowsSystem% variable support. Improved clipboard clearing using native Windows APIs. Improved installer experience on unsupported Windows versions. Reduced installer size and improved application robustness. Fixed Unicode handling, filename anonymization, Git revision reporting, and splash screen stability. [full release notes] Download: BleachBit 6.0 | Portable | ~20.0 MB (Open Source) View: BleachBit Home page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • One Month Later
      AndreaB earned a badge
      One Month Later
    • One Month Later
      agatameier earned a badge
      One Month Later
    • Week One Done
      agatameier earned a badge
      Week One Done
    • Week One Done
      ssd21345 earned a badge
      Week One Done
    • Contributor
      MarkHughes4096 went up a rank
      Contributor
  • Popular Contributors

    1. 1
      +primortal
      516
    2. 2
      +Edouard
      193
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      96
    5. 5
      Steven P.
      77
  • Tell a friend

    Love Neowin? Tell a friend!