Advertisement
ThePJ120

hairy_native_updater

Dec 28th, 2014
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2.  
  3. //This is a PHP script written by Hairy MineFart
  4.  
  5. /*
  6. Purpose of this script is to request the page http://gta5hasher.glokon.org/raw/
  7. and take the natives in the format hash:native:int and convert to the format
  8. native:hash removing the useless int. The script will then display the data
  9. in the browser so you can copy + paste into a new natives file safe for use
  10. with Hairy's XSC Editor. This script will grab the current updated list from
  11. the site, so run it regularly if you want to have the newest natives
  12. */
  13.  
  14.  
  15.  
  16.  
  17. //grab file from glokon site
  18. $glokon_list = file_get_contents('http://gta5hasher.glokon.org/raw/');
  19.  
  20. //split into array at newline
  21. $glokon_list_lines = preg_split('/\n|\r\n?/', $glokon_list);
  22. //Remove first line (comment related to date/time last modified)
  23. array_shift($glokon_list_lines);
  24.  
  25. $hairy_array = array();
  26.  
  27. foreach($glokon_list_lines as $line){
  28. $arr = explode(":", $line);//[0] = hash, [1] = name, [2] = int
  29.  
  30. $hairy_array[] = $arr[0];
  31. $hairy_array[] = $arr[1];
  32. unset($arr);
  33. }
  34.  
  35. array_pop($hairy_array);
  36. array_pop($hairy_array);
  37.  
  38.  
  39. echo <<<EOT
  40.  
  41. <html>
  42.  
  43. <head>
  44. <title>Hairy Native Updater</title>
  45. </head>
  46.  
  47.  
  48. <body>
  49.  
  50. EOT;
  51.  
  52. $i = 0;
  53. while($i < count($hairy_array)){
  54. echo $hairy_array[$i];
  55. echo ":";
  56. $i++;
  57. echo $hairy_array[$i];
  58. echo "<br />";
  59. $i++;
  60. }
  61.  
  62. echo <<<EOT
  63.  
  64. </body>
  65. </html>
  66.  
  67. EOT;
  68.  
  69.  
  70. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement