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
| server { | |
| listen 192.168.1.1:80; | |
| server_name site.com; | |
| index index.php index.html; | |
| error_log /var/www/site.com/logs/error.log; | |
| access_log off; | |
| root /var/www/site.com/public; | |
| location / { |
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 | |
| $dir = opendir("."); | |
| while($entryName = readdir($dir)) | |
| { | |
| $dirArray[] = $entryName; | |
| } | |
| closedir($dir); | |
| $indexCount = count($dirArray); | |
| echo $indexCount." Files<br />"; | |
| for($index=0; $index < $indexCount; $index++) |
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 | |
| $ip = "000.000.00.00"; | |
| $port = "80"; | |
| if ($check=@fsockopen($ip,$port,$ERROR_NO,$ERROR_STR,(float)0.5)) { | |
| fclose($check); | |
| echo '<b style="color:green">Online</b>'; | |
| } else { | |
| echo '<b style="color:red">Offline</b>'; | |
| } | |
| ?> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>HTML 5 Slider Bar</title> | |
| </head> | |
| <body> | |
| <input type="range" min="0" max="50" value="0" step="5" onchange="showValue(this.value)" /> | |
| <span id="range">0</span> | |
| <script type="text/javascript"> | |
| function showValue(newValue) |
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
| <!-- Included files contain, variable with their values --> | |
| <!-- Example url: index.php?lang=en --> | |
| <?php | |
| if (!isset ($_GET['lang'])) { | |
| if(isset($_SESSION['lang'])){ | |
| $lang=$_SESSION['lang']; | |
| } | |
| else { | |
| $lang='bg'; | |
| } |
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
| redirect($this->uri->uri_string()); |
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 | |
| define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'); | |
| if(IS_AJAX) | |
| { | |
| echo 'Ajax request was here'; | |
| } | |
| else | |
| { | |
| echo 'Not ajax request'; |