Sunday 30 June 2019

Easiest Way To Get Hash Color Code Of Image Without Any Photo Editing So...











Hello guys, this is
unpossible pog here.
Today, I shall show
you the easitest way to get hash code of any image stored in your
computer without any photo editing software.

For that you only
need google chrome.
As you can see, I
have one image on desktop, and what I shall do is drag-and-drop it on
google chrome.
Now right click and
select on “INCEPT”.
Change the dock
location if you want to.

After that there is a background code
in styles tab, click on color, and select color picker, make sure
that it is marked in blue color.
Then move mouse
cursor at the image pixel, and do left click on it.
You will see, the
hash color code on image here.
That it guys.
Thank you for
watching, dont forget to like share and subscribe.

Sunday 16 June 2019

Easiest Way To Create Realtime Live Notification Count Like Facebook | PHP | AJAX | JAVASCRIPT




Code:-
notification.php

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<table width="100%" style="background-color: #0066ff;color: white;">
 <tr width="75%">
  <td>
   <h2>Welcome to facebook</h2>
  </td>
  <td width="15%">
   <i class="fa fa-bell" aria-hidden="true" id="noti_number"></i>
  </td>
 </tr>
</table>
<script type="text/javascript">
 function loadDoc() {
  

  setInterval(function(){

   var xhttp = new XMLHttpRequest();
   xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
     document.getElementById("noti_number").innerHTML = this.responseText;
    }
   };
   xhttp.open("GET", "data.php", true);
   xhttp.send();

  },1000);


 }
 loadDoc();
</script>


data.php

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "test";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);

$sql = "SELECT * FROM notification_data";
$result = $conn->query($sql);

echo $result->num_rows;
/*
if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "id: " . $row["id"]. " - Notification: " . $row["description"];
    }
} else {
    echo "0 results";
}
*/
$conn->close();
?>

Hello guys, this is unpossible pog here.
Today, I shall show you the easitest way to display live notification count without refreshing the page like facebook.
As soon as we insert data, the notification count changes which means we no longer have to refresh the page.
I am using the combination of php, javascript and basic ajax.
Let say, if someone likes your photo on facebook, it get stored in database. So in short we have to fetch count of data from database table.
Lets get started.
Here I created one sample page which shows static number of notification so we have to make it dynamic and live.
I created one table in database which represents your notification.
I created one file called “DATA.PHP ” which displays the notification.
But we only want the count so echo the count only.
Now the next task is to access that file in our design page using ajax.
So, create one javascript function and go to google.
Search for ajax code. Go inside w3school site
Copy paste the ajax code.
After the function end, type the function name with rounded brackets and semicolan.
Give an ID to division or any tag that you want.
And copy that same ID in ajax code.
Type the page name here which is connected to database.
Let refresh. And you will see that it is showing the notification count.
Now you have to add function called “SET INTERVAL”, to constantly refresh that ID afer 1 second. Create a function and cut-paste the code inside the curly brackets.
After that we no longer have to refresh page to change notification count.
Lets add some data in table.
Keep looking at notification count.
As soon as we insert data, the notification count changes.
You can give href to that icon to redirect to notification page if you want to.
Thats all for now.
The code is in the description.
Thank you for watching, dont forget to like share and subscribe.

Sunday 9 June 2019

LUBUNTU : Install, Launch & Uninstall Xampp | Install Sublime Text | Mak...













Hello guys, this is
unpossible pog here. I am using LUBUNTU Linux OS and today I shall
show you how you can install xampp, how to execute it,how to install
sublime text software. how to make HTDOCS folder editable, run
program, and lastly how to uninstall xampp.

Now, there are
combined into one video and are shown in specific timeline.
You can jump to
those time to get you requirment or you can watch the full video.
So in the first part
which is how to install XAMPP, open the browser and search for “XAMPP
LINUX” and go for the linux. Mine is 64 bit system, so I shall
install 64 but if you have 32 bit OS then you must download 32 bit
version file. The file has the extension of “(DOT) RUN” which is
similar to “EXE” extension of Windows executable files.
I already downloaded
it, so I go to “DOWNLOADS” folder.
You can see the
file, now open the “MENU”, go to “SYSTEM TOOLS” and select
“LX TERMINAL”.

Now type “CD” command to go inside
“DOWNLOADS” folder. Type “DIR” command to find your file. Now
you have to make sure that it is executable file so type command
“CHMOD 755 ” then the file name.
Then, to run the
file, use “SUDO” means “Super User Do”, (“DOT”), then
(“FORWARD SLASH”)

, then filename. Make sure to check the
spelling. Type SUPER USER’s password.

By default it will be
installed in OPT(“SLASH”)LAMP folder.
We shall now LAUNCH
XAMPP right now, becuase lot of people don’t know how to run file,
so we shall uncheck it and finish it.
Now the PART 2 is
started where we shall work on executing the XAMPP.

Now open
file system. By default, you shall this, where you can not find the
folder where the xampp installed.
So, click on places,
and select “Directory tree”. You can see the (“SLASH”), click
on it. You can see OPT folder, and inside it , there is “LAMPP”
folder. Now there is one file called “manager-linux.run”

Now
, open new terminal, the type “CD” the (“SLASH”).

Now
you entered into file system, change directory to OPT, then LAMPP.
Now to run “manager
linux” file, type “SUDO then (DOT) then (SHASH) then
manager-linux” file.

In “MANAGE” server tab, start all
services.

Now you can open browser , and type IP address of
xampp, which is “127.0.0.1”
you will se the
dashboard.
In part 3, I shll
show you how to install sublime text 3 which is used for writing a
program. Its just my suggestion to use sublime because I personally
like it.
So to do that, go to
web browser, search for “SUBLIME TEXT 3 LINUX”, click on link
based on you OS but version. Mine is 64.

After downloading it,
right click on it, and “EXTRACT HERE”. After that, the folder
will appear, go inside it, and I think double click on
“SUBLIME(SPACE)TEXT”.

Sorry, my bad, click on
“SUBLIME(UNDERSCORE)TEXT” and execute it. And there you go.

In
part 4, we shall find how to make “HTDOCS” file editable.

So,
what do I mean by that?

So, In linux, by default, you don’t
have any permission to make any changes if you are normal user.

You
only have to change permission of HTDOCS, because it change
permission OPT folder, then whole XAMPP may stop working.
In order to get
permission of HTDOCS, open the terminal, go to file system, by
pressing this command, go inside OPT and LAMPP folder, type “SUDO
then CHOWN” then your username, which in my case is SANKET then
type the folder name which is “HTDOCS”
type, superuser’s
password.
Now go inside HTDOCS
folder, and try to create folder. Paste the index file inside new
folder, then go back.
Now open the sublime
text, “DRAG AND DROP ” the new folder in sublime text’s project
list,
edit index.php file.
Now to run xampp,
follow the steps and start all services.

Now, open the browser,
type IP address of XAMPP, then give (“SLASH”), then the folder
name that we have created which is NEW.
In part 5, incase if
you want to install XAMPP.
Go to lampp folder,
and type, SUDO (DOT), then SLASH, then uninstall and hit ENTER.
If you have anything
to ask, type in comments, below, I shall try to give answers.

Thank
you for watching, dont forget to like share and subscribe.

Saturday 1 June 2019

PHP Tutorial : Add Password Of Any PDF File | Linux | XAMPP | WAMP | LAMP



Commands

For PHP 7*

composer require mpdf/mpdf



For PHP 5*

composer require mpdf/mpdf

composer require paragonie/random_compat:\<9.99


test.php
<?php
//==============================================================
//==============================================================
//==============================================================
require_once 'vendor/autoload.php';
try {
$mpdf = new \Mpdf\Mpdf();
$mpdf->debug = true;
//$mpdf->SetImportUse();


$pagecount = $mpdf->SetSourceFile('book.pdf');

for ($loop = 1; $loop <= $pagecount; $loop++) {
    $tplidx = $mpdf->importPage($loop);
    $mpdf->addPage();
    $mpdf->useTemplate($tplidx);
}

//$tplId = $mpdf->ImportPage(2);
//$mpdf->UseTemplate($tplId, 1, 100, 100);

//$mpdf->WriteHTML('Hello World');
$mpdf->setProtection(array(),"abc","123");
$mpdf->Output();
} catch (\Mpdf\MpdfException $e) { // Note: safer fully qualified exception 
                                   //       name used for catch
    // Process the exception, log, print etc.
    echo $e->getMessage();
}




//exit;
?>







Hello guys, this is
unpossible pog, and in this video I shall tell you how to add
password on pdf using PHP.
First you have to
check the php version. You have to perfrom 1 extra action for PHP
version 5.
First I shall check
the php version which is more than 7.
Lets create a
folder, give it any random name.
Open that folder in
terminal or CMD (if you are using windows), then type this command.
If you have php
version 5 then u also have to run this command.
All commands and
codes are in the description.
It shall create
packages required for implementing password.
It takes a lot of
time so I shall fastforward it.
After the process is
done, I shall open IDE, I am using netbeans. You can use any software
you want.
Now open that folder
and paste the code in any random file. In my case, its “TEST.PHP”
You can see the
code, copy that from the link given in description.
I am also pasting
the pdf file for testing.
ABC and 123 are the
passwords which will be implemented on pdf file. You can change
password if you want.
And make sure to
give the file name at “BOOK.PDF”
Now, lets run the
file.
You can see errors,
to solve that you have to perform 2 things.
First, open the
“AUTOLOAD.PHP” file which is inside vendor folder and close the
PHP tag.
And Second, if you
using linux, then change the file permission as “CREATE AND DELETE
FILES” and “READ AND WRITE”.
Lets execute it, and
as you can see, the password pop is appeared when we run file. It
will be unlocked when I type 123. And will give error if I type
incorrect password.
that’s it guys,
thank you for watching, dont forget to like share and subscribe.