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
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
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 | |
| /***** Upload File *****/ | |
| function upload($file_id, $folder="", $types="") { | |
| if(!$_FILES[$file_id]['name']) return array('','No file specified'); | |
| $file_title = $_FILES[$file_id]['name']; | |
| //Get file extension | |
| $ext_arr = explode(".",basename($file_title)); | |
| $ext = strtolower($ext_arr[count($ext_arr)-1]); //Get the last extension |
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 | |
| $user_agent = $_SERVER['HTTP_USER_AGENT']; | |
| /***** Get client's IP address *****/ | |
| function getIP() { | |
| $ipaddress = ''; | |
| if (getenv('HTTP_CLIENT_IP')){ | |
| $ipaddress = getenv('HTTP_CLIENT_IP'); | |
| }else if(getenv('HTTP_X_FORWARDED_FOR')){ | |
| $ipaddress = getenv('HTTP_X_FORWARDED_FOR'); |
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
| $ cd ~ | |
| $ sudo curl -sS https://getcomposer.org/installer | sudo php | |
| $ sudo mv composer.phar /usr/local/bin/composer | |
| $ sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
| then you can run | |
| $ sudo composer install |