Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Nix
    Nix is offline
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reading of source code

    Hi all,

    U guys know any ways that asp can read source code from others html files?


    thx alot

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    You can read files on the server using the FileSystemObject. There is a tutorial on W3Schools on them.
    OracleGuy

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you're talking about reading HTML from someone else's website, or another domain, you can use XMLHTTP.

    Check out http://www.4guysfromrolla.com/webtech/110100-1.shtml for more info on it and an example script; keep in mind there are legal issues if you steal someone else's content without their permission - in other words, if it isn't your content, and you don't have permission to use it, don't! Otherwise you may very well end up paying monetary damages (In other words, that's money out of your pocket). However, if you're using a client's website to update a page that you've created for them, it's perfectly acceptable (if you have their permission).

    I have done this on a few occasions to make some of their "third party" sites that I've created automated by template (with the help of regular expressions and/or the Split() function and HTML comments!) when the client requests that the site "always looks the same"

    If the files are local (i.e. on your network) then just follow OracleGuy's advice. Every programmer that uses ASP/VBScript (or really Windows operating systems) should know FileSystemObject - it's extremely handy.
    Last edited by whammy; 02-04-2004 at 05:41 AM.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

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