Thursday, February 11, 2016

create your own social network website part 1



Here we discuss ,
1.How to download and install, setup local server program.
2.How to run local server, start server and server services.
3.How to Create social network database(using phpmyadmin) including users table, Post table, comment table, like table, reply table, image table, video table.
5.How to setup and insert data to column, create type, function and values to the mysql tables.
4.How to set up relations between mysql tables.
5.How to create required web folders, php files, javascript files, css files.
6.How to create relations with those php, js, css files.
8.How to create default images for your website.

  • Web folder view
  • Index.php



  • /php/ folder View
  • folder_connection.php


  • /js/ folder view
  • /images/post/ folder view
  • /images/user/ folder view
  • What is Next?

we discuss in next part
1.How to download jquery for your website.
2. Create basic html/php file.
3.Write your first css, php, html, javascript file.
4.Create index.php file.(this is view of first time someone visit your site).

Keep touch with us.
1.Subscribe channel(https://www.youtube.com/channel/UCZRRNuSY1YfrBkxJRGwSLuQ).
2.Blog(http://rengerhacker.blogspot.com) or (http://hackqeepbyesk.blogspot.com/)

More channels. Enjoy Other ESK TV Network
Home Channel (http://goo.gl/vznvEj)
Gaming Channel (http://goo.gl/GoaqK1)
Travel & Natural Channel (http://goo.gl/Cdh6H4)
News Channel (http://goo.gl/kdcDe4)
Pets & Animals Channel (http://goo.gl/CU4ewh)

Saturday, November 14, 2015

Advance guest views counter


  • Create 32 bit hash using php.
  $randomString = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 32);
  • Advance Guest views counter with month valid cookie.
setcookie($guest, $randomString, time() + (30*86400), "/"); // 86400 = 1 day
  • Full Example.

<?php
$guest = "Guest";
if(!isset($_COOKIE[$guest])) {
$guestid = "";
    echo "Cookie named '" . $guest . "' is not set!";
    $randomString = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 32);
setcookie($guest, $randomString, time() + (30*86400), "/"); // 86400 = 1 day

if ($randomString != "") {
$sql = "INSERT INTO guest (hash, views) VALUES ('$randomString', '+1')";
if ($con->query($sql) === TRUE) { echo "You Can Enjoy Site As Guest.Some Features Maybe Disable for Unregistered Users."; } else { echo "Error: " . $sql . "<br>" . $conn->error; }
}
} else {
    echo "Cookie '" . $guest . "' is set!<br>";
    echo "Value is: " . $_COOKIE[$guest];
  $sql = "UPDATE guest SET views=views+1 , lastvisit=Now() WHERE hash='$_COOKIE[$guest]'";
if ($con->query($sql) === TRUE) { echo "You Can Enjoying Site As Guest.Some Features Maybe Disable for Unregistered Users."; } else { echo "Error: " . $sql . "<br>" . $con->error; }
$result = mysqli_query($con,"SELECT * FROM `guest` WHERE `hash` LIKE '$_COOKIE[$guest]'");
while($check = mysqli_fetch_array($result)) {
$guestid = $check['id'];
echo "Guest id is" . $guestid;
}
?>
  • Database.

mysql sum() funtion


  • SUM() Function Use To Get Total Sum Of a Numeric Column.
  • Example Code.
<?php require 'DB_conn.php'; ?>
<?php
$result = mysqli_query($con,"SELECT SUM(views) AS views FROM guest;");
$user_count = 1;
while($check = mysqli_fetch_array($result)) {
$offline_views = $check['views'];
$user_count++;
}
echo $offline_views . "<br>";
echo $ofline_user_count;

?>

  • Database.
  • Result given.
9
7

Monday, December 9, 2013

How to hide your image, video, files, even folder in Android phone/Tab

Just need change folder name with . like image folder.after you change it never show that folder inside images or videos in your gallery.(ex .Images)