SRL Archive - General

Little PHP Help?


n3ss3s

2007-12-07 04:26:39

Well if I'd want to get info from SRL Stats, what would I need to do?

Here is my code

[PHP]
<?php
header('Content-type: image/png');
$text = 'Time Ran';
$im = imagecreatefrompng ("edgecutter.png");
$color = imagecolorallocate($im, 255, 0, 0);
$font = 'arial.ttf';
$fontsize = 10;
$size = imagettfbbox($fontsize, 0, $font, $text);
imagettftext($im, $fontsize, 0, 461, 57, $color, $font, $text);
$text = 'Logs cut';
$size = imagettfbbox($fontsize, 0, $font, $text);
imagettftext($im, $fontsize, 0, 461, 77, $color, $font, $text);
$text = 'Ents dodged';
$size = imagettfbbox($fontsize, 0, $font, $text);
imagettftext($im, $fontsize, 0, 484, 135, $color, $font, $text);
imagepng($im);
imagedestroy($im);
?>
[/PHP]


And the page I want to get info from:
http://stats.srl-forums.com/index.php?action=view_script&id=483

As you maybe can see, things I need are Time ran (Xh YMin), Logs Cut and Ents dodged.

Now, help please :)

Markus

2007-12-07 05:19:07

Some code:
[php]
$curlclient = curl_init('http://stats.srl-forums.com/index.php?action=view_script&id=483');
curl_setopt($curlclient, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($curlclient);
[/php]
$data will hold the whole page.

n3ss3s

2007-12-07 05:40:48

Thanks markus!

But now, how do I parse the info?

Is there a "between()" in php?

Markus

2007-12-07 07:07:02

No, there isn't :(
Just google for it and you'll find one soon enough I think.

n3ss3s

2007-12-07 07:15:26

Yay, now Im getting closer to finish line!

Though I will edit the image to have banked…

EDIT: YES!! W0000000000t!!! I DID IT!!!! SHIFT + 1!

My first php thing :)

GoF

2007-12-08 07:00:16

From: n3ss3s
Yay, now Im getting closer to finish line!

Though I will edit the image to have banked…

EDIT: YES!! W0000000000t!!! I DID IT!!!! SHIFT + 1!

My first php thing :)


You're talking about the thing in your sig? Looks like t3h h4x.