TwelvestoneBack End

PHP to ASP conversion


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
The General
 
2012-01-24

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>';  
    }  

?>  
scudsucker
 
2012-01-24

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.

Technomancer
 
2012-01-24

What scud said - what version of ASP. I can help you out too.

The General
 
2012-01-24

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.

Stickman
 
2012-01-24

You can run PHP on Windows Server.

scudsucker
 
2012-01-24

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.

The General
 
2012-01-24

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 k

Technomancer
 
2012-01-24

I'm yer whore!

But not til later today.

The General
 
2012-01-24

Originally posted by Technomancer

I'm yer whore!

But not til later today.

Ok, thanks Later today is fine.

scudsucker
 
2012-01-24

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.

Stickman
 
2012-01-24

Please send cheesecake.

KTHXBYE

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneBack End

PHP to ASP conversion