Converting Web Pages from ASP to PHP
January 01, 05 by kenrichCurrently, I am working on a script that will convert an ASP web script into a PHP script. My company is seriously considering moving all of our servers to a Unix environment. While we could just go out and buy an ASP processor for Unix (like Sun’s), I think it would be better to use PHP since it is a much more powerful scripting language.
So I have started writing a script that will do some intelligent search-and-replace using regular expressions. Right now I have about 100 regular expressions written and it is quite slow in processing a single script. I really should have used a parsing tool such as Lex and Yacc to do an efficient processing of the source script.
I chose a script instead because I am more familiar with that and it eliminates the time-consuming process of writing conversion routines in C. Right now it seems like I will never be able to get this thing perfected 100%, but 99% would be really good right now. This could be a very useful tool that I might be able to sell to .other web site developers.