Handy PHP bits

 

Over the years I’ve found these little bits of PHP, hacked together from various sources, quite handy.

PHP - List files in a directory
This script will look into a directory and return a comma delimited string of all the user specified files. Can be used with Flash etc.

PHP - List files in a directory (XML version)
As above but returns a much nicer XML output.

PHP - URL Parser
Parses a url - useful for using with Flash to get info from another domain when no cross domain policy file exists.

Comments

Leave a comment: