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

Monday, 11 March 2013

SEO - How long it really take to rank?


SEO - Search Engine Optimization

Optimizing a website takes time.

         Even with professional help and top-notch tactics, it takes time.  Of course there are those who will promise results quicker, those who say they can get you to number 1, or that they can get you high ranked within a few weeks. The truth is, this is just not how it works. Results take time, especially if you are the new kid on the SEO block.
         Building a high-ranking site through SEO means creating meaningful relationships and establishing a solid reputation. Rankings with Google or any other search engine means creating trust. …creating unique compelling content ….creating keyword rich content relevant to that page and so much more.
         On-the-level SEO professionals using white hat marketing techniques should bring your site success based more or less on the following timeline:

First Month

You contact someone with the SEO marketing know-how to design your SEO strategy. They utilize as many SEO techniques as they know and develop a strategy based on your site and vertical. Your page is released, with its SEO strategies in place, and your site begins to be cached by Google. The caching process should take between 4-6 weeks on average. 

Next 2 to 3 Months

You continue to add fresh unique content and new pages on your web site, including calls to action, new headlines from your RSS feed. You consider building a keyword-rich blog to increase your new content, RSS feeds, and keyword opportunities.

Next 6 Months

All of your pages are completely indexed by Google and other search engines, and the sites will now be determining your semi-permanent ranking. Your ranking will continue to slowly climb as you continue adding increasing amounts of new content and by increasing the quality of that content. Your back-linking strategy should also be improving steadily.

Next 2 Months to 24 Months

Your traffic will be at full throttle and your page rank should be quite high. You will be figuring little ways to tweak your site and improve your content in order to rise up a few spots to the very top.

Remember with SEO your rankings will constantly be shifting up and down because you are competing with all of the other web sites out there that are also trying to gain top rankings for the same keywords as you are, so the more often you add fresh new content to your web site the more often your sites rankings will shift …and the goal is for the better!


Thank You...

Friday, 15 February 2013

Different Google Games... Try It and Enjoy

1. Just open this URL http://www.funny-google.com/ and you can See two text box go to second text box and type your name and see what is happening.

2. Go to google page and type "do a barrel roll" its more interesting and try it and enjoy.

3. Open your browser and type the google URL in reverse like http://elgoog.im and see you google home page.

If your enjoyed this give your comment

Tuesday, 12 February 2013

Google Custom Search Engine With Your Website

Easy 3 Steps to create a Google Custom Search Engine With Your Website

Type 1:

   1. Login with your Gmail account in the below link
                                  http://www.google.com/cse/

   2. Enter your Valid Website Name in SITE TO SEARCH text area and click CREATE BUTTON.

   3. Google will generate and produce a coding, copy that coding and paste it in to your website coding and now run your website in browser, your website will appear with GOOGLE CUSTOM SEARCH Engine bar..

Type 2:

<form id="searchbox" action="http://www.google.com/search">
<input type="hidden" name="cx" value="Replace Value provide by google CSE" /> 
<input type="hidden" name="cof" value="FORID:0" />
<input name="q" type="text" size="40" />
<input type="submit" name="sa" value="Search" />
<img src="http://www.google.com/coop/images/google_custom_search_smnar.gif" alt="Google Custom Search" />
</form>

Thank You,
If this posting useful then comment.