I'm converting a site from ASP to PHP. I need some tool that will strip all the ASP tags from a page.. anyone know of one?
| SitePoint Sponsor |
I'm converting a site from ASP to PHP. I need some tool that will strip all the ASP tags from a page.. anyone know of one?
- crag
net geek for non profits and political campaings


I can write you a pretty quick ASP script that will remove all ASP from a file.![]()
Funny. Yeah I guess i could that in PHP too. I was hopeing to find a tool that would strip out lots of things... Myabe EditPlus will do it?
- crag
net geek for non profits and political campaings
Crag --
have you tried ASP2PHP yet ? http://asp2php.naken.cc/ pretty nice with a good amount of VB to PHP translations, but expect to hand-tweak certain things...especially string parsing.
i had to install the main executable...then i followed a link from their site to get a nice little GUI that works for windows...http://hem.passagen.se/lindau/apwg/news.htm
Geoff





This should work for stripping asp code from a file in PHP.
PHP Code:<?
$file = 'foo.asp';
$fp = fopen($file, "r");
if($fp) {
while(!feof($fp)) {
$data .= fgets($fp, 1024);
}
fclose($fp);
$out = fopen($file, "w");
$data = ereg_replace("<%[^%>]*%>", "",$data);
if($out) {
fputs($out, $data);
fclose($out);
}
else {
print "Error opening $file for writing";
}
}
else {
print "Error opening $file for reading";
}
?>
Please don't PM me with questions.
Use the forums, that is what they are here for.
Thanks geeOff and freddydoesphp.
- crag
net geek for non profits and political campaings
Bookmarks