PHP/JAVA/HTML/FLASH SCRIPT DUDES, HELP A PERFECTION OUT. (please)

they likely don't allow any javascript in there.. so.. if you have a host somewhere, you could link to a page on that, then redirect to a random post on cfc from there

figuring out a random post link should be easy - and you can get a free php host too, probably

you'd need to figure out the max post # on here.. somehow.. i'm not sure how you'd get that, actually
you could wing it by having a static # for that

then do a random number from 1 to x
then just redirect to http://forums.civfanatics.com/showpost.php?p=<?=x?>

or whatever proper php syntax is

excuse the brainstorm-like nature of this post, but i'm exhausted
 


Here is some sample code:

Random post from a selection of posts
PHP:
<?php
$allowed_posts = array(42, 37, 68, 200000, 102300) /* Replace numbers with wanted posts */
$chosen_post = $allowed_threads[rand(0, sizeof($allowed_posts) -1)];
$location = "http://forums.civfanatics.com/showpost.php?p=" . $chosen_post;
header("Location: " . $location);
?>
Random post from CFC (note, may be invalid if it picks a deleted or moved post)
PHP:
<?php
$chosen_post = rand(0, 290701); /* Change the second number to a new post's id - 1 every so often to include all posts */
$location = "http://forums.civfanatics.com/showpost.php?p=" . $chosen_post;
header("Location: " . $location);
?>

Pick the code you want. Get a free host that allows PHP. Upload one of these scripts and save it as filename.php then link to that in your sig.

note: These aren't tested, just something I threw together in 5 minutes, so there may be problems.

 
nice, that's exactly what i had in mind ;)

next i command you to write.. a queue built using a doubly linked list!

And chop down the tallest tree in the forest...

Spoiler :
WITH A HERRING!
knight.png
 
Back
Top Bottom