adgoi

Sunday 19 July 2015

[Tutorial] How to make php visitor couter

This tutriol is very easy to understand and Its very easy to make a php visitor counter with using few funtions

First all create 3 files

hitx.zix
today.zix
lastday.zix

Note : here we are using .zix for no resone.

Ok, create count.php and put this code into this file

____________________________________

<?php

$ref = $_SERVER['HTTP_REFERER'];
$date = date('d');
$time = time();
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
    $ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
    $ip = $_SERVER['REMOTE_ADDR'];
}
//setting date
$today = file_get_contents("today.zix");

if(!$date==$today)

{ file_put_contents("today.zix",$date);

$old = file_get_contents("hitx.zix");
file_put_contents("lastday.zix",$old);

}

// time to mix all above var  s and put into a file

$file = "hitx.zix";

$exp ="-zix-";
$expl ="|";
$data = $ref.$exp.$ip.$expl;
$oldx = file_get_contents("hitx.zix");
$mixed = $oldx.$data;
file_put_contents($file,$mixed); ?>

____________________________________

Now the data what we want, will be saved into that 3 files

Now we need to get that data in simple formet.

So create file display.php and put this code into this (today's data)

____________________________________

<?php

//making parts of the data we saved

$counted = file_get_contents("hitx.zix");

$go = explode("|",$counted);

//counting total hits

$total = count($go);

echo "Total $total hits you got";

//displaying reffer,time and user's ip
for ($x = 0; $x <= 10000; $x++) {
if(!empty($go[$x]))
{
$gox = explode("-zix-",$go[$x]);

$total = count($gox);


echo $gox[0];
echo "<br/>";
echo $gox[1];
echo "<br/>";
echo $gox[2];
echo "<br/>";
echo $gox[3];
echo "<br/>";
echo "<hr/>";
}
} ?>
____________________________________

So this is last step, create a file display_lastday.php and put this code into this file
____________________________________

<?php

//making parts of the data we saved

$counted = file_get_contents("lastday.zix");

$go = explode("|",$counted);

//counting total hits

$total = count($go);

echo "Total $total hits you got";

//displaying reffer,time and user's ip
for ($x = 0; $x <= 10000; $x++) {
if(!empty($go[$x]))
{
$gox = explode("-zix-",$go[$x]);

$total = count($gox);


echo $gox[0];
echo "<br/>";
echo $gox[1];
echo "<br/>";
echo $gox[2];
echo "<br/>";
echo $gox[3];
echo "<br/>";
echo "<hr/>";
}
} ?>

____________________________________

Done. You made a good hit counter. Please note that lots of hits counters are avialeble and this is one good counter which is coded by me

Saturday 18 July 2015

Best Attitude Status for Whatsapp and Facebook

Nowadays, too many boys and man posts and tweets the attitude showing lines make a big image front of their friends or followers.
Also, makes attitude showing lines as their whatsapp status.
Attitude status for whatsapp, facebook and twitter.

 1.If someone hates you for no resone, go to front of him/her and give a resone.
2.Love is easy but, I'm buzy.
3."They Gave The Questions
Which I Dont Know
So I Wrote Answers Which
They Dont Know"
4.Being "Single" is My Attitude!
5.Good Girl are those which can help people, Bad Girl have no time to help...
6.I hate when people look at my status and say "Its Bakwas".
7.I wish I could have Genie who could make my dreams come true....
8.Don't See My Status, Appointment is needed..
9.if people have a problem with you then ask him her problem!..
11.Adopt a right attitude make you the negative thinking to postive thinking!
12.Weakness of attitude become weakness you!
13.I can't change the destination of wind but I can change the bad thinking of mine...
14.A bad attitude is plane tire if you not change it you can never think positive!.. 

15. I am not single I am not committed,
I am reserved for the one who deserves!!