I have this little piece of PHP code which i need converted to ASP. I know nothing about ASP coding so if anyone can help?
<?php
$image_dir = 'dirZ/';
$per_column = 6;
if ($handle = opendir($image_dir)) {
while (false !== ($file = readdir($handle)))
{
if ($file != '.' && $file != '..')
{
if(strstr($file,'IMG'))
{
$files[] = $file;
}
}
}
closedir($handle);
}
if(count($files))
{ natsort($files);
foreach($files as $file)
{
$Ext1 = substr("$file", 9);
$Ext = preg_replace("/\\.[^.\\s]{3,4}$/", "", $Ext1);
$count++;
echo ' <li><a href="',$image_dir,str_replace('','',$file),'" ><img src="',"directoryX/",$file,'" width="230" height="52" alt="Title ',$Ext,'" /></a></li>';
if($count % $per_column == 0) { echo '<div class="clear"></div>'; }
}
}
else
{
echo '<p>There are no images in this gallery.</p>';
}
?>
ASP Vbscript? or ASP.NET?
Essentially, walking through a directory and displaying all images in a grid?
I can help but need to know which language. If you are using ASP Vbscript (ie old-school ASP) then don't, if you can help it.
What scud said - what version of ASP. I can help you out too.
Thanks guys.
Which version of ASP, i can't say really.
Is old school ASP compatible with ASP.NET servers? If so old school ASP. A client of mine is nagging he can't use PHP and says he has a windows server. Like i said, i don't know much about ASP or windows server programming.
You can run PHP on Windows Server.
Originally posted by Stickman
You can run PHP on Windows Server.
Easiest option, too!
Any windows (IIS) server will run ASP and almost all modern ones will run .NET.
You can pretty easily configure IIS to run PHP. Or, you can install Apache (easy way - install WAMP) and Bob's your uncle.
Yeah i know windows can run PHP.
Problem here is that this guy doesn't have it installed and is not planning on doing so. So that's why i needed the ASP code.
So if anyone can convert the code? I'll pay $25 (paypal) for the effort if someone can deliver today 
I'm yer whore!
But not til later today.
Originally posted by Technomancer
I'm yer whore!
But not til later today.
Ok, thanks Later today is fine.
I'll be your whore's whore!
But actually I'm going to be making chocolate cheesecake first when I get home so I suspect that Techno will beat me to it.
Please send cheesecake.
KTHXBYE