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 | |
| class elo{ | |
| //K Factor = 32 (below 2100) | |
| //K Factor = 24 (between 2100 and 2400) | |
| //K Factor = 16 (above 2400) | |
| const KFACTOR = 32; | |
| //WIN = 1 Points | |
| //DRAW = 0.5 Points | |
| //LOSE = 0 Points | |
| const WIN = 1; |
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 | |
| switch($_SERVER["REQUEST_URI"]){ | |
| case("/test"): | |
| if(file_exists($_SERVER["DOCUMENT_ROOT"]."/test.php")){ | |
| Require_Once($_SERVER["DOCUMENT_ROOT"]."/test.php"); | |
| }else{ | |
| echo("File not Found.."); | |
| } | |
| break; | |
| case("/abc"): |
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 | |
| $_string = readline("String:"); | |
| function split_string($_string){ | |
| $_hash = []; | |
| for($_g = 0;$_g <= strlen($_string) - 1;$_g++){ | |
| $_hash[$_g] = $_string[$_g]; | |
| } | |
| return($_hash); | |
| } | |
| $_string = array_reverse(split_string($_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 | |
| function initialAvatar($_string){ | |
| $_imagewidth = 240; | |
| $_imageheight = 240; | |
| $_font = 5; | |
| $_width = imagefontwidth($_font) * strlen($_string); | |
| $_height = imagefontheight($_font); | |
| $_formula = []; | |
| $_formula["a"] = ($_imagewidth / 2) - ($_width / 2); | |
| $_formula["b"] = ($_imageheight / 2) - ($_height / 2); |
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 | |
| Header("Content-Type:Text/Javascript"); | |
| $_requests = ["POST"=>[],"GET"=>[]]; | |
| $_requests["POST"]["ASYNCH"] = ("var xhr = new XMLHttpRequest(); | |
| xhr.open('POST','//".$_SERVER["HTTP_HOST"]."/handler',true); | |
| xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); | |
| xhr.onreadystatechange = function(){ | |
| if(xhr.readyState == 4 && xhr.status == 200){ | |
| var result = xhr.responseText; | |
| } |
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 | |
| function haystack(){ | |
| $_hash = []; | |
| foreach(array_keys($_REQUEST) as $_token => $_coin){ | |
| $_hash[$_token] = (array_keys($_REQUEST)[$_token]); | |
| $_hash[$_coin] = ($_REQUEST[array_keys($_REQUEST)[$_token]]); | |
| } | |
| return($_hash); | |
| }// | |
| function payload($_parameter,$_url){ |
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 | |
| Header("Content-Type:Application/JSON"); | |
| $_hash = [ | |
| "id" => "world" | |
| ]; | |
| $_data = [ | |
| "hello" => [ | |
| $_hash | |
| ] | |
| ]; |
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 | |
| function iterate($_haystack){ | |
| $_blocks = []; | |
| for($_g = 0;$_g <= count($_haystack);$_g++){ | |
| if(!empty($_haystack[$_g])){ | |
| $_blocks[] = $_haystack[$_g]; | |
| }else{ | |
| continue; | |
| } | |
| } |
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["REQUEST_SCHEME"])){ | |
| $_scheme = $_SERVER["REQUEST_SCHEME"]; | |
| }elseif(empty($_SERVER["REQUEST_SCHEME"])){ | |
| $_scheme = $_SERVER["HTTP_X_FORWARDED_PROTO"]; | |
| } | |
| echo($_scheme); | |
| //Prints either HTTP or HTTPs | |
| ?> |
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 | |
| $_string = "Hello World"; | |
| $_strlen = count(str_split($_string)) - 1; | |
| echo($_strlen); | |
| //A Native Way to execute String Length through PHP.. | |
| ?> |