Have you ever wanted people to look at random things, just by repeatedly clicking a link in their browser bar? Well, good news! If you have an internet browser, a web server, and the ability to type, then you can send people places!

Randm™ is a PHP script that simply sends people from one page to another. That’s not the fun part. The fun part is gathering a bunch of links to waste people’s precious time.

So while they could be curing cancer or feeding the hungry, they’ll be messing around the interwebs. Great fun! It’s like StumbeUpon for the rest of us™.

See an example of this at Randm™ (drag it to your Bookmarks bar)

Setup

Download this: Randm.zip

Make sure you have all the files from the download:

  1. random.php
  2. urls.txt
  3. count.txt
  4. random-display.php

You don’t really need random–display.php as it’s more of a stat–junkie diversion. But the other three are how the things works, so you have to have them.

Step 1: Open urls.txt and put in the sites you want to send people to. It can be on your own server, or anywhere (my example send you to some of my wittier tweets on Twitter). You MUST put one url per line, with no empty lines. If the script doesn’t work, try looking for extra spaces. Save that file and go to Step 2.

Step 2: Upload the random.php and the two text files to a folder that’s writable by your server (it’ll probably do that anyways in case you have no idea what you’re doing). The text files need to be writable as well.

Step 3: Click the link to where you put the random.php file on your server (http://yourawesomesite.com/random.php) and watch the magic happen. The script is pretty darn simple, so magic should happen. If magic does not happen for some reason, tell me about it.

Step 4: Post a link on your site that entices people to indulge in your random wares. Use this code and tell them to drag it to their bookmarks bar:

<a href="http://yourawesomesite.com/random.php"
title="My awesomeness">My awesomeness</a>

That’s it. Now go my younglings, be Internet Famous!

Tips

As an example, I set up a link to send you to my incredibly self-centered Twitter ramblings. Other ways you can use this are:

  1. Send people to a random popular post on your site. Showcase your best stuff in a blind draw.
  2. Use it to link to funny YouTube videos. People love YouTube, and they obviously have no concern for their time…they are looking at videos on YouTube. C’mon!
  3. Shake up your creativity by linking to random design ideas. Random inspiration, FTW!
  4. Places you should visit. Remind us that there’s a big old world out there, waiting to be explored.
  5. Anything else? Tell me about it. I’d love to hear how you’re using this.

Random Stats Display

Since I am perpetually addicted to statistics, I wanted to see how many times my link got clicked. I came up with a very (very) simple script that will tell you the number of times the random.php page loads. The count.txt file will contain just a number, and you can include that number into any PHP page with this:

<?php include "count.txt"; ?>

Purtified up it looks something like this:

This link has been clicked 205 times

Note: you can’t stick it in a blog post without special setting or plugins. It will work inside the code of a page, however.

FAQ (Frequently Asked Questions)

Can I use this on Blogger (blogspot.com)?

Nope. It needs PHP to work, and Blogger doesn’t use PHP.

Can I use this with WordPress?

Yes. You can use this with the self–hosted version of WordPress that comes from WordPress.org that you install on your own server, but not the hosted version (WordPress.com). They don’t allow PHP uploads to their service.

Are you available for parties, bat mitzvahs, weddings?

I am currently not taking any more engagements until I can clear up more time in my schedule. I should be taking dates starting in the first quarter of ‘09.

How do I…?

Ask and you shall receive.

status: published
lastmod: '2009-01-10T02:23:22.000Z'
excerpt: 'This link has been clicked **205** times (okay, not *this* link, but I explain what that means)'
author: meadowhill login
cms: textpattern
custom:
  section: d