PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Posting Countdown in PHP



Maisaffe
01.08.2004, 02:40
Ist es möglich einen Posting Countdown zumachen , welcher die Tage anzeigt bis zu meinem 1000Post? :D

Wenn ja, könnte mir einer so ein Script erstellen?

Dennis

wrtlprnft
01.08.2004, 03:15
Meinst du sowas (http://www.wrtlprnft.de/posts.php)?
Das Script ruft deine Profilseite auf und wertet sie dann aus. Quellcode:
<?php
$h = file('http://forum.rpg-ring.com/forum/member.php?s=&action=getinfo&userid=4739');
for ($anz = count($h), $i = 0; $i < $anz; $i++)
if (strstr($h[$i], 'helvetica" size="2"><b>Beiträge:'))
{
$i++;
$buf = strstr($h[$i], '"2">');
$buf = substr($buf, 4);
$buf = explode(' ', $buf);
$currentposts = $buf[0];
$daylyposts = substr($buf[1], 1);
break;
}
if ($currentposts == 0)
{
print ('Fehler');
return;
}
$buf = explode('.', $daylyposts);
$daylyposts = $buf[0] + $buf[1] / 100;
print ('dennis_meckel hat derzeit ' . (int)($currentposts) . ' Postingpunte. Bei ' . $daylyposts . ' Posts pro Tag wird er in ' . (1000 - $currentposts) / $daylyposts . ' Tagen 1000 Posts besitzen.');
?>Ich hoffe, das war, was du wolltest.

Maisaffe
01.08.2004, 03:20
Wollte nur: 192 post remaining ;)

Aber das von dir ist stylisher ;)