alt

My menu bar is permanently not visible in Internet Explorer 7, how do I get it back?

Tue, 2007-04-03 16:27 - Topics:

I have a new computer with Windows Vista, so I can't uninstall and reinstall Internet Explorer 7. When I press ALT in Internet Explorer, the menu bar doesn't show up.

is there a key stroke to open aero glass? alt tab doesn't do it

Thu, 2007-03-22 18:49 - Topics:

would like to get to the area where the shortcut in the quick launch bar takes me. the switch between windows view

The perils of a digital life

Thu, 2007-02-08 15:25 - Topics:

In the past year users of Second Life have had to deal with such nuisances as CopyBot, CampBots, SheepBots, grey goo, and alt instances. Perhaps digital life is not all that it's cracked up to be.

SecurityPlus for MDaemon (exe)

Tue, 2006-12-19 03:00 - Topics:

Alt-N SecurityPlus for MDaemon provides the next generation of antivirus and spam protection for your MDaemon email server. Providing real-time spam and Zero Hour Virus Outbreak Protection from Commtouch, and email antivirus protection from Kaspersky Labs, it is the number one solution for safeguarding your MDaemon email server.

Random Image Script

Mon, 2006-12-18 01:34 - Topics:

clipped by: hardian

Clip Source: photomatt.net

This is your standard random image script that takes a slightly different approach than most, namely using standard HTTP headers instead of reading the file through the script.

For the simplest possible installation, just drop this code in a directory with the images you want to rotate, and call it like you would a normal image, for example:

<img src="http://photomatt.net/dropbox/2003/rotate/rotate.php" alt="A Random Image" />

Installation/Usage

Code

A Rotator Apart

<?php
/*
    By Matt Mullenweg > http://photomatt.net
    Inspired by Dan Benjamin > http://hiveware.com/imagerotator.php
    Latest version always at:
    http://photomatt.net/scripts/randomimage
*/

// Make this the relative path to the images, like "../img" or "random/images/".
// If the images are in the same directory, leave it blank.
$folder = '';

// Space seperated list of extensions, you probably won't have to change this.
$exts = 'jpg jpeg png gif';

$files = array(); $i = -1; // Initialize some variables
if ('' == $folder) $folder = './';
$handle = opendir($folder);
$exts = explode(' ', $exts);
while (false !== ($file = readdir($handle))) {
    foreach($exts as $ext) { // for each extension check the extension
        if (preg_match('/\.'.$ext.'$/i', $file, $test)) { // faster than ereg, case insensitive
            $files[] = $file; // it's good
            ++$i;
            }
        }
    }
closedir($handle); // We're not using it anymore
mt_srand((double)microtime()*1000000); // seed for PHP < 4.2
$rand = mt_rand(0, $i); // $i was incremented as we went along
header('Location: '.$folder.$files[$rand]); // Voila!
?>

Notes

For additional information about the thinking behind this script, see A Better Image Rotator.

  • Ondra
    17.04.2006 @ 11:11 am

    Nice code, thanks.

    I suggest you put the next two lines just before the last line:
    header(”Cache-Control: no-cache, must-revalidate”); // HTTP/1.1
    header(”Expires: Mon, 26 Jul 1997 05:00:00 GMT”);

    This will prevent the browser and/or the cache-server to cache the images. Otherwise the randomness is pretty poor.


  • Infopirate.org - You Share Your Bookmarks, We Share Our Revenue.
    We think that you should make money with your bookmarks, not us. Register, add your AdsenseID and 80% of the revenue your bookmarks make is yours.
    Imprint - Privacy Policy - Contact.
    Syndicate content