Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Automatic embed all images?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Web Development
View previous topic :: View next topic  
Author Message
Cryoma
Member of the Year
Reputation: 195

Joined: 14 Jan 2009
Posts: 1847

PostPosted: Mon Jan 02, 2012 6:11 am    Post subject: Automatic embed all images? Reply with quote

Is it possible to make a page that automatically embeds all images in its directory?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 138

Joined: 25 Jan 2006
Posts: 7326
Location: 127.0.0.1

PostPosted: Mon Jan 02, 2012 9:03 pm    Post subject: Reply with quote

Using php:

Code:

<?php

   $AllowedFileTypes = array( 'png', 'jpg' );
   
   if( $dirHandle = opendir( '.' ) )
   {
      while( ( $entry = readdir( $dirHandle ) ) !== false )
      {
         if( $entry == "." || $entry == ".." || is_dir( $entry ) )
            continue;
            
         $fileInfo = pathinfo( $entry );
         if( in_array( $fileInfo['extension'], $AllowedFileTypes ) )
         {
            echo "<img src=\"{$entry}\" alt=\"{$entry}\" />";
         }
      }
      
      closedir( $dirHandle );
   }

?>

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Cryoma
Member of the Year
Reputation: 195

Joined: 14 Jan 2009
Posts: 1847

PostPosted: Mon Jan 02, 2012 10:54 pm    Post subject: Reply with quote

Flawless thank you.
Back to top
View user's profile Send private message
saqlain1122
How do I cheat?
Reputation: 0

Joined: 05 Sep 2014
Posts: 1

PostPosted: Fri Sep 05, 2014 7:48 am    Post subject: Sm Reply with quote

s it possible to make a page that automatically embeds all images in its directory?
_________________
saqlain1122
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Web Development All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites