Thursday 31 October 2013

How to Import CSV File Data Into Mysql Using PHP


How to Import CSV File Data Into Mysql If you are a developer then definitely you might have faced this. Many times you need to import data from a CSV (comma separated value) file and insert it into your MySQL database. Say for Example consider a case when you have many records in a CSV file and you need to import them into your MySQL database then you can’t insert each n every single record manually as it will take too much time.


Tuesday 29 October 2013

Error: SQLSTATE[HY000]: General error: 1364 Field ‘xyz’ doesn’t have a default value


By default, MySQL is enabled with strict_mode ON, which will most likely cause problems with older PHP applications written for MySQL 4. For example, strict mode will return an error on insert statements if an empty string is provided where an integer is expected.
You may disable strict mode in one of two ways:

you can run the following in phpMyAdmin
SET @@global.sql_mode="";
or Open your “my.ini” file within the MySQL installation directory, and look for the text “sql-mode”. Find:
# Set the SQL mode to strict
 sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION”
and change to
# Set the SQL mode to strict
sql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
********

Wednesday 23 October 2013

Username Availability Checker With jQuery and Ajax


You might have seen many websites which checks username availability in real time during registration process.For example Gmail or twitter sign up processes, their registration process is user oriented , it tells user availability on run time.
This Article is to create a similar script which will tell username availability at run time.

In this article we are checking the username entered by the user during filling the form with the usernames already stored in the database using Ajax and Jquery on run time.



Read more >>

Monday 21 October 2013


How to install adobe reader on ubuntu



This article help you to install adobe reader on Ubuntu
Adobe reader is a free and most trusted software to view PDF documents.it is the one of the essential software must installed in all kind of operating systems like linux , windows , MAC, tablets and mobiles

Read more >>

Thursday 17 October 2013

Linux Chown Command Examples to Change Owner and Group


The concept of owner and groups for files is fundamental to Linux. Every file is associated with an owner and a group. You can use chown and chgrp commands to change the owner or the group of a particular file or directory.

In this article, we will discuss the ‘chown’ command as it covers most part of the ‘chgrp’ command also.

1. Change the owner of a file
$ls -l filename
-rw-r--r-- 1 srinu chilukuri 0 2013-10-16 20:03 filename

$ chown root filename

$ls -l filename
-rw-r--r-- 1 root chilukuri 0 2013-10-16 20:05 filename

So we see that the owner of the file was changed from ‘srinu’ to ‘root’.

Wednesday 16 October 2013

Character counter in JavaScript


This is about creating a character counter for textarea and limit it accordingly. You may have seen this kinda stuff in some messaging site mostly in sites which provides SMS facilities. They limit us to enter only specified number of characters in text area. Also in some sites there are limitation on characters in comments.Twitter also having character limit in tweet.

Iam explained in this article, how to use the count character javascript with the help of a form. The count value decreases when you type each character into textbox.

Read more >>

Tuesday 8 October 2013

Php script for downloading files


In this article am going to explain you how to create PHP file downloader to download any files from web server to local machine. This application works mainly on the header of the PHP.
When you want to download any file you need to send the file name to this application, rest of the thing PHP will handle.


Saturday 5 October 2013

file_get_contents vs cURL


In this Post,I will explain difference between file_get_contents and curl.

PHP offers two main options to get a remote file, curl and file_get_contents. There are many difference between the two. Curl is a much faster alternative to file_get_contents.

Using file_get_contents to retrieve http://www.knowledgecornor.com/ took 0.198035001234 seconds. Meanwhile, using curl to retrieve the same file took 0.025691986084 seconds. As you can see, curl is much faster.

file_get_contents - It is a function to get the contents of a file(simply view source items i.e out put html file contents).

Friday 4 October 2013

Tweet Images using PHP (Twitter API)


Hi already I'm Expalin about how to create Twitter App ,Today i have worked on Twitter Oauth in this post expalin about how to tweet with images using php with Twitter API.

First we have to Create Twitter App The Twitter App Creation Process Find Here

How the Tweet Images Code Works?
The code for tweet images divided in two files, the first is “start.php” where the code start and a second file “callback.php” where twitter will redirect user back after giving authorization to our app. (the URL to our callback.php file has been updated in App settings at the time of app creation )