Posts

Visitor Counter with cookies in PHP

Image
Here we are describing how we can check visitor in a website with he help of Cookies in PHP. We will setup a cookies in the user Browser for one year. So we will first check about that particular cookies present in User's Browser. If the cookies is present in the User's Browser (Client Computer) , we have to do nothing on that condition, as the user is old for the that website. If the cookies is not present in the user's Browser, we will setup the cookies in the user's Browser and update the details on the database for total count for that website, we are using the visitor counter. So the first condition to check we have is: is the cookies is present in the Browser:  For this we have the function on php, which is isset(),  This function is used for checking the variable is set in the Program or not.   The cookies, we will create with the name of "isvisitor" So the code will be as follow: <?php if(isset($_COOKIES)) ?>

Common Mistake in Echo statement

Image
I am describing a little problem, Normally face by a programmer. This is a common Problem, Which can Produce in a large program a wrong output. So, You know the use of echo in PHP, which used for displaying data or some result in the webpage. Example are as follow: <?php //   (1)  for displaying some paragraph; echo "I am writing a code."; // it will display the line on the webpage:   I am writing a code. //    (2) For addition of Numbers echo 3+3; // It will display on the webpage: 6 //   (3)  Paragraph and addition of numbers echo "The Sum is : 3 + 3 :". 3 + 3; // it will display on the webpage:   6 ?>

Australia vs India, 2nd Test, Woolloongabba, Brisbane on 17th December to 21th December, 2014

Australia vs India, 2nd Test, Woolloongabba, Brisbane Day 2: Stumps - Australia trail by 187 runs India 1st Innings : 408/10 in 109.4 ovs Batsmen Out Description R B 4s 6s SR Murali Vijay c Haddin b N Lyon 144 213 22 0 67.61 Shikhar Dhawan c Haddin b M Marsh 24 39 0 0 61.54 Cheteshwar Pujara c Haddin b J Hazlewood 18 64 1 0 28.13 Virat Kohli c Haddin b J Hazlewood 19 27 1 0 70.37 Ajinkya Rahane c Haddin b J Hazlewood 81 132 8 0 61.36 Rohit Sharma c S Smith b Watson 32 55 3 1 58.18 MS Dhoni (c & k) c Haddin b J Hazlewood 33 53 4 0 62.26 Ravichandran Ashwin c Watson b J Hazlewood 35 41 6 0 85.37 Umesh Yadav c Chris Rogers b N Lyon 9 21 2 0 42.86 Varun Aaron c (sub)Marnus Labuschagne b N Lyon 4 11 0 0 36.36 Ishant Sharma not out 1 3 0 0 33.33 Extras : (b -4, w -2, nb - 1, lb - 1