Archive

Archive for the ‘Uncategorized’ Category

Nepal Nirvana

January 7, 2015 Leave a comment

nirvana

Nepal Nirvana
Every motorcycle ride is a collection of small stories. Experiences, bundled up into fond memories for a lifetime.

Nepal is an enigma. When thinking about this country, what comes to mind are the mighty Himalayas and heroic feats of men and women who have set foot on some of the tallest mountains in the world. There’s more to Nepal than just mountaineering though.

Adventure in Nepal is a way of life. Once here, the ideal ingredients for adrenaline gushing, heart rate increasing and mind altering travel are found in every corner. It was time we took the Nirvana tread to Nepal!

Nepal is a neighbour to India and a mystery to everyone who hasn’t been to this country of concoctions. One of the smallest countries in the world is a window into some of the the biggest mountain ranges in the world. Not to mention the downright dumbfounding natural beauty…

View original post 1,224 more words

Categories: Uncategorized

Connecting PHP with Oracle

September 6, 2012 Leave a comment

அறிவுச் சுடரேந்து

PHP provides two extension modules with which we can connect to Oracle:

  • The normal Oracle functions (ORA); and
  • the Oracle Call-Interface functions (OCI).

OCI is frequently used. ORA doesn’t include support for CLOBs, BLOBs, BFILEs, ROWIDs, etc.

Here is a sample PHP script that uses OCI Extension module to connect Oracle.

<?php

$dbuser = “username”;
$dbpass = “password”;
$dbserver = “server”;
$c=OCILogon($dbuser, $dbpass, $dbserver);
if (!$c) {
$err = OCIError();
echo “Oracle Connect Error ” . $err[text];
}

OCILogoff($c);

?>

The following program fetches data from Oracle database using OCI :

<?php

$dbuser = “username”;

$dbpass = “password”;

$dbserver = “server”;

$c=OCILogon($dbuser, $dbpass, $dbserver);

if (!$c) {

$err = OCIError();

echo “Oracle Connect Error ” . $err[text];

}

$query =”SELECT * from student_details”;

$res= OCIParse($c,$query);

OCI_Execute($res, OCI_DEFAULT);

while(OCIFetch($res)){

$student_id = OCIResult($res, “STUDENT_ID”);

echo “Student Id” . $student_id;

}

OCILogoff($c);

?>

View original post

Categories: Uncategorized

scary Facebook …

September 6, 2012 Leave a comment

.

pindanpost

Wolfram Alpha: The Facebook app that knows you better than you do

  • by: Claire Connelly
  • From: News Limited Network
  • September 05, 2012 8:39AM
Facebook

New app crunches the numbers on your Facebook page. Picture: File

A FACEBOOK app known as “Wolfram Alpha” knows more about your social media use than you do.

In fact it’s a little bit scary.

By searching for “Facebook Report” and allowing it to access my Facebook feed I have found out I had posted 1293 links, 946 status updates and uploaded 237 photos on Facebook.

That’s 2476 posts all up. I spend way too much time on Facebook.

The app showed 47.5 per cent of my friends were female and 52.5 per cent were a male. Almost 50 per cent of my friends are married and

View original post

Categories: Uncategorized

Implement Cache using PHP

July 23, 2012 Leave a comment

Cache is a very simple concept that can be used in a various web applications . A cache can be used for storing database queries for later use, to store rendered pages to be served again without generating them again, or to save indexed pages in a crawler application to be processed by multiple modules.

here will see how to implement Cache into your website

First of all, if you’re using sessions, you must disable session_cache_limiter (by setting it to noneor public). Headers it sends are the worst case of voodoo programming I’ve ever seen.

session_cache_limiter('none');

Then send Cache-Control: max-age=number_of_seconds and optionally equivalent Expires:header.

header('Cache-control: max-age='.(60*60*24*365));
header('Expires: '.gmdate(DATE_RFC1123,time()+60*60*24*365));

To get best cacheability, send Last-Modified header and reply with status 304 and empty body if browser sends If-Modified-Since header.

This is cheating a bit (doesn’t verify the date), but is valid as long as you don’t mind browsers keeping cached file forever:

if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
   header('HTTP/1.1 304 Not Modified');
   die();
}
Categories: Uncategorized

Upload image Using PHP and store name into MySQL Database

June 1, 2012 6 comments

Here I will show you how to upload the image using PHP . and  store that image into Specific folder and store the name of image intp Mysql database as well 

Before Start you need to create a database in your MySql Database . and you need to configure

1) Create a HTML Form and Copy this Code

<form method=”post” action=”addMember.php” >

<p>
Please Upload a Photo of the Member in gif or jpeg format. The file name should be named after the Members name. If the same file name is uploaded twice it will be overwritten! Maxium size of File is 35kb.
</p>
<p>
Photo:
</p>
<input type=”hidden” name=”size” value=”350000″>
<input type=”file” name=”photo”>

<input TYPE=”submit” name=”upload” title=”Add data to the Database” value=”Add Member”/>
</form>

2) You need to create another file = addMember.php and then copy below code

<?php

//This is the directory where images will be saved
$target = “your directory”;
$target = $target . basename( $_FILES[‘photo’][‘name’]);

$pic=($_FILES[‘photo’][‘name’]);

// Connects to your Database
mysql_connect(“yourhost”, “username”, “password”) or die(mysql_error()) ;
mysql_select_db(“dbName”) or die(mysql_error()) ;

//Writes the information to the database
mysql_query(“INSERT INTO tableName (photo)
VALUES (‘$pic’)”) ;

//Writes the photo to the server
if(move_uploaded_file($_FILES[‘photo’][‘tmp_name’], $target))
{

//Tells you if its all ok
echo “The file “. basename( $_FILES[‘uploadedfile’][‘name’]). ” has been uploaded, and your information has been added to the directory”;
}
else {

//Gives and error if its not
echo “Sorry, there was a problem uploading your file.”;
}
?>

Enjoyyyyyyyyy

Categories: Uncategorized

Indian Youth Crowd Against Corruption

August 20, 2011 2 comments

Corruption is now become integral part of our life. I am not directly point to congress government. But I would like to know that the government had made their own lokpal bill for people. It does meet the requirement? Or Common people are satisfied with them. If yes. Then why common people are angry? Why government is not giving permission to new Janlokpal bill?

I  have read the very funny issue in Government lokpal that if any local citizens will complaint corruption case against any government officer. So that government officer can file a cross complaint directly to the special court without preliminary enquiry that weather complaint was frivolous. And after that Government officer given free advocate while the citizen has to defend himself.  If citizen can prove that the government officer is corrupted he will get minimum 6 month jail. If citizen fail to prove then citizen will get 2 years jail . Is this what a government lokpal?

Why Government is going against common people. Even why government arrests Anna hazare? Because he create nuisance. He was detained when he was sleeping. I never knew that a man in sleep could create nuisance. Isn’t funny? He is just tried to bring in change at normal level.  I would say anna hazare is the person who reborn as Gandhi.  Anna Hazare is now becomes a ideal person of young generation.

In future government will agree with Janlokpal. But this is not the end. It’s just a beginning. Lokpal bill should be just the start. Fight corruption in our daily lives too. Don’t just ask our leaders for it, ask ourselves too.

Categories: Uncategorized