/** Error reporting */
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
date_default_timezone_set('Europe/London');
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For more information on configuration, see: | |
| # * Official English Documentation: http://nginx.org/en/docs/ | |
| # * Official Russian Documentation: http://nginx.org/ru/docs/ | |
| user nginx; | |
| worker_processes 1; | |
| error_log /var/log/nginx/error.log; | |
| pid /run/nginx.pid; | |
| events { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Database Connection | |
| $host="localhost"; | |
| $uname="root"; | |
| $pass=""; | |
| $database = "myshaj"; | |
| $connection=mysql_connect($host,$uname,$pass); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| backup_tables('localhost','root','','myshaj'); | |
| /* backup the db OR just a table */ | |
| function backup_tables($host,$user,$pass,$name,$tables = '*') | |
| { | |
| $link = mysql_connect($host,$user,$pass); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $sort_col = array(); | |
| foreach ($array as $key=> $row) { | |
| $sort_col[$key] = $row['array_sorting_key']; | |
| } | |
| array_multisort($sort_col, SORT_ASC, $array); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (!empty($_SERVER["HTTP_CLIENT_IP"])) | |
| { | |
| //check for ip from share internet | |
| $ip = $_SERVER["HTTP_CLIENT_IP"]; | |
| } | |
| elseif (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) | |
| { | |
| // Check for the Proxy User |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
NewerOlder