Jump to content
xisto Community
Sign in to follow this  
kobra500

Kobra's Php Project Official Post

Recommended Posts

Kobra500's PHP Project


This is the Official Post for My Project to Learn PHP. Below is the list of things I will do... [okay, attempt]

Thanks to KansukeKojima and Jlhaslip

* Redirect a page with php [link]
* Parse a variable.
* Build a random page title chooser....
* Build a template in php and parse it AROUND the content of a page.
* Create a flat file shoutbox.
* Create a shoutbox with a database.
* Read the list of files in a directory
* List the images from that list
* Display those images as thumbnails with links to a full size image
* Read a file of content for a Template system and parse the H2 tags to create the Page title for the page.
* Build a Spam-proof Contact form with a captcha system



if you have any additional things to add to this list just post here anyway wish me luck!!!

I will be posting links and crossing off things, so please feel free to bookmark this post or watch for it in the recent activity area!
Edited by kobra500 (see edit history)

Share this post


Link to post
Share on other sites

Reading directory and listing them:

$path = "directory/path";$narray=array();$dir_handle = @opendir($path) or die("Unable to open $path please notify the administrator. Thank you.");$i=0;while($file = readdir($dir_handle)){     if($file != '.' && $file != '..')    {        $narray[$i]=$file;        $i++;    }}//closing the directoryclosedir($dir_handle);

I hope this helps...unless you weren't looking for help. Once a directory is read and stored into an array, you can execute various ways to spit back out. You can use PRINT or ECHO command to list files or pictures.Sorting file names as in order of Weekdays was the most challenging one. Vujsa worked out the best and shortest code to arrange them as in order of weekdays rather than alphabetically. Search the forum :D

Share this post


Link to post
Share on other sites

Good luck!

 

For my first PHP script I made an email form+sender, ever since then all I want to do is PHP!

 

For my second one, the one I am on at the moment, I am trying to make a member system (allowing the user to register, login, change password & settings etc..) i'm nearly there, just adding some design to it! look if you like: http://sam.exofire.net/register.php.

 

It's great when you spend ages on sorting out the errors in your script and then it finally works and you can try it out - best part of it by far, its even more of a great feeling when you make the script yourself - not just searching source forge or something :D

 

 

Good luck anyway...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.