Showing posts with label code sharing. Show all posts
Showing posts with label code sharing. Show all posts

Saturday, May 14, 2011

Email sending Via PHP - Text and HTML

Email is the most popular Internet service today. A plenty of emails are sent and delivered each day. The goal of this tutorial is to demonstrate how to generate and send emails in PHP.

So, you want to send automated email messages from your PHP application. This can be in direct response to a user's action, such as signing up for your site, or a recurring event at a set time, such as a monthly newsletter. Sometimes email contains file attachments, both plain text and HTML portions, and so on. To understand how to send each variation that may exist on an email, we will start with the simple example and move to the more complicated.
  1. Sending TEXT email with PHP
  2. Sending HTML email with PHP 
    Note that to send email with PHP you need a working email server that you have permission to use: for Unix machines, this is often Sendmail; for Windows machines, you must set the SMTP directive in your php.ini file to point to your email server.

    Monday, May 2, 2011

    Creating a Word Density Checker Function - PHP

    I was looking for some help of writing my keyword density checker class and found this function and it is worth sharing. Have a look at it.


    Function Code for calculating the word density goes as Follows:

    Saturday, April 30, 2011

    PHP Simple HTML DOM Parser - an Intoduction

    PHP Simple HTML DOM Parser, is one of the easiest DOM manipulation script written in PHP5+. Being Open source, it is free to use under the MIT License. Supporting invalid HTML, this parser is better then other PHP scripts that use complicated regexes to extract information from web pages. It helps to find tags on an HTML page with selectors just like jQuery.

    Some of the Usage examples are:

    Monday, April 25, 2011

    File Upload via CURL in PHP

    Most of us must have used CURL in PHP, But have you uploaded file using it. If not I must say it is very easy .

    Here is the simplest way to upload the file via CURL.

    Thursday, April 21, 2011

    A Wonderful Image upload and manipulation class "class.upload.php"

    Just found a great Image uploading and manipulation class written in PHP, by Verot.net

    Description as provided by the supplier::
    "The perfect script to generate thumbnails or create a photo gallery! It can convert, resize and work on uploaded images in many ways, apply effects, add labels, watermarks and reflections and other image editing features. You can use it for files uploaded through an HTML form, a Flash uploader, or on local files. It uses the GD library."

    You can Download it from: http://www.verot.net/php_class_upload.htm

    Tuesday, April 19, 2011

    Image resize and thubnail with PHP - functions

    As websites are getting more and more feature enabled and fully loaded with the multimedia, the need of managing the media like, Music, Images, Videos is increasing day by day. One of the most used media is Images. Image gallerias, Slideshows, light-boxes are common every site. Each of this task is going to need the image resize or creating smaller thumbnails to display. So here is a small function with which you can easily create thumbnails from the image. The following function can resize and crop the image dimensionally or just creating a perfect square.