How to unzip zip file using PHP script ?

How to unzip zip file using PHP script ?

Here is the code for How to unzip zip file using PHP script . By this code you can easily zip or unzip your files and folders using PHP.
Some hosting provider don’t provide zip unzip facility on server control panel, so there is always problem for upload your project and download your code from it. we have a best solution for all developers and server admins that they can easilly make zip and unzip their files by using simple code for unzip zip file using PHP.
Dear Visitor , if you want to unzip , zip file , please find below script to unzip zip file.

Unzip zip file using PHP

Requirement:-
(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)

ZipArchive::extractTo — Extract the archive contents and

Syntax:-
bool ZipArchive::extractTo ( string $destination [, mixed $entries ] )

Description:
Extract the complete archive or the given files to the specified destination.

<?php $unzip = new ZipArchive; $out = $unzip->open('your-zip-filename.zip');
if ($out === TRUE) {
  $unzip->extractTo(getcwd());
  $unzip->close();
  echo 'File unzipped Successfully';
} else {
  echo 'Something went wrong , Please Try Again ?';
}
?>

We hope this code will helps you to zip unzip file using php also make easy to upload and download your project.
also check How to disable right click, F12 & Ctrl+U .

How to disable right click , f12 and ctrl+u ?

How to disable right click , f12 and ctrl+u ?

Simple code for disable right click , f12 , ctrl+u . copy this code and you can disable right click on your web page. we always wants to secure our website and web based project. So we always need to disable right click ,f12 & ctrl+u. Use this simple javascript code for disable right click , f12 and ctrl+u on your web page.

Please find the below script for disable right click and f12 , also disable ctrl+u.

Disable right click , f12 , ctrl+u

$(document).ready(function() {
$(document).on(“contextmenu”, function(e) {
return false;
});
$(document).keydown(function(event) {
if (event.keyCode == 123 || (event.ctrlKey &amp;&amp; event.keyCode == 85) || (event.ctrlKey &amp;&amp; event.shiftKey &amp;&amp; event.keyCode == 73 || event.keyCode == 116)) {
return false;
} else if (event.ctrlKey &amp;&amp; event.shiftKey &amp;&amp; event.keyCode == 73) {
return false; //Prevent from ctrl+shift+i
}
});
});

Share your ideas in comment section and also share your suggestions and question related programming,
You can also check Grunt script for minifying all JS file.

how to type in hindi using google transliteration ?

how to type in hindi using google transliteration ?

English to Hindi typing using google transliteration . here is the easy code for  type in hindi using google transliteration.  You can use google transliteration , for language conversion .

find the below code for English to Hindi.

English to Hindi typing using google transliteration

&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″/&amp;gt;
&amp;lt;script type=”text/javascript” src=”https://www.google.com/jsapi”&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=”text/javascript”&amp;gt;
// Load the Google Transliterate API
google.load(“elements”, “1”, {
packages: “transliteration”
});

function onLoad() {
var options = {
sourceLanguage:
google.elements.transliteration.LanguageCode.ENGLISH,
destinationLanguage:
[google.elements.transliteration.LanguageCode.HINDI],
shortcutKey: ‘ctrl+g’,
transliterationEnabled: true
};

// Create an instance on TransliterationControl with the required
// options.
var control =
new google.elements.transliteration.TransliterationControl(options);

// Enable transliteration in the textbox with id
// ‘transliterateTextarea’.
control.makeTransliteratable([‘transliterateTextarea’]);
control.makeTransliteratable([‘transliterateTextarea2’]);
}
google.setOnLoadCallback(onLoad);
&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
Type in Hindi (Press Ctrl+g to toggle between English and Hindi)&amp;lt;br&amp;gt;
&amp;lt;textarea id=”transliterateTextarea” style=”width:600px;height:200px”&amp;gt;&amp;lt;/textarea&amp;gt;
&amp;lt;input type=”text” id=”transliterateTextarea2″ name=”sunil”&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

Please see how to get current month’s first and last date using php ? . Also share your comments and suggests us for posts and other things.