| px | top | add code | search | signup | login | help |
| Title | Author | Rating | Views | Last Modified | ||
| Easy PHP Upload 2.24 | Olaf | -- | 5902 | 2005-08-03 09:21:33 | [ link ] | |
| This PHP upload class (the old name) can be used to upload files with a client browser to a remote webserver location. The features in the first release are: file-extension check, maximum file- size limitation and a flexible error reporting system. The class is extremely easy to use and comes together with full working examples. Sinds the second version is it possible to upload multiple files. Check the class file for all update information. The version 2.22 (and higher) is compatible with the PHP directive "register_globals=off". NEW functions for the multiple upload function: rename files and filename validation. | ||||||
| 100 Fonts for FlashCard Greeting Card Creator 1.0.1 | Darren Gates | -- | 1144 | 2007-03-17 03:15:26 | [ link ] | [ show ] |
| Over 90 fonts for FlashCard, including several hard-to-find symbol fonts. Enhance the FlashCard experience for your users with this font set. You must have FlashCard installed and working, and be able to correctly edit FlashCard's config.xml file, to use this font package.Click here for a complete list of fonts included in this package! | ||||||
| :: PHP HTTP File Editor :: 1.5 | Gin Tonyx | -- | 8844 | 2003-04-11 02:57:32 | [ link ] | |
| A set of php files (3) that can be used to edit files via http. Contains the frameset, a file browser, and an editor. | ||||||
| Automatic Photo Albums 1.0 | Eric Paquet | -- | 2129 | 2007-01-25 19:23:56 | [ link ] | [ show ] |
| (Click on [ Link ] to get the zip'd package) The PHP Photo Album Generator is a collection of a few simple interrelated PHP scripts that automate the generation of photo album listings, slideshows and thumbnail index. This includes showing album categories based on which user logged-in. Then, when an album is selected, a slideshow starts with a bunch of viewing options (change speed, show EXIF details, show thumbnail index and movies). Distinguishing features are: automatic generation of albums and categories based on what's installed (no additional configuration). Usage of EXIF comments in the file to show photo descriptions (no need for a database such as MySQL). Dependencies: EXIF enabled in PHP (modify slideshow.php to remove this dependency), Apache authentication (modify albumlist.php to remove this dependency) and slides/thumbnails installed as subdirectories to album directories (use GenThumbs above for that purpose). | ||||||
| Bs_CsvUtil 4.2 | fab5 | -- | 4093 | 2002-11-26 23:15:53 | [ link ] | [ show ] |
| class to read and write comma-separated-value files. Features: supports any separator char sequence, default is semicolon ";". supports separator characters in the values. eg you use a ; as separator, your line may look like blah;hello world;"foo";"foo;bar";"this is a ""string""";got it?;foo as you can see, the values can be in "quotes". if your text uses quotes itself as in the "string" example, they are escaped in ms-style with 2 quotes. and by using quotes we can even have your separator inside the text (example "foo;bar"). line breaks. a csv line may spread over multiple lines using crlf in a field value. see the checkMultiline param and the _checkMultiline() method. this class is part of the blueshoes php application framework, see blueshoes.org. | ||||||
| Bs_IniHandler 4.2 | fab5 | -- | 3232 | 2002-11-26 23:16:53 | [ link ] | [ show ] |
| The IniHandler can read and write ini-style files (and strings). Many options can be set. example: http://www.blueshoes.org/en/framework/util/ini_handler/ source: http://www.blueshoes.org/download/Bs_IniHandler.class.phps manual: http://developer.blueshoes.org/phpdoc/Bs_IniHandler.html this class is part of the blueshoes php application framework, see http://www.blueshoes.org/ | ||||||
| Cinema Flash Video Component 1.0 | Darren Gates | -- | 1145 | 2007-02-18 02:38:15 | [ link ] | |
| Advanced FLV Flash video player component for your Flash projects. This FLV player and Flash component is fully customizable, includes 100% of the source code, and includes free updates. Please note that the Flash applet has a different design and feature set from this component, but an applet version of this component is in development. | ||||||
| Cutting line from a file 1.0 | Bram Heerink | -- | 9239 | 1999-08-24 02:43:09 | [ show ] | |
| This function strips a specific line of a file. If no linenumber is given, last line is stripped. | ||||||
| dGallery 1.2 | Donny Marthen Sitompul | -- | 4688 | 2003-11-12 02:11:55 | [ link ] | |
| Web-based gallery for administering web photos collection. | ||||||
| Directory Tree 1.0 | J. Chakrabarty | -- | 7743 | 2001-02-17 23:22:04 | [ link ] | |
| Provides the complete directory tree of your site in an organised table. Free download at http://www.creativephp.com/ | ||||||
| download counter v1.1 | |The-Crow| | -- | 11088 | 2000-07-06 13:17:09 | [ link ] | |
| A download counter for your files, check for more info the example.php. Don't use mySQL, this is appropriated for small sites. Tested under Apache 1.3.12 / PHP 4.0.1pl2 / Linux 2.2.16 and Win98. | ||||||
| EasySIteBuilder 1.2 | stephan Pierantoni | -- | 4847 | 2003-05-10 09:53:18 | [ link ] | |
| A fully automated solution to build web site from your brower only. Offer this solution to your clients! Features 100% atomated web site 100% custumize it to your needs very easily 100% online update from your browser only Create unlimited links to content Upload a pic to illustrate each text Modify and delete anything you want in a second! ... | ||||||
| ExcelExplorer Pro 4.1 | EEPHP.com | 5.0 | 4881 | 2007-11-30 12:03:17 | [ link ] | |
| This set of PHP classes can read data from binary (XLS) Excel file without using COM, ODBC, etc. ExcelExplorer will work on any OS that supports PHP5. Windows and Mac Excel files are supported. No additional classes, modules or configurations needed. Using ExcelExplorer you can read info about worksheets, columns, rows, cells. You can even read style info such as colors, alignment, fonts, borders and more. Shapes and images also supported. You can even read summary information from any MS Office file. Have build-in caching, memory-safe mode. Demo version available on-line. | ||||||
| File Explorer 1.3 | Fabien HADDADI | -- | 10786 | 2001-10-16 09:54:04 | [ link ] | |
| A Windows-styled file explorer. Allows you to browse, download, edit, delete and UPLOAD files to and from your website only using HTTP! | ||||||
| File lister 0.01 | Eric Persson | -- | 12959 | 1999-12-26 08:53:22 | [ link ] | [ show ] |
| This script puts all filenames with the full path in to an array. It also gives the number of filenames in the array. | ||||||
| File synchronisation 1.0 | Richard Heyes | 5.0 | 14288 | 2000-05-20 14:35:09 | [ show ] | |
| A script to synchronise directories. Has good logging abilities. Use in conjunction with cron for example. | ||||||
| File Upload !!!!!!! 1.0 | ChangLing | 4.0 | 26842 | 2000-10-19 21:10:54 | [ show ] | |
| Hope this will help! Good luck! | ||||||
| File Upload For Linux 1 | saif | -- | 17898 | 2000-07-14 11:59:01 | [ show ] | |
| Uploads 4 files to /tmp directory. Check it out it is cool. | ||||||
| File Upload Script V 1.0 | Corps Technologies | -- | 4921 | 2004-03-30 04:06:20 | [ link ] | |
| This script and html file is used for uploading a file to your web server. Can be useful for web designers who will need files from their customers from time to time. This script will send an email to an address specified in script when a new file is uploaded. Will send a link and a confirmation email to the uploading email address. | ||||||
| File Uploader Function 1.0 | Francisco Charrua | 5.0 | 3884 | 2004-04-13 22:14:05 | [ link ] | [ show ] |
| Allows users to upload files to your website. I wrote this script to illustrate the basic operations required for file uploading, I don't recommend it be used as is, because people may upload programs and scripts. If you want only images to be uploaded, you may want to modify the extension of any file that doesn't have isn't a jpg, png, or gif. | ||||||
| FilEd 1.0 | Steven Chalker | -- | 4345 | 2001-11-27 10:18:32 | [ show ] | |
| this can edit files.. no matter where you are!! | ||||||
| filemanager 0.02 | Lacey Pevey | -- | 23017 | 1999-12-05 03:54:03 | [ show ] | |
| Provides a simple web-based file manager and text editor. No security included. | ||||||
| FileManager 0.1 | Luboslav Gabal | -- | 4757 | 2001-08-30 13:33:26 | [ link ] | |
| FileManager for Windows systems using JavaScript | ||||||
| Filter File Extension 1.0 | Jake | -- | 5298 | 2004-04-12 20:05:43 | [ link ] | [ show ] |
| Prevents users from uploading certain file types. In the example, we block out ASCII files. | ||||||
| Flash MP3 Player and Flash MP3 Component 1.0 | Darren Gates | -- | 1244 | 2007-03-06 02:55:57 | [ link ] | [ show ] |
| This may be one of the best values on TUFaT.com... Advanced, XML-configured MP3 player, and corresponding Flash component (BOTH are included!). MP3 player and Flash component are fully customizable, and both include 100% of the source code, with free updates. However, the $5 version includes 100% of Flash source code for BOTH the component and MP3 player! Also see our Skinnable MP3 Player and Skinnable MP3 Component. | ||||||
| Flexcustomer 0.0.6 | anna | -- | 2293 | 2009-08-20 22:17:12 | [ link ] | [ show ] |
| Flexcustomer is a simple, free and open source users management module. Users can register, edit their information and password or find their lost password.Administor can search, delete or browse users' information. This program is easy to be internationalized.Friendly interface and install system is available. Low price customization service is provided. | ||||||
| FlexPHPDirectory 0.1 | anna | -- | 457 | 2008-12-09 01:50:35 | [ link ] | [ show ] |
| FlexPHPDirectory is a simple, free and open source link directory system.You can add multi-level sub-categories.Users can submit site information.Users can search links by keyword or rate the link.New listings and cool listings are available.You can set a website as a sponsored link and list it before others.This program is easy to be internationalized.Low price customization service is provided. | ||||||
| Flexphpsite Pro 0.0.6 | anna | -- | 2740 | 2008-12-09 01:46:22 | [ link ] | [ show ] |
| This program can tell you your animal sign and corresponding character according to your birthday.Low price customization service is provided. | ||||||
| FTP File Upload 1.0 | Maxstropholis | 5.0 | 6401 | 2004-06-04 16:18:00 | [ show ] | |
| This simple script takes user files from a form and uploads them to an FTP site with a friendly name. Uses the PHP FTP functions. Also has some error checking. | ||||||
| Generate Excel files from PHP | Christian Novak | -- | 31471 | 2000-11-25 11:47:24 | [ show ] | |
| Small function library to generate Excel files/stream directly from PHP. | ||||||
| getID3() 1.2.0 | James Heinrich | -- | 3121 | 2002-01-16 12:31:11 | [ link ] | |
| getID3() is a PHP4 script that reads ID3v1 (up to 1.1) and ID3v2 (up to 4.0) MP3 tags and outputs the data to a multi-dimensional array. Also reads MPEG audio info from MP3 frame header, such as bitrate, channels, MPEG version, layer, VBR/CBR mode & method, etc. Parses all documented ID3v2 tags so your coding is easy. Supports variable-bitrate MP3s (both Xing and Fraunhofer methods). | ||||||
| Image Magic Converter 39 Format to Web Graphics 1 | Patrik | -- | 12551 | 2000-11-01 16:45:47 | [ link ] | [ show ] |
| Thumbnails generator - Upload Your Tiff or Fax - Bmb file to convert in to Web Graphic Format.... Description: Thumbnails generator and Converter from BMP BMP24 CGM CMYK DIM EPDF EPI EPS EPS2 EPSF EPSF EPSI EPT FAX+ FIG FPX GIF GIF87 JPEG LABEL MAP MPEG NULL PCD PCDS PCX PDF+ PDF PNG PS+ SUN TGA TIFF TIF24 TILE TTF UIL WIN JPG> to jpg or png | ||||||
| installation routine for phpShop 0.80 | ulisoft | -- | 1409 | 2006-08-18 07:31:41 | [ link ] | |
| the installation routine helps setting up phpShop 0.80 | ||||||
| ip to country | ulisoft | -- | 2116 | 2006-08-18 07:32:14 | [ link ] | |
| ip to country determines the origin country of a user. | ||||||
| Kazanux 1 | Bob | -- | 1607 | 2005-04-03 03:50:20 | [ link ] | |
| Read the contents of the KaZaA database files. The files that record all the files downloaded and shared via the Kazaa P2P file sharing network. These files are normally in the DB directory named data526.dbb and data1024.dbb | ||||||
| kPlaylist 1.0 | kPlaylist Team | -- | 2990 | 2004-01-30 15:56:49 | [ link ] | [ show ] |
| kPlaylist makes your MP3 archive available via the WEB. Play music, search, create and edit playlists from everywhere by just having a webbrowser and a MP3 player. Features include logon, accounts, account classes, user editor, automatic installation (MySQL) and automatic search engine update. | ||||||
| kPlaylist 1.0 | kPlaylist Team | -- | 2635 | 2004-01-30 15:56:26 | [ show ] | |
| kPlaylist makes your MP3 archive available via the WEB. Play music, search, create and edit playlists from everywhere by just having a webbrowser and a MP3 player. Features include logon, accounts, account classes, user editor, automatic installation (MySQL) and automatic search engine update. | ||||||
| Make Directories v1.02 | Andrew Heebner | -- | 8607 | 1999-10-03 19:03:24 | [ show ] | |
| This just simplifies how you can use PHP to automatically generate directorys without actually haveig to FTP to your server to make one. Try the code and develop from it! | ||||||
| Man Page Lookup 1.3.0 | Andrew Collington | -- | 2229 | 2004-01-15 14:48:41 | [ link ] | [ show ] |
| This will allow you to view man pages on your unix/linux system through a web browser. It formats correctly, and auto-links email addresses. | ||||||
| Management 2.1 | Huib Bakker | -- | 17699 | 2000-10-25 04:56:56 | [ link ] | [ show ] |
| Management Tool | ||||||
| Mp3 Info Function 0.0001a | CheSter | -- | 11524 | 2000-05-20 06:09:56 | [ link ] | [ show ] |
| This function returns MP3 file info as an array. It is extremely new code so it may not be 100% stable. I would lurv any comments | ||||||
| MP3 Info Function (2) | Marcel | -- | 9561 | 2000-12-01 09:05:52 | [ link ] | [ show ] |
| Returns MP3 file info (bitrate, samplerate, frames, channelmode ...) and ID3 tag info as an array. Based on CheSter's code published here. | ||||||
| MP3 Info Function (3) 1.0 | Mike Billings | -- | 3938 | 2001-02-13 20:20:14 | [ show ] | |
| Returns MP3 file info. Handles RIFF headers and ID3 v1.1 tags. Loosely based off CheSter\\\'s code and the mpg123 c source. | ||||||
| OpenShare File Sharing Agent 1.0 | Mike | -- | 3276 | 2001-08-03 00:05:05 | [ link ] | |
| A remote access file sharing utility, it allows you to get to the files you need from anywhere on the net using only a web browser. Provides detailed file information for mp3\\\'s as well as other files, and allows searching capabilities as well. | ||||||
| osDate Image Replacement Set 1.0 | Darren Gates | -- | 873 | 2007-03-17 05:08:24 | [ link ] | [ show ] |
| This is not a skin, but a collection of images, with Photoshop sources, that you can use for the | ||||||
| PDF Converter for HTML and Postscript 1.9.4 | tufatmarketing | -- | 1313 | 2006-07-08 12:31:36 | [ link ] | |
| This is a PHP equivalent to the popular Perl script by the same name. 100% FREE for commercial AND non-commercial use! Render pages as PDF documents or PostScript files. Options available for FPdf generation, form processing, PDFLib support, and many more! | ||||||
| PDF Converter for HTML and Postscript 2.0.13 | Darren Gates | -- | 1063 | 2007-03-14 05:03:44 | [ link ] | [ show ] |
| This is a PHP equivalent to the popular Perl script by the same name. 100% FREE for commercial AND non-commercial use! Render pages as PDF documents or PostScript files. Options available for FPdf generation, form processing, PDFLib support, and many more! | ||||||
| PDF Form Submission CGI 1.0 | James Morris | -- | 3588 | 2002-10-24 11:04:09 | [ show ] | |
| Catches the FDF sent to this script's URL and then creates an email with the completed PDF form to the specified email address. Useful for PDF order forms. | ||||||
| PHP Autoloader | Markus Malkusch | -- | 118 | 2009-12-22 08:43:27 | [ link ] | |
| This Autoloader Implementation finds class definitions in any files. A simple require of one file is enough to get it working without any further configuration. It uses an index for fast class defintiion finding. It has no problems with any other class loader. | ||||||
| PHP Download Manger 0.1 | Theo barringer | -- | 2662 | 2004-10-12 19:17:36 | [ link ] | |
| This script counts downloads or shows ads before ppl downloading a file. The real files can be in in directory which is hidden, e.g. with .htaccess, from the web. | ||||||
| PHP File function extentions 0.03 | Sergei Keler | -- | 8776 | 1999-11-17 03:23:42 | [ show ] | |
| This module implements function GREP($re,$file) which same purpose then unix grep. And TAIL($file,$number) function which returns last $number lines of $file _very_ fast. Very useful for www-chats... | ||||||
| PHP to Excel conversion 2.0 | Christian Novak | -- | 6617 | 2002-02-07 08:18:37 | [ link ] | |
| PHP 2 Excel conversion class. Class to create Excel compatible files on the fly. Supports formatting of cells, password protection, print setups and much more.... | ||||||
| phpXplorer | Tobias Bender | -- | 2297 | 2005-03-11 16:14:17 | [ link ] | [ show ] |
| phpXplorer is an open source file management system written in PHP. It enables you to work on a remote file system through a web browser. By default it has got dialogs for editing HTML, PHP, image, Apache, compressed and email files. Its modular design makes it easy to build your own filetypes, property sheets, views and themes. phpXplorers permission manager enables you to restrict the access to the shared file system for multiple users in a detailed way. | ||||||
| psipuss 1 | Peter Soper | -- | 712 | 2007-09-12 17:35:36 | [ link ] | |
| A Photo / Images upload script created in php mysql, it allows members to upload images, photos to your website and is free. Click link to download. | ||||||
| QTOFileManager 1.0 | Quentin O\'Sullivan | -- | 3507 | 2001-10-14 03:08:07 | [ link ] | |
| Web based PHP File Manager * EASY INSTALL - Just drop the file in the base directory * Just one script file * Upload and delete files * Authenticate the user (optional) * Edit a file (optional) * Specify which file extensions can be edited * Add and remove directories (optional) * Specify the max hard drive space allowed * Specify the max file size allowed * Designate file names as being hidden | ||||||
| random_line 1.0 | Adam Trachtenberg | -- | 3270 | 2001-04-12 11:49:15 | [ show ] | |
| Efficient way to grab a random line from a text file | ||||||
| RankQuest Free SEO Tools Source 1.1 | Ranjith Pandi | -- | 945 | 2006-12-20 05:43:38 | [ link ] | |
| RankQuest Free SEO Tools Source aims to help Webmasters in Search Engine Optimization. Keyword Finder lists the keywords in the meta keyword tag of a site. Meta Tag Analyzer examines the meta information of a site,to check if the content is Search Engine friendly. | ||||||
| Recursive directory list 0.1 | David Trowbridge | -- | 4674 | 2001-03-18 20:16:38 | [ show ] | |
| Recursively traverses a directory and builds a tree in HTML | ||||||
| Remote File Size 0.1 | Chad Lieberman | -- | 3330 | 2001-12-22 23:36:44 | [ link ] | [ show ] |
| A simple function that retrieves the size of remote files. (It could easily be changed to retrieve other info) | ||||||
| Research Paper 5 | Monica Maxwell | -- | 172 | 2009-10-14 13:14:08 | [ link ] | |
| The name ask its self. BestTermPaper is superior in writing your custom academic papers that suit to your needs. And you can assure that the paper that you get is unique and original at an affordable price. | ||||||
| rss aggregator | dan zarrella | -- | 2483 | 2003-01-21 16:04:47 | [ link ] | |
| pull a List of RSS feed addresses out of a mysql database. Perform responsiveness check with socket connection, compare poll results to database of headlines, if unique, add. Also formats template for display (Messy). | ||||||
| RSS Output | dan zarrella | -- | 2429 | 2003-01-21 16:04:13 | [ link ] | |
| The RSS output file that runs stargeek's feed. Cleans input to generate valid RSS. Optional category searches. | ||||||
| RTF2HTML 0.0.1 | Jason Stechschulte | -- | 16717 | 2000-06-06 13:13:53 | [ show ] | |
| This program converts a file in RTF format and displays it as a webpage. | ||||||
| Search and Replace 1.0 | Richard Heyes | -- | 14162 | 2000-05-20 14:37:46 | [ show ] | |
| Class to enable search/replace of files. Can perform the search over one file, multiple files, entire directories with/without subdirectories. Can search using four different search functions, supporting ereg and preg regular expressions. | ||||||
| Search without SQL 2.2 | Hamish Milne | -- | 983 | 2007-06-24 03:57:41 | [ show ] | |
| I spent days searching for a search engine with no need for a database. Then one day, I thought I'd make my own. | ||||||
| Simple Yet Nifty Directory Lister 0.02 | Avalean | -- | 848 | 2007-08-22 18:10:56 | [ link ] | |
| A simple directory lister. Just dump the contents of the zip file into a directory on your PHP webserver to display the contents of the directory. Its able to sort items in that directory by type, name, date and size. | ||||||
| Skalinks Links Management Script 1.5 | Anton Kollision | -- | 1465 | 2006-04-18 06:44:08 | [ link ] | |
| SkaLinks Exchange Script is modern and convenient script, which was specially created for arranging link categories on those sites that employ the reciprocal links exchange concept. Software features: script installer; links exchange; Advanced backlink verification; Open editors system; Multiple editors managing their own categories and links build an open DMOZ-like directory; Permalink control; New, friendly and sleek pages design; New color themes; Multiple categories creation work faster with big amounts of data; Database backup/restore; Sites Google PageRank display; categories hierarchy support; virtual categories support; related categories support; admin panel; multi-criterion search; customizable settings; statistics display; broken links verification support; fast-to-customize layout interface; advertisement system; directory editors system. | ||||||
| SophosParse 0.1b | Robert T Fish | -- | 2302 | 2002-05-20 17:13:18 | [ link ] | |
| A Parser for the broken (but still very handy) RSS feeds about Virus activity provided by www.sophos.com The .xml file is parsed into an array of arrays which is returned to the caller for display using a simple foreach loop. Example code is provided. | ||||||
| Sorting images based on their Pixel Dimension 0.5 | Tabibazar | -- | 1716 | 2007-09-19 16:54:43 | [ link ] | |
| PEG compresses an image based on the color information present in the image. Thus, the file sizes are not a true representation of how large an image is when displayed on screen. In trying to sort out small images based on their width or height we face the challenge of sorting images which are unusually tall or wide. Hence, sorting images based on their pixel dimension is a more accurate way of sorting images into groups. I present a script in PHP that does exactly that. The code is fast enough although you need to increase the execution time in php.ini. This script is to be used as a shell script and not in a website. | ||||||
| Splice 1.0 | Travis Barney | -- | 10484 | 2000-03-07 16:34:59 | [ show ] | |
| Create a 2 dimentional array (rows and columns) out of a semicolon delimited text file. | ||||||
| The World's simplest PHP Message/Quote of the Day Script 1.0 | Mads Sψgaard | -- | 4583 | 2002-02-19 13:54:59 | [ link ] | [ show ] |
| "The World's simplest PHP Message/Quote of the Day Script" is a simple "quote-of-the-day script" that needs access to a MySQL database. It only consists of one script that's SIMPLE and hence easy to customize. This is how it works: You put any number of quotes/messages/whatever into the database, and then the script will show one quote every day. When all quotes have been shown, the script starts from the beginning of the quotes again. And if your quote-of-the-day page doesn't receive any visitors on a given day, the given quote-of-the-day will be shown the next day too. It simple, yet smart. | ||||||
| Uploading Files in PHP 1 | SS | 4.0 | 7612 | 2002-09-11 04:22:11 | [ show ] | |
| Uploading files in PHP Think of an application where you want your users to upload files to your machine. Uploading files in PHP is very easy. You can upload any type of file from client to server. Files are uploaded from the browser using an <input> tag, set the type parameter in the <input> tag as "File". This is supported by all popular browsers currently available on the market. Important thing is to set the ENCTYPE attribute of the form to "multipart/form-data" and set the form's action element to the file upload page. The file upload page will handle the file uploading. Here is the code: Create a simple html form for submitting the file: <html> <form action="myupload.php" method=post enctype="multipart/form-data"> submit this file: <input type=file name="userfile"><br> <input type=submit><br> </form> </html> Now, create a php file named as "myupload.php": <html> <? if(!empty($userfile)) { //copy the file to some permanent location copy($userfile, "/php/www/files/myfile.txt"); //destroy the file unlink($userfile); //display message echo("file uploaded"); } ?> </html> Details: Handling uploaded file is very easy in PHP. First, the file is saved in the temporary directory of your operating system (if you have not set the path to your own temporary directory in the php.ini file). You can copy the uploaded file from the temporary directory to the location of your choice. The file in the temporary directory is automatically destroyed at the end of the request. File name is accessible in the same way as all form data. In our code, we have set the name for the uploaded file as "userfile". You can access this variable in the upload file page as $userfile. We copy the file to a permanent location using the copy() function. Although, the uploaded file is automatically destroyed at the end of the request but its a good practice to destroy the file explicitly. You can use the unlink() function to destroy the file. You can check if the file has been uploaded to the server using different attributes provided by the PHP. For example, if you dont want to allow your users to upload the same file again and again, you can put a restriction on the user to upload new files only. We can set limit on the size of the file to be uploaded by adding an <input> element with the NAME attribute set to MAX_FILE_SIZE and the VALUE to the upper limit. I havent demonstrated this in my sample code but here the piece of code for your reference: <input type=hidden name=MAX_FILE_SIZE value=1024> <imput type=file name=userfile> Remember, the hidden <input> tag should precede the file <input> tag. Place a check before displaying a message, use the empty() function to check if $userfile variable contains something or not, if its empty then display the message telling the user that the file hasn't been uploaded otherwise display the message that the file has been uploaded successfully. | ||||||
| uploading files in PHP 1.0 | saifullah shafiq | -- | 6977 | 2003-09-26 10:01:46 | [ link ] | [ show ] |
| This small tutorial shows you how to upload files in PHP | ||||||
| Yahoo Stock Quote Slurper 0.2 | Juan Chico | -- | 13204 | 2003-09-25 11:08:14 | [ show ] | |
| /////////////yahooSlurp 0.2/////////// ChangeLog: 2000-18-02: basic functionality done: grab one version of Yahoo's stock quote images, and yank it out to your own page. | ||||||
Comments or questions?
PX is running PHP 5.2.11
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.