Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //This is a PHP script written by Hairy MineFart
- /*
- Purpose of this script is to request the page http://gta5hasher.glokon.org/raw/
- and take the natives in the format hash:native:int and convert to the format
- native:hash removing the useless int. The script will then display the data
- in the browser so you can copy + paste into a new natives file safe for use
- with Hairy's XSC Editor. This script will grab the current updated list from
- the site, so run it regularly if you want to have the newest natives
- */
- //grab file from glokon site
- $glokon_list = file_get_contents('http://gta5hasher.glokon.org/raw/');
- //split into array at newline
- $glokon_list_lines = preg_split('/\n|\r\n?/', $glokon_list);
- //Remove first line (comment related to date/time last modified)
- array_shift($glokon_list_lines);
- $hairy_array = array();
- foreach($glokon_list_lines as $line){
- $arr = explode(":", $line);//[0] = hash, [1] = name, [2] = int
- $hairy_array[] = $arr[0];
- $hairy_array[] = $arr[1];
- unset($arr);
- }
- array_pop($hairy_array);
- array_pop($hairy_array);
- echo <<<EOT
- <html>
- <head>
- <title>Hairy Native Updater</title>
- </head>
- <body>
- EOT;
- $i = 0;
- while($i < count($hairy_array)){
- echo $hairy_array[$i];
- echo ":";
- $i++;
- echo $hairy_array[$i];
- echo "<br />";
- $i++;
- }
- echo <<<EOT
- </body>
- </html>
- EOT;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement