Hey guys and gals,
I often thought about a random tease button or script to include either in a session or an online tease or even a forum tease.
So I just got an idea how to solve this, as there isnt a random function on milovana itself :)
I just did a short php-code with test a maximum of 50000 teases. Right now there are almost 30000 teases so the script should work for some time.
All you have to do is either copy the script onto your local webserver or upload it somewhere, where you can run a php script.
- Spoiler: show
Code: Select all
<?php$num_teases = 50000;$searchString1 = 'Sorry. The requested tease could not be displayed.';$searchString2 = 'The requested tease could not be found in our database';$searchString3 = 'The requested tease has been removed';$hit = false;while($hit == false){ $test = rand(1,$num_teases); $content = file_get_contents("http://www.milovana.com/webteases/showtease.php?id=".$test); if( !strpos( $content, $searchString1 ) && !strpos( $content, $searchString2 ) && !strpos( $content, $searchString3 ) ){ $hit = true; }}header('Location: http://www.milovana.com/webteases/showtease.php?id='. $test); ?>
This script is still beta and it took me like 15 mins to write. So please tell me if you find any bugs.
I'd also like the milovana team to add this script. Just replace the 50000 with you current maximum of teases.