Results 1 to 7 of 7

Thread: help with GetPage

  1. #1
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default help with GetPage

    Anyone know how to use GetPage correctly? It keeps returning all of this as the string.

    <html>
    <head>
    this is my header
    </head>
    </html>

    instead of just "this is my header"

    This is the code I was trying
    SCAR Code:
    program New;
    var
    Test:String;

    begin
    Test:=GetPage('http://omgh4x0rz.freehostia.com/test.html');
    writeln(Test);
    end.

  2. #2
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Take out the HTML. Just have the words "This is my header".

  3. #3
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I still get these strange box/symbol things. They don't show up when I copy/paste them though.

    And why doesn't html work?

  4. #4
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Getpage gets the source of a page, so if you write in HTML, it will return the HTML. To get rid of the boxes, use Trim()
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  5. #5
    Join Date
    Oct 2006
    Location
    I'm a figment of your imagination
    Posts
    422
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    To get rid of the html tags, you can make the script position all <'s and >'s and then delete them. You might even be able to build a simple XML parser if you're good.

    It's been a while... but I'm BACK!!!

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

    Default

    Quote Originally Posted by Starblaster100 View Post
    Getpage gets the source of a page, so if you write in HTML, it will return the HTML. To get rid of the boxes, use Trim()
    Does Trim also remove Chr(13)'s?

    Anyway, you don't have to use HTML. you can also make it a textfile, like I do in my powerminer.



    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)

  7. #7
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys, got it now.

    I just started reading a little about html, so I figured that would be a good place to try a little. Guess not.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. GetPage?
    By Illkillutill in forum OSR Help
    Replies: 7
    Last Post: 03-08-2009, 04:29 AM
  2. GetPage
    By mat_de_b in forum OSR Help
    Replies: 4
    Last Post: 11-04-2007, 09:48 PM
  3. GetPage
    By JuKKa in forum OSR Help
    Replies: 9
    Last Post: 08-11-2007, 01:36 AM
  4. GetPage
    By Martin in forum OSR Help
    Replies: 0
    Last Post: 04-16-2007, 05:52 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
  •