Posts

Showing posts from 2016

codeigniter 3.1.0 change log

Change Log Version 3.1.0 Release Date: July 26, 2016 Security Fixed an SQL injection in the ‘odbc’ database driver. Updated set_realpath() Path Helpr function to filter-out php:// wrapper inputs. Officially dropped any kind of support for PHP 5.2.x and anything under 5.3.7. General Changes Updated Image Manipulation Library to validate width and height configuration values. Updated Encryption Library to always prefer random_bytes() when it is available. Updated Session Library to log ‘debug’ messages when using fallbacks to session.save_path (php.ini) or ‘sess_use_database’, ‘sess_table_name’ settings. Added a ‘LONGTEXT’ to ‘STRING’ alias to Database Forge for the ‘cubrid’, ‘pdo/cubrid’ drivers. Added ‘TINYINT’, ‘MEDIUMINT’, ‘INT’ and ‘BIGINT’ aliases to ‘NUMBER’ to Database Forge for the ‘oci8’, ‘pdo/oci’ drivers. password_hash() compatibility function changes: Changed salt-generation logic to prefer random_bytes() when it is available. Changed salt-generation logic t

Read Email messages using php

<?php class Email_reader { // imap server connection public $conn; // inbox storage and inbox message count private $inbox; private $msg_cnt; // email login credentials private $user   = 'usernam'; private $pass   = 'password'; // adjust according to server settings // connect to the server and get the inbox emails function __construct() { $this->connect(); $this->inbox(); } // close the server connection function close() { $this->inbox = array(); $this->msg_cnt = 0; imap_close($this->conn); } // open the server connection // the imap_open function parameters will need to be changed for the particular server // these are laid out to connect to a Dreamhost IMAP server function connect() { $this->conn = imap_open('{imap.gmail.com:993/imap/ssl/novalidate-cert}', $this->user, $this->pass); } // move the message to a new folder function move($msg_index, $folder='

Enable the imap in support in xampp server

As default, the IMAP support for PHP is deactivated in XAMPP due to some mysterious initialization errors with some home versions like Windows 98. If you work with NT systems, you can open the file "\xampp\php\php.ini" to activate the php exstension by removing the beginning semicolon at the line ";extension=php_imap.dll". It should be: extension=php_imap.dll Now restart Apache and IMAP should work. You can use the same steps for every extension, which is not enabled in the default configuration.

get the thumbnail of the you tube url

function get_youtube_thumb($link,$type){     $video_id = explode("?v=", $link);          if (empty($video_id[1])){            $video_id = explode("/v/", $link);             $video_id = explode("&", $video_id[1]);             $video_id = $video_id[0];         }     $thumb_link = "";     if($type == 'default' || $type == 'hqdefault' || $type == 'mqdefault' || $type == 'sddefault' || $type == 'maxresdefault'){         $thumb_link = 'http://img.youtube.com/vi/'.$video_id.'/'.$type.'.jpg';     }elseif($type == "id"){         $thumb_link = $video_id;     }     return $thumb_link;  }