#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    12
    Rep Power
    0

    using javascript to read another webpage


    hi all,

    how can i have javascript read a different webpage and print it out to the page?

    hopefully with just the straight text (no formatting/html)

    thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    13
    Say what?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    12
    Rep Power
    0
    i want to be able to read another webpage and then print it to the page

    like:

    open http://www.somesite.com/page.php?var=val
    while not end of page
    read line
    print line
    close

    or something else that would have the same result

    all i really need is the plain text without formatting or html (if it's not too much trouble)

    thanks again
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    12
    Rep Power
    0
    anybody?
  8. #5
  9. No Profile Picture
    <!-- No Comment -->
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Posts
    26
    Rep Power
    0
    This type of thing is easy to do in almost any scripting language (Perl, PHP, ASP, etc). With JavaScript? I don't know.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    12
    Rep Power
    0
    well heres the deal. i want to use the counter i already have. my site is PHP, so it's pretty easy just to include("/path/counter.php?id=8"). all the counter displays is a number (if you loaded it from a web browser, all the source would say is "12312" or whatever)

    i don't know perl. i just integrated a forum pakcage (ikonboard) into my website, which is written in perl, and uses some funky template system that i can't figure out (i can look at just straight up normal perl and know what is going on, but not this), so i wouldn't even know where to put an include just to see if it worked.

    the one thing i do have access to and can understand is the html template for the site, so i can insert html and javascript. the way i have it load now is in an iframe. it looks really really bad (white box with unformatted text inside), and isn't compatible very far back (netscape 5 is the first netscape to support it), so i'm going to miss counting some hits too.

    there has to be a way to do this... is there something like document.write(include("/path/counter.php?id=8")) in javascript??
    Last edited by jonnyb; April 29th, 2002 at 02:17 PM.

IMN logo majestic logo threadwatch logo seochat tools logo