Results 1 to 6 of 6

Thread: Little PHP Help?

  1. #1
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default Little PHP Help?

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

    Here is my code

    PHP Code:
    <?php
    header
    ('Content-type: image/png');
    $text 'Time Ran';
    $im imagecreatefrompng ("edgecutter.png");
    $color imagecolorallocate($im25500);
    $font 'arial.ttf';
    $fontsize 10;
    $size imagettfbbox($fontsize0$font$text); 
    imagettftext($im$fontsize046157$color$font$text);
    $text 'Logs cut';
    $size imagettfbbox($fontsize0$font$text);
    imagettftext($im$fontsize046177$color$font$text);
    $text 'Ents dodged';
    $size imagettfbbox($fontsize0$font$text); 
    imagettftext($im$fontsize0484135$color$font$text);
    imagepng($im);
    imagedestroy($im);
    ?>

    And the page I want to get info from:
    http://stats.srl-forums.com/index.ph..._script&id=483

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

    Now, help please

  2. #2
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Some code:
    PHP Code:
    $curlclient curl_init('http://stats.srl-forums.com/index.php?action=view_script&id=483');
    curl_setopt($curlclientCURLOPT_RETURNTRANSFERtrue);
    $data curl_exec($curlclient); 
    $data will hold the whole page.
    I made a new script, check it out!.

  3. #3
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Thanks markus!

    But now, how do I parse the info?

    Is there a "between()" in php?

  4. #4
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    No, there isn't
    Just google for it and you'll find one soon enough I think.
    I made a new script, check it out!.

  5. #5
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    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

  6. #6
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •