ASP to PHP or simply pure HTML

Discussion in 'Web Design and Development' started by design-is, Aug 13, 2008.

  1. design-is macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #1
    Hi all :)

    I have done a little search and found that there are several programs and sites that claim to be able to convert ASP to PHP.


    Do they work? Is there a nice easy way to convert a site from ASP to PHP, or even just to HTML?

    The possibility seems too good to be true.

    Anyone had any experience or has any knowledge on the subject, that would be great.

    Thanks very much :rolleyes:
     
  2. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #2
    Hope it's not ASP.net (there is more than one flavor of ASP) !!!

    Assuming standard ASP, the best online translator tool recommended by Zend that's available can be used here but bear in mind they have the following disclaimer right on their home page:

    So obviously the translation depends on the complexity of code, i.e. you will run into problems with advanced OOP, customized database connection strings and a few commands that don't cross over. That page lists a cross reference so you know what's supported.

    This is as close to magic (and free) as you will come. I've used it once for a simple project, i.e. nothing involving database or custom functions that override native functions in either language. It handles forms very well.

    -jim
     
  3. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #3
    thanks very much for the quick reply :)

    This looks promising. The site in question doesn't appear to require asp at all, it just has a few bits for the sake of it - so this method should hopefully be fine...

    Thanks again!
     
  4. savar macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #4
    "View Source" in your browser
     
  5. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #5
    Thanks, I know that much :eek:

    I was also wondering if anything might exist that I could just kind of plonk all the ASP files onto and it would batch convert them to PHP or HTML. But I'm guessing I can't be that lucky :)
     
  6. savar macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #6
    Sorry. My response was a bit sarcastic, but my intent was to make you think outside the box a bit.

    There are programs which will download an entire site (I remember one called Web Whacker, I think) to your local machine. If you are happy with static HTML, then a tool like that would be perfect for you. Just download the entire thing, you'll get static HTML as a result, which you can then upload back to your server.
     
  7. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #7
    So long as we all accept the word static means just that, unchanging. Most times view source provides content after conditional processing and dynamic database retreival in more complex web pages and thus is not static by any definition. For simple static web pages, it's totally cool, of course.

    :)

    -jim
     
  8. Trip.Tucker Guest

    Joined:
    Mar 13, 2008
    #8
    Which only shows you the outputted html/xhtml code. Gives you absolutely zip when trying to convert from a server side language.
     
  9. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #9
    I point you to a previous post by the OP:
    It doesn't sound like there was really any big thing happening server side like database accessing. So savar's suggestion very well could meet his needs.
     
  10. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #10
    Thanks for all your help guys!

    savar's suggestion may well do the trick!

    Always thankful

    Doug
     
  11. Trajectory macrumors 6502a

    Joined:
    Nov 13, 2005
    Location:
    Earth
    #11
    You can do this with a fairly simple, recursive PHP script, using the file_get_contents() function to load the contents of a web page into a variable, and the fwrite() function to write it to a file.
     
  12. design-is thread starter macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #12
    I'm afraid this is a bit above my current ability. But thank you for the suggestion :eek:
     

Share This Page