PDA

View Full Version : Behold the Magic Ape Ball! (The Predict the Last Post Game)


bug24
04-21-2009, 08:43 PM
Gentlemen! Behold! The magic Ape Ball will predict the last post of this thread! It is never wrong! See if you can prove it wrong!

http://gusto.ulmb.com/8pbal/apeball.php?t=83804

Nasty Boy
04-21-2009, 08:49 PM
The Cubs will NEVER win a World Series, no way it could have predicted that...

AZRIEL
04-21-2009, 08:53 PM
http://i.pbase.com/o6/21/14321/1/77580343.yLwXrKpr.funnylittleamazingthing.gif

Nasty Boy
04-21-2009, 08:59 PM
??? no picture, did not show up.

bug24
04-21-2009, 09:02 PM
??? no picture, did not show up.


He posted this.


<!-- message -->
<div id="post_message_1762565">

<div align="center"><img src="http://i.pbase.com/o6/21/14321/1/77580343.yLwXrKpr.funnylittleamazingthing.gif" border="0" alt="" /><br />
</div>
</div>
<!-- / message -->

AZRIEL
04-21-2009, 10:16 PM
http://www.punkz0rz.com/Gallery/albums/Animated%20GIFs/Funny/buttdrive9uo.gif

krissy'shot
04-21-2009, 10:24 PM
634449

AZRIEL
04-21-2009, 10:26 PM
http://assets.sbnation.com/assets/76499/mo_cutter.gif

krissy'shot
04-21-2009, 10:40 PM
http://i724.photobucket.com/albums/ww249/kdt723/farside1-1.jpg

rcarson13@yahoo.com
04-21-2009, 11:27 PM
That's pretty shitty, K!

PatronofPorn
04-21-2009, 11:29 PM
Wow.

hedonism96
04-22-2009, 02:10 AM
Gentlemen! Behold! The magic Ape Ball will predict the last post of this thread! It is never wrong! See if you can prove it wrong!

http://gusto.ulmb.com/8pbal/apeball.php?t=83804
Hmm, this is a prediction?

mesosmoker
04-22-2009, 02:11 AM
Ha! It says the last post! Not the last poster!

Empress Lainie
04-22-2009, 05:04 AM
WELL THE LAST POST THEN SHOULD BE A NUMBER. i WILL BET 43:rose::rose:

bug24
04-22-2009, 09:48 PM
WELL THE LAST POST THEN SHOULD BE A NUMBER. i WILL BET 43:rose::rose:

I can make it predict that too.

Nasty Boy
04-22-2009, 09:54 PM
I predict that the ape ball will be wrong!!!

bug24
04-23-2009, 01:24 AM
Ok, now it predicts numbers too. Rep me nao!

AZRIEL
04-23-2009, 02:52 AM
http://i30.tinypic.com/sbh6vs.jpg

hedonism96
04-23-2009, 02:58 AM
http://i30.tinypic.com/sbh6vs.jpg



You harsh bastard, you could at least say something nice about it like how clever it was for him/it/ her to program the stupid thing ;)

bug24
04-23-2009, 03:04 AM
You harsh bastard, you could at least say something nice about it like how clever it was for him/it/ her to program the stupid thing ;)

You are very perceptive. I was beginning to think that people suspect me changing it manually, but you are right it's totally automated.

MY SOURCE \/
<?php

if(isset($_GET['t']))
$url = "http://forum.xnxx.com/showthread.php?t=".$_GET['t'];
else
die("no topic declared");

function getStringBetween($start, $end, $string){
$strStart = strpos($string, $start) + strlen($start);
$strEnd = strpos($string, $end) - $strStart;
return substr($string, $strStart, $strEnd);
}
function curl($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec ($ch);
curl_close ($ch);

return $result;
}

function returnLastName($url){
$result = curl($url);
$pages = getStringBetween("<!-- controls above postbits -->", "<!-- / controls above postbits -->", $result);

if(preg_match("/(Page [0-9]{1,9} of )([0-9]{1,9})/", $pages, $regs)){
$last_page = $regs[2];
$result = curl($url."&page=".$last_page);
}else{
$last_page = 1;
}
//echo $last_page;

preg_match_all("/(<a class=\"bigusername\" href=\"member\.php\?s=.{1,99}\"\>)(.{1,99})(<\/a\>)/", $result, $name);
preg_match_all("/(<a href=\"showpost\.php\?s=.{1,99}\" target=\"new\" rel=\"nofollow\" id=\"postcount[0-9]{1,12}\" name=\"[0-9]{1,4}\"><strong>)([0-9]{1,4})(<\/strong><\/a>)/", $result, $number);

//print_r($number);
//die($result);


$list = (isset($number[2][sizeof($number[2])-3]))? "#".$number[2][sizeof($number[2])-3]." ".$name[2][sizeof($name[2])-3]."\n" : "? \n";
$list = (isset($number[2][sizeof($number[2])-2]))? $list."#".$number[2][sizeof($number[2])-2]." ".$name[2][sizeof($name[2])-2]."\n" : $list."? \n";
$list = (isset($number[2][sizeof($number[2])-1]))? $list."#".$number[2][sizeof($number[2])-1]." ".$name[2][sizeof($name[2])-1]."\n" : $list."? \n";

return $list;
}

$image = imagecreatefrompng("image.png");
$color = imagecolorallocate($image, 55, 255, 255);

$words = returnLastName($url);

$text_size = 12;

$info_array = imagettfbbox($text_size, 0, "arial.ttf", $words);

$string_width = abs($info_array[4] - $info_array[0]);

imagettftext($image, $text_size, 0, 175 - $string_width/2, 196, $color, "arial.ttf", $words);

header("Content-type: image/png");
imagepng($image);

?>

PS. This forum's PHP highlighting sucks.

PPS. AJAX posts kill this game... :(

AZRIEL
04-23-2009, 03:08 AM
You harsh bastard


http://www.majhost.com/gallery/ispeakvinglish/GIF/youreawesomedance.gif

bug24
04-23-2009, 07:57 PM
Lemmark made me promise to not post anymore widgets because the IP address one scared people, but people don't seem to be bothered by this one so I think it should be cool.

The game would work if people would start posting... Don't be fooled by the thread's high view count and low post count. It's just really high, because the cURL thing gives the thread an extra view every time somebody views it so it's like double the views.

MintyKisses
04-24-2009, 12:07 AM
hmmm... so what exactly is a widget?

seeminglysatisfied
04-24-2009, 12:30 AM
haha!....shenanigans!

I thought so.


Nice predictor Bug. :satisfied:

vanilla vixen
04-24-2009, 02:11 AM
I'll play with you bug :)

bug24
04-24-2009, 04:13 AM
hmmm... so what exactly is a widget?

Would you like me to show you a widget? *zip*

MintyKisses
04-24-2009, 11:37 AM
Mmmm *licks lips* yes please!!!

WhaWhaWha
10-28-2009, 03:54 AM
http://farm4.static.flickr.com/3540/3348601665_91f870a47c.jpg


oh yeah, and .... 43

DrewLongstrider
10-29-2009, 02:13 AM
"Not with a bang, but a whimper"


It would seem that this holds true, and alas Bug24 is banned, so he will not see it.