Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

design-is

macrumors 65816
Original poster
Oct 17, 2007
1,219
1
London / U.K.
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:
 
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:

This utility won't convert everything (yet!), but it will save you hours of time by converting all of your variables, comments, if...then, for...next, complex response.write output and more to PHP syntax.

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
 
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!
 
"View Source" in your browser

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 :)
 
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 :)

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.
 
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
 
Which only shows you the outputted html/xhtml code. Gives you absolutely zip when trying to convert from a server side language.
I point you to a previous post by the OP:
design-is said:
The site in question doesn't appear to require asp at all, it just has a few bits for the sake of it
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.
 
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 :)

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.