Posts

Showing posts from October, 2014

Search technique used on Google

Image
Some time we require some specific result on Google rrsult .
Here are some important tips used in searching something on Google.Taken from:
bhaskar news papaer

Rangoli on Deepavali 2014

Image
On the Occasion of Diwali, Every Home want there Rangoli to be best from neighborhood.

I have click some Picture of my Near My home as well as my home.  

You can comment which one is best ....


















Make Image Thumbnail on Upload Time.

Today, we will talk about how to Make a Thumbnail  Image of Image uploaded via a File Upload using PHP.

For this I have created a script, which we have to upload anywhere in the website, where you want to upload the files.

Now use this code and save as createimage.php


***********************Code***********************<?php
if(!isset($_GET['fileurl']))
{
exit();


$fileurl = $_GET['fileurl'];

// actual script begins here
$type=false;
function open_image ($file) {
    //detect type and process accordinally
    global $type;
    $size=getimagesize($file);
    switch($size["mime"]){
        case "image/jpeg":
            $im = imagecreatefromjpeg($file); //jpeg file
        break;
        case "image/gif":
            $im = imagecreatefromgif($file); //gif file
      break;
      case "image/png":
          $im = imagecreatefrompng($file); //png file
      break;
    default: 
        $im=false;
    break;
    }
    return $im;
}

$url = $_GET['url'…

Upload File Using PHP - Example For Image

Create The HTML Form

Create an HTML form, so you can choose file want to upload:

***********************Code*********************** <form action="upload.php" method="post" enctype="multipart/form-data">
  Please choose a file:
<input type="file" name="uploadFile" accept="image/*" />
<br>
  <input type="submit" value="Upload File" />
</form>
***********************End of Code*********************** On the Above code accept is use for accepting only Image file as a File Input. If no accept is specify, All File are accepted.

Create a upload.php file , whose code will be as Follow: ***********************Code*********************** ?php
$target_dir = "uploads/";
$target_dir = $target_dir . basename( $_FILES["uploadFile"]["name"]);
$uploadOk=1;

// Check if file already exists
if (file_exists($target_dir . $_FILES["uploadFile"]["name"])) {
    …

How to add facebook Comment Box into Website

Image
To add Facebook Comment bot into Website Open the Following link:

https://developers.facebook.com/docs/plugins/like-box-for-pages   After Insert your website URL, Where you want to Comment to be appear and Comment.



Click the add code, The codes will be appear.

You have to insert the the code into your page, where you want this plugin to appear.

Half Girlfriend

Multiple Page on a single page using PHP with Switch Condition

Here we will learn to use Switch Statement to Manage Multiple page on a Single Page.

We will use GET Variable for checking the condition, which page we have to show.
Following is the code: <?php // make condition if(isset($_GET['page'])) { $pagetoshow = $_GET['page']; } else { $pagetoshow = "index"; } // make condition

// execute condition
switch($pagetoshow) {
case "about": // content for about
 echo "This is the about page.";
// content for about break;
case "contact": // content for contact
 echo "This is the contact page.";
// content for contact break;
default: // content for index
 echo "This is the index page.";
// content for index
break;
}
// execute condition
?>

Following will be the O/P of the code:
Save page as index.php index.php This is the index page. index.php?page=about This is the about page. index.php?page=contact This is the contact page.
index.php?page=index This is the index page.

Other t…

Get Full date with time using PHP

Image
For Getting date there is a Function "date" which accept argument and Return sa the argument pass to it.
Example is: <?php // assume today date is 06th October 2014echo date('Y-m-d'); // will print 2014-10-06echo date('y-m-d'); // will print 14-10-06 /*  there is different between each capital and small character, which passes on argument. See the abov output. */  ?> 
For Getting Default TimeZone <?php /*  this function "date_default_timezone_set" is used for setting the timezone on the script.   */ date_default_timezone_set('Asia/Kolkata')
/*  this will set Indian Timezone, You can get list from here  http://php.net/manual/en/timezones.php
*/  ?>
For Getting the Date with Time: <?php date("Y-m-d H:i:s");   // output:  2014-10-06 14:01:36
?>



Post directly from Email into Blogger

Hello, I am testing email piping system of the email.
Email piping is the system in which the email is not only save into email server, but also another task like a script execution when the email shoots.
In Blogger, Like this I am sending email is saving into my gmail server  But also the Post is publishing on the the connected Blog. To setup a email piping into Blogger, Just you have to go into setting of the Blog and Put a secret word on email appearing on there.
Now you just have to send email into this email to Post.
Email Posting using email ?abcde.  @blogger.com
Publish email immediately 
Save emails as draft post 
Disabled

Vijaya Dashmi 03th September, 2014

Image