Web Development Blog

Web development tutorials, SEO articles and PHP script resources

Subscribe to this blog

Archive for the ‘PHP scripts’ Category

Thursday
Oct 11,2007

FTP hosting is often much cheaper than regular web hosting. The upload with an ftp client is for sure the most common way, but could be a problem for people behind a firewall or without enough rights (capabilities) to install a FTP client. For those a upload via a web form is the best solution.

Upload limitations by your web server

The default value for file uploads within PHP is 2MB, if you need to upload bigger files you need to change your PHP configuration or need to create a .htaccess file with this code to upload files of max. 16MB:

php_value upload_max_filesize 16M
php_value post_max_size 20M

The value for the post_max_size is larger than the value for the upload_max_size because we want to be able to upload more than just a file (also other data via text fields or text areas). The .htaccess file needs to be in the same directory than your upload script.

Using cURL for file transmissions

cURL is a great library for file transmissions via different types of protocols. The library supports the transport via POST, GET, FTP upload and much more. cURL is also able to authenticate on the target server or website.

In this tutorial we want to upload a file to some (password protected) remote FTP server via a web form. (more…)

Monday
Sep 24,2007

For a future project I needed these days some easy to use zip or gzip class to create a zip file from files / folders inside a specified directory. A short search on Google has lead me to the Create ZIP File PHP class from Rochak Chauhan. I tested two other scripts before and must say that this script works great for single files if you add them manually.

To compress a whole directory with an unknown number of files into one zip file I created some class extension to get this job done.
I used some directory functions (opendir, readdir) to get all the files from the specified directory. Inside each directory there are files and “real directories” and directory locations. We need only the real directories. We test each value with “is_file”, “is_dir” and we filter off the directory directions (”.” and “..”). After the “file” is identified, the files content is added to the “addFile” object and for other directories the method “get_file_from_folder” is called again. (more…)

Sunday
Jul 8,2007

XS4ALL is one of the biggest ISP’s in the Netherlands and is a specialist in ADSL and hosting products and services for home and business customers. I know XS4ALL as a real service provider, everytime I called the helpdesk they were able to analyze and solve my problem in a short time.

Ok, enough about the company, for some time now they are looking for experienced PHP programmers, check their Job offer if you’re located in the neighborhood of Amsterdam (or if you have your own helicopter ;)) and send in your resume to become a member of their great team of employees.

Friday
Jun 15,2007

Finally after waiting a few years, the PHP conference 2007, held in Amsterdam, is on a date (16th June 2007) where it’s possible to me to join this important PHP event without to cancel my vacation. ;)
The Conference this year is first time organized by the Dutch Zend partner “Ibuildings.nl” and has a very “heavy” agenda:

  • Trends (Object orientation, mash-ups…)
  • Frameworks (Zend framework, Symfony, ATK)
  • Databases (Oracle, stored procedures in MySQL 5)
  • Enterprise Solutions (diff. show cases)

OK, you can’t follow all this stuff in several hours. Thats why you have to choose from three presentations from every block. I hoped to meet some of the founders of PHP or Zend, but this year I have to listen to speakers like Cal Evens, Derick Rethans and some others…