Saturday, 24 August 2013

Awesome features in iOS 7

Take a look of New Features in Apple Phone (iPhone)




---------------------------
Thank You, Post Your Comments

Friday, 26 July 2013

How Access Card Works?

How Access Card Works?

Security passcards are often used to gain entry into areas and buildings with restricted access. The security passcard may be for general access, meaning that the passcard does not provide data about the person using it, or it may be individually encoded, containing specific information about the cardholder.
Typically, the data on an encoded security passcard includes:

  • Name
  • ID # (social security number or other unique number)
  • Access level (where you're allowed to go)
An individually-encoded passcard looks a lot like a credit card. The stripe on the back of the security passcard is a magnetic stripe, often called a magstripe. The magstripe is made up of tiny, iron-based magnetic particles in a plastic-like film. Each particle is really a very tiny bar magnet, about 20 millionths of an inch long. The magstripe on the back of the card is very similar to a piece of cassette tape.

The magstripe can be "written" because the tiny bar magnets can be magnetized in either a north- or south-pole direction. When the polarity of the bars aligns in the same direction, the card is blank. To write data requires a process called flux reversal. Basically, the polarity of a bar is reversed so that the north pole is facing the north pole of the adjacent bar (N-N) or the south pole is facing the south pole (S-S). This causes a change in the magnetic field that can be detected by the card reader. Since there can be two different flux reversals, N-N or S-S, there can be two different information states. This corresponds nicely to the binary system of 1s and 0s used by computers.

Writing the data requires the use of an encoder. The encoder has an electromagnet that acts as the encoding head. The solenoid is shaped like a ring with a small piece missing. The two ends, north pole and south pole, face each other across this gap, creating a magnetic field. This field varies in strength with the level of current sent through the solenoid. A change in strength can reverse the polarity of the tiny magnetic bars in the magstripe if they are positioned in the gap of the encoding solenoid. By reversing polarities in a certain sequence, the encoder writes data to the card.

A card reader can understand the information on the magstripe. A reader detects the changes in its magnetic field caused by the flux reversals on the passcard's magstripe. Most readers use one of three methods for reading the card:

Swipe reader - You swipe the card through a long, narrow slot that is open at each end.
Insert reader - You insert the card into a small receptacle that is just large enough to accommodate the card.
Proximity reader - You hold the card in front of the blank face of the reader.

Most general-access cards use a magstripe, but some may have a different method for access. For example, one common alternative is to embed a tiny radio transmitter in the passcard. These cards can be either "active" (containing a small battery) or "passive" (relying on the radio reciever for power). When the card is within a certain distance of the radio receiver, usually just a few feet or even a few inches, the security system confirms the signal being transmitted and provides access to the area or building.

Thank You,
Post Your Comment if this is useful.

Sunday, 14 July 2013

About Cookies

What is a cookie?

    Cookies are used to store the information of a web page in a remote browser, so that when the same user comes back to that page, those information can be retrieved form the browser itself. In this tutorial we will see what is Cookies in PHP. 


Uses of cookie

Cookies are often used to perform following tasks: 

Session management: Cookies are widely used to manage user sessions. For example, when you use an online shopping cart, you keep adding items in the cart and finally when you checkout, all of those items are added in the list of items you have purchased. This can be achieved using cookies.   

User identification: Once a user visits a webpage, using cookies, that user can be remembered. And later on, depending upon the search/visit pattern of the user, content which the user likely to be visited are served. A good example of this is 'Retargetting'. A concept used in online marketing, where depending upon the user's choice of content, advertisements of relevant product, which the user may buy, are served.   

Tracking / Analytics: Cookies are used to track the user. Which, in turn, is used to analyze and serve various kind of data of great value, like location, technologies (e.g. browser, OS) form where the user visited, how long (s)he stayed on various pages etc.

We will discuss about cookies with Example in Next Post...

Thank You

Wednesday, 22 May 2013


Sending mail with attachment using php

HTML Design:

<form id="attach" name="attach" method="post" action="attach.php" enctype="multipart/form-data">

     <table>
         <tr>
              <td>To</td><td>:</td><td><input type="text" name="to" id="to"></td>
         </tr>
         <tr>
              <td>Subject</td><td>:</td><td><input type="text" name="subject" id="subject"></td>
         </tr>
         <tr>
              <td>Message</td><td>:</td><td><input type="text" name="msg" id="msg"></td>
          </tr>
          <tr>
              <td>Attachment<span class="imp">*</span></td><td>:</td><td><input type="file" name="upload" id="upload"></td>
          </tr>
          <tr>
              <td></td><td></td><td><input type="submit" value="Submit" id="send" name="send"></td>
          </tr>
    </table>
</form>

PHP Script File (attach.php):

<?php


 if(isset ($_POST["send"]))
 {
    $upload_name=$_FILES["upload"]["name"];
    $upload_type=$_FILES["upload"]["type"];
    $upload_size=$_FILES["upload"]["size"];
    $upload_temp=$_FILES["upload"]["tmp_name"];
    $message=$_POST["msg"];
    $subject = $_POST["subject"];
    $to=$_POST["to"];


    if($message==""||$subject==""||$to=="")
    {
        echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#F3363F; font-weight:bold">Please fill all fields</font>';
    }
    else
    {
        $fp = fopen($upload_temp, "rb");
    $file = fread($fp, $upload_size);

    $file = chunk_split(base64_encode($file));
    $num = md5(time());

        //Normal headers

    $headers  = "From: Info Mail<serma2089@gmail.com>\r\n";
       $headers  .= "MIME-Version: 1.0\r\n";
       $headers  .= "Content-Type: multipart/mixed; ";
       $headers  .= "boundary=".$num."\r\n";
       $headers  .= "--$num\r\n";

        // This two steps to help avoid spam

    $headers .= "Message-ID: <".gettimeofday()." TheSystem@".$_SERVER['http://www.webizyme.com'].">\r\n";
    $headers .= "X-Mailer: PHP v".phpversion()."\r\n";

        // With message

    $headers .= "Content-Type: text/html; charset=iso-8859-1\r\n";
       $headers .= "Content-Transfer-Encoding: 8bit\r\n";
       $headers .= "".$message."\n";
       $headers .= "--".$num."\n";

        // Attachment headers

    $headers  = "Content-Type:".$upload_type." ";
       $headers  .= "name=\"".$upload_name."\"r\n";
       $headers  .= "Content-Transfer-Encoding: base64\r\n";
       $headers  .= "Content-Disposition: attachment; ";
       $headers  .= "filename=\"".$upload_name."\"\r\n\n";
       $headers  .= "".$file."\r\n";
       $headers  .= "--".$num."--";

    // SEND MAIL

       $check = mail($to, $subject, $message, $headers);
       echo $check;

     fclose($fp);
     if($check){
    echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#333333; font-weight:bold">Mail sent please check inbox and spam both <br /></font>';
}
 }
 }
?>

I hope this will be helpful for all web developers.

Thank You


Friday, 5 April 2013

About PHP


PHP: Hypertext Preprocessor

             PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP is now installed on more than 244 million websites and 2.1 million web servers. PHP Originally created by Rasmus Lerdorf in 1995, the reference implementation of PHP is now produced by The PHP Group.
               PHP code is interpreted by a web server with a PHP processor module which generates the resulting web page: PHP commands can be embedded directly into an HTML source document rather than calling an external file to process data. It has also evolved to include a command-line interface capability and can be used in standalone graphical applications.
             PHP is free software released under the PHP License, which is incompatible with the GNU General Public License (GPL) due to restrictions on the usage of the term PHP. PHP can be deployed on most web servers and also as a standalone shell on almost every operating system and platform, free of charge.
                To Execute PHP programs user can use the local server software's like XAMPP and WAMPP.

Thank You
S. SERMA ARUNACHALAM