• 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

    • Ocenaudio 3.19.3 by Razvan Serea  Ocenaudio is a full featured, fast and easy to use audio and music editor. It is the ideal software for people who need to edit and analyze audio files without complications. Ocenaudio also has powerful features that will please more advanced users. To assist ocenaudio development, a powerful toolset of audio editing, analysis and manipulation called Ocen Framework was created. ocenaudio is also based on Qt framework, a well known library for cross-platform development. Cross-platform support ocenaudio is available for all major operating systems: Microsoft Windows, Mac OS X and Linux. Native applications are generated for each platform from a common source, in order to achieve excelent performance and seamless integration with the operating system. All versions of ocenaudio have a uniform set of features and the same graphical interface, so the skills you learn in one platform can be used in the others. VST plugins support Ocenaudio supports VST (Virtual Studio Technology) plugins, giving its users access to numerous effects. Like the native effects, VST effects can use real-time preview to aide configuration. Real-time preview of effects Applying effects such as EQ, gain and filtering is an important part of audio editing. However, it is very tricky to get the desired result by adjusting the controls configuration alone: you must listen the processed audio. To ease the configuration of audio effects, ocenaudio has a real time preview feature: you hear the processed signal while adjusting the controls. The effect configuration window also includes a miniature view of the selected audio signal. You can navigate on this miniature view in the same way as you do on the main interface, selecting parts that interest you and listening to the effect result in real time. Multiselection for delicate editions To speed up complex audio files editing, ocenaudio includes multi-selection. With this amazing tool, you can simultaneously select different portions of an audio file and listen, edit or even apply an effect to them. For example, if you want to normalize only the excerpts of an interview where the interviewee is talking, just select them and apply the effect. Eficient edition of large files With ocenaudio, there is no limit to the length or the quantity of the audio files you can edit. Using an advanced memory management system, the application keeps your files open without wasting any of your computer's memory. Even in files several hours long, common editing operations such as copy, cut or paste happen almost instantly. Fully featured spectrogram Besides offering an incredible waveform view of your audio files, ocenaudio has a powerful and complete spectrogram view. In this view, you can analyze the spectral content of your audio signal with maximum clarity. Advanced users will be surprised to find that the spectrogram settings are applied in real time. The display is updated immediately when altering features such as the number of frequency bands, window type and size and dynamic range of the display. Ocenaudio 3.19.3 changelog: Fixes issues with MP4 files with more than 8 channels Fixes incorrect VBR detection for some CBR MP3 files Other bug fixes and improvements Download: Ocenaudio 64-bit | Portable | ~40.0 MB (Freeware) Download: Ocenaudio for Linux and Mac OS View: Ocenaudio Homepage | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • DiskGenius 6.2.0.1829 - All Versions: Free, Lite & Portable by Razvan Serea DiskGenius is a full-featured partition manager, which is designed to optimize disk usage for Windows users. It will efficiently help you recover lost data, resize/split partition, backup files, edit hex data, check bad sectors, manage virtual disks, erase data, etc.. Create a system image backup for current Windows with simple clicks to keep the operating system under protection. DiskGenius key features: Partition Management - It can create format, resize, extend, backup, split, hide and clone partition, both MBR and GPT are supported. Disk and partition conversion - Convert dynamic disk to basic, convert virtual disk format and convert MBR to GPT, convert primary partition to logical. File recovery - It can recover files deleted or emptied form recycle bin, recover files from damaged partition or disk and recover files by file type and supports file preview and file filter. Partition recovery - It is the best partition recovery program in that it can recover files from damaged, corrupted and RAW partitions, search for lost partition and recover files from it, besides, it can fix partition table. RAID recovery - It can reconstruct Virtual RAID and recover files from it, and all RAID types are supported. Sector Editor - A Hex editor is embedded to help users edit raw hex data and recover data manually. Backup and Restore - It can backup and restore partition including system partition, hard disk and partition table. Bad Tracks - It can check and repair bad sectors for all storage devices; check hard disk S.M.A.R.T. information. Delete files permanently - It can delete files permanently so that they can't be recovered by any data recovery software. Virtual Disk - It supports virtual disks, including VMware, Virtual PC and Virtual Box. Create WinPE bootable disk and you can manage disk partition when system crashes or there is no operating system on your computer. Support FAT12/FAT16/FAt32/exFAT/NTFS/EXT2/EXT3/EXT4 file system format. DiskGenius 6.2.0.1829 changelog: Add the "Disk Speed Test" feature. Add the "Windows Boot Repair and Conversion" feature. Add the BMB21-2019 erase standard to the "Erase Sectors" feature. Add support for restoring an individual partition from a PMFX disk image file. Enhanced The "Verify Or Repair Bad Sectors/Blocks" feature displays disk read speed in the detection window during scanning. The "Quick Partition" dialog box allows users to quickly select the number of partitions by pressing the numeric keys 1, 2, 7, 8, or 9. The "Set Volume Name" dialog box supports selecting preset volume labels provided by the software. The "Copy Sectors" feature supports resuming copy tasks after modifying the number of skipped bad sectors. Add the "TRIM Optimization" option to the format dialog box. The "Clone Partition" and "Clone Disk" features perform TRIM optimization on target partitions or disks before cloning. Add support for Not Equal To search conditions (prefixed with "!") when searching hexadecimal data in the sector editor. Optimize the display of capacity values in the program interface to show two decimal places. Add a minimize button to dialogs that may require long processing time. Enhance support for the ReFS file system. Enhance support for newer HIF and MP4 formats when recovering files by type. Enhance support for the EXT4 file system. Enhance compatibility of the "File Recovery" feature with special data structures. Fixed Fixed the issue that the selected file system type automatically reverted to NTFS after changing it to exFAT or EXT4 in the "Quick Partition" dialog box. Fixed inaccurate Unicode string search results in the "Sector Editor" feature. Fixed the issue that exceptions might occur when adding multiple disks in the "Erase Sectors" feature. Fixed the issue that insufficient target disk space was incorrectly reported in some cases when cloning, backing up, or restoring disks. Fixed the issue that folder modification timestamps were not preserved when copying files from ReFS partitions. Fixed the issue that Excel-format reports generated by features such as file copying or bad sector checking could not be opened when the report contained more than one million rows. Fixed the issue that folders were not displayed in the exclude-folder dialog box when backing up partitions to image files. Fixed the issue that the "Erase Sectors" feature could not be executed in some cases. Download: DiskGenius 6.2.0.1829 | 63.9 MB (Freeware, paid upgrade available) Download: DiskGenius Portable 64-bit | 40.0 MB Download: DiskGenius Portable 32-bit | 36.0 MB Download: DiskGenius Lite 64-bit | 13.4 MB Download: DiskGenius Lite 32-bit | 11.6 MB View: DiskGenius Home Page | DiskGenius Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Really? Use a better search engine https://www.google.com/search?...ourceid=chrome&ie=UTF-8
    • Seems like Neowin has transitioned into being simps for the white house. I can't find a review for the last UFC games that came out.
  • Recent Achievements

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

    1. 1
      +primortal
      513
    2. 2
      +Edouard
      182
    3. 3
      PsYcHoKiLLa
      143
    4. 4
      ATLien_0
      95
    5. 5
      Steven P.
      74
  • Tell a friend

    Love Neowin? Tell a friend!