Results 1 to 18 of 18

Thread: [PHP] Request

  1. #1
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [PHP] Request

    I need something like a RuneScape Online Players grabber, but I need to grab the amount of posts a thread has on a certain forum...Any help?

  2. #2
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    why php, just use a scar script?

  3. #3
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah use srl, this function is special for it

    StatsGrabberMAdeForelkins;

    try it maybe... xD
    ~Hermen

  4. #4
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure StatsGrabberMadeForElkins;
    var
      PageContent: string;
    begin
      PageContent := GetPage('http://www..com');
      PageContent := Between('somthing', 'sonthing', PageContent);
      Writeln(PageContent);
    end;

  5. #5
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I want to echo it onto the page via HTML is why...
    I'm not a good PHP scripter...I want a page that grabs a simple post number and echoes it...


    EDIT: Timer, for between in SCAR, does it mean between the html code? or just the shown text.?

  6. #6
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    between...
    SCAR Code:
    begin
      Writeln(getpage('http://www..com');
    end.

  7. #7
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -.- You didn't answer my question. Does it retrieve what is between the visible text on that page, or between the HTML code inside it.

  8. #8
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    idk, just run that, you'll see!! lol

  9. #9
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, so now I have it to where it retrieves the stuff...But now I need to make it into a website...

  10. #10
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    dude this SRL-FORUMS not CRAZY-ELKINS IDEA FORUMS
    ~Hermen

  11. #11
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's also a request forum. I don't admire your post.

  12. #12
    Join Date
    Jun 2007
    Posts
    152
    Mentioned
    4 Post(s)
    Quoted
    0 Post(s)

    Default

    Well.. I would help, but I don't exactly know what you need.

    Ok, so now I have it to where it retrieves the stuff...But now I need to make it into a website...
    So you need something like the echo(); command?
    or just you need to know how to setup a webpage with php?

  13. #13
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I need to know how to make PHP grab text between two words on a website, and echo them.

  14. #14
    Join Date
    Jun 2007
    Posts
    152
    Mentioned
    4 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah.. ok, well I have a function for that already:

    PHP Code:
    function str_between($str$betw$betw2)
    {
        
    $str " " $str;
        
    $pos strpos($str$betw);
        if (
    $pos 0)
        {
            
    $str2 substr($str$pos strlen($betw));
            
    $pos2 strpos($str2$betw2);
            if (
    $pos2 == 0)
                return 
    '';
            return 
    substr($str20$pos2);
        }
        else
        {
            return 
    '';
        }


  15. #15
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would this work then?:

    PHP Code:
    <?php

    function str_between($str$betw$betw2)
    {
        
    $str " " $str;
        
    $pos strpos($str$betw);
        if (
    $pos 0)
        {
            
    $str2 substr($str$pos strlen($betw));
            
    $pos2 strpos($str2$betw2);
            if (
    $pos2 == 0)
                return 
    '';
            return 
    substr($str20$pos2);
        }
        else
        {
            return 
    '';
        }


    $users str_between('http://srl-forums.com/forum/','<a href="online.php" rel="nofollow">','<a href="online.php" rel="nofollow">Currently Active Users</a>','</div></div>'); 
    echo 
    $users;

    ?>

  16. #16
    Join Date
    Jun 2007
    Posts
    152
    Mentioned
    4 Post(s)
    Quoted
    0 Post(s)

    Default

    That wouldn't... you have to do a file_get_contents to get a webpage.

    I tested this, and it works:
    PHP Code:
    <?php

    function str_between($str$betw$betw2)
    {
        
    $str " " $str;
        
    $pos strpos($str$betw);
        if (
    $pos 0)
        {
            
    $str2 substr($str$pos strlen($betw));
            
    $pos2 strpos($str2$betw2);
            if (
    $pos2 == 0)
                return 
    '';
            return 
    substr($str20$pos2);
        }
        else
        {
            return 
    '';
        }


    $site file_get_contents('http://srl-forums.com/forum/');
    $users str_between($site'Currently Active Users</a>:''
            </td>'
    );
    echo 
    $users;

    ?>

  17. #17
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Gravedig, sorry, my post is worth it

    Botmaster has a player grabber, check it out - is that what you mean?


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  18. #18
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    He just wants to print the online players on a HTML page...
    Not that hard in PHP.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [REQUEST]Fall For You By Secondhand Serenade [REQUEST]
    By P1nky in forum Music, Movies and TV
    Replies: 0
    Last Post: 08-22-2008, 06:22 AM
  2. [REQUEST]Randoms Updated.[REQUEST]
    By P1nky in forum SRL Site Discussion
    Replies: 18
    Last Post: 04-04-2008, 08:23 PM
  3. Read - "To request or not to request?"
    By n3ss3s in forum RS3 Script Requests
    Replies: 9
    Last Post: 03-21-2008, 03:20 PM
  4. [request]Mind Crafter[request]
    By alex s in forum RS3 Outdated / Broken Scripts
    Replies: 6
    Last Post: 04-17-2007, 12:10 PM
  5. [REQUEST]Green Dragon Raper[REQUEST]
    By Zodia in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 04-06-2007, 10:10 PM

Posting Permissions

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