A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Untitled - Stikked
From Scorching Goat, 12 Years ago, written in Python.
Embed
  1. import urllib2
  2. import lxml.html
  3.  
  4. def player_by_name(name):
  5.     name = urllib2.quote(name)
  6.     api = urllib2.urlopen('http://statapi.transformice.com/miceinfo.xml?n=%s' % name)
  7.     data = lxml.html.parse(api)
  8.     api.close()
  9.     return Transformice(data)
  10.  
  11. class Transformice:
  12.     def __init__(self, xml):
  13.         try:
  14.             err = xml.find('//mice/error').text
  15.             raise TransformiceError(err)
  16.         except AttributeError:
  17.             # Easiest && fastest way to check.
  18.             pass
  19.  
  20.         self.name         = xml.find('//mice/name').text
  21.         self.tribe        = xml.find('//mice/tribe').text
  22.         self.rounds       = xml.find('//mice/rounds').text
  23.         self.cheese       = xml.find('//mice/cheese').text
  24.         self.first        = xml.find('//mice/first').text
  25.         self.chamansave   = xml.find('//mice/chamansave').text
  26.         self.chamancheese = xml.find('//mice/chamancheese').text
  27.         self.chamangold   = xml.find('//mice/chamangold').text
  28.         self.micetitle    = xml.find('//mice/micetitle').text
  29.         self.titlelist = {
  30.             '0': 'Little Mouse',
  31.             '1': 'Shaman Disciple',
  32.             '2': 'Accomplished Shaman',
  33.             '3': 'Shaman',
  34.             '4': 'Shaman Master',
  35.             '5': 'Greedy Mouse',
  36.             '6': 'Here! Cheese!',
  37.             '7': 'Yeeeeah Cheese ^^',
  38.             '8': 'Cheeeeeese *-*',
  39.             '9': 'Fast Mouse',
  40.             '10': 'Agile Mouse',
  41.             '11': 'Pirate Mouse',
  42.             '12': 'Ninja Mouse',
  43.             '13': 'Inspired Shaman',
  44.             '14': 'Shaman Champion',
  45.             '15': 'Glorious Shaman',
  46.             '16': 'Shaman Duchess',
  47.             '17': 'Shaman Princess',
  48.             '18': 'Shaman Empress',
  49.             '19': 'Legendary Shaman',
  50.             '20': 'Immortal Shaman',
  51.             '21': 'The Chosen Shaman',
  52.             '22': 'Holy Shaman',
  53.             '23': 'Shaman Oracle',
  54.             '24': 'Shaman Prophet',
  55.             '25': 'Shamarvelous',
  56.             '26': 'Glutton Mouse',
  57.             '27': 'Gleany',
  58.             '28': 'Plumpy Mouse',
  59.             '29': 'Paunchy Mouse',
  60.             '30': 'Chubby Mouse',
  61.             '31': 'Fluffy Mouse',
  62.             '32': 'Tubby Mouse',
  63.             '33': 'The Chubby',
  64.             '34': 'The Puffy',
  65.             '35': 'Activist Mouse',
  66.             '36': 'Unionized Mouse',
  67.             '37': 'Mouse on Strike',
  68.             '38': 'The Cheese Initiated',
  69.             '39': 'The Cheese Adept',
  70.             '40': 'The Cheese Priest',
  71.             '41': 'The Reaper',
  72.             '42': 'Rogue Mouse',
  73.             '43': 'Looter',
  74.             '44': 'Stalker',
  75.             '45': 'Frothy Mouse',
  76.             '46': 'The Silent',
  77.             '47': 'Hawk Mouse',
  78.             '48': 'Cobra Mouse',
  79.             '49': 'Spidermouse',
  80.             '50': 'Quick Silver',
  81.             '51': 'Athletic Mouse',
  82.             '52': 'Hasty Mouse',
  83.             '53': 'Rocket Mouse',
  84.             '54': 'Sonic The Mouse',
  85.             '55': 'Pingless',
  86.             '56': 'Kamikaze',
  87.             '57': 'Warrior Mouse',
  88.             '58': 'Mach 1',
  89.             '59': 'Hunter',
  90.             '60': 'First!',
  91.             '61': 'Sniper',
  92.             '62': 'Flash',
  93.             '63': 'Supermouse',
  94.             '64': 'Light Speed',
  95.             '65': 'Time Traveler',
  96.             '66': 'Fast Wind',
  97.             '67': 'E=MouseC2',
  98.             '68': 'Jumper',
  99.             '69': 'The Untouchable',
  100.             '70': 'Wall-Jumper',
  101.             '71': 'LIGHTNING',
  102.             '72': 'Cheese Finder',
  103.             '73': 'Cheese Knight',
  104.             '74': 'Cheesegrubber',
  105.             '75': 'Fatty',
  106.             '76': 'Stout Mouse',
  107.             '77': 'Cheese Lover',
  108.             '78': 'Camembert',
  109.             '79': "Pont-L'eveque",
  110.             '80': 'Cheese Catcher',
  111.             '81': "It's Over 9000",
  112.             '82': 'Collector',
  113.             '83': 'Cheeseleader',
  114.             '84': 'Cheese Thief',
  115.             '85': 'Cheese Creator',
  116.             '86': 'Cheese Pizza',
  117.             '87': 'Cheese Minister',
  118.             '88': 'Prodigy Mouse',
  119.             '89': 'Princess of Transformice',
  120.             '90': 'Cheesoholic',
  121.             '91': 'The Cheesen One',
  122.             '92': 'Sailor Mouse',
  123.             '93': 'MAH CHEESE!',
  124.             '94': 'Ancient Shaman',
  125.             '95': 'Fearless Shaman',
  126.             '96': 'Almighty Shaman',
  127.             '97': 'Architect Shaman',
  128.             '98': 'Mademoiselle',
  129.             '99': 'Lady Shaman',
  130.             '100': 'Loved',
  131.             '101': 'Magician',
  132.             '102': 'Hero of Mice',
  133.             '103': 'Angel Shaman',
  134.             '104': 'The Creator',
  135.             '105': 'Absolute Shaman',
  136.             '106': 'Miraculous Shaman',
  137.             '107': 'Liberator',
  138.             '108': 'Troll Shaman',
  139.             '109': 'Ghost Shaman',
  140.             '110': 'Spirit',
  141.             '111': 'Demigodess Shaman',
  142.             '112': 'Last Hope',
  143.             '113': 'Redeemer',
  144.             '114': 'Alpha & Omega',
  145.             '115': 'Nice Mouse',
  146.             '116': 'Adorable Mouse',
  147.             '117': 'Charming Mouse',
  148.             '118': 'Pretty Mouse',
  149.             '119': 'Cute Mouse',
  150.             '120': 'Frivolous Mouse',
  151.             '121': 'Snob Mouse',
  152.             '122': 'Stylish Mouse',
  153.             '123': 'Actress Mouse',
  154.             '124': 'Fashion Mouse',
  155.             '125': 'Sexy',
  156.             '126': 'SuperStar',
  157.             '127': 'Little Snowflake',
  158.             '128': 'Christmas Spirit',
  159.             '129': 'Little Pixie',
  160.             '130': 'Santa Claus',
  161.             '200': 'Goddess Shaman',
  162.             '202': 'The Wind Master',
  163.             '210': 'Alluring Mouse',
  164.             '211': 'Temptress',
  165.             '212': 'Latin Lover',
  166.             '213': 'Decorator',
  167.             '214': 'Builder',
  168.             '215': 'Manufacturer',
  169.             '216': 'Technician',
  170.             '217': 'Mechanic',
  171.             '218': 'Specialist',
  172.             '219': 'Inventor',
  173.             '220': 'Engineer',
  174.             '221': 'Inventive Mouse',
  175.             '222': 'Ingenious Mouse',
  176.             '223': 'Virtuoso',
  177.             '224': 'Sprinter',
  178.             '225': 'Batmouse',
  179.             '226': 'The Unseen',
  180.             '227': 'Unstoppable',
  181.             '228': 'Andale! Andale!',
  182.             '229': 'Torpedo',
  183.             '230': 'Speedy Gorgonzola',
  184.             '231': 'Dynamite',
  185.             '232': 'Speedmaster',
  186.             '233': 'Whirlwind',
  187.             '234': 'Om Nom Nom',
  188.             '235': '*-*',
  189.             '236': 'Cheese Addict',
  190.             '237': 'Cheesus',
  191.             '238': 'Queen of Cheese',
  192.             '240': 'Cookies',
  193.             '241': 'Christmas Cake',
  194.             '242': 'Whitebeard',
  195.             '243': 'Generous',
  196.             '244': 'Snowy',
  197.             '245': 'Snowstorm',
  198.             '246': 'Dauphine',
  199.             '247': 'Foxy',
  200.             '248': 'Miss Transformice'
  201.         }
  202.         self.title    = self.title(xml.find('//mice/micetitle').text)
  203.    
  204. class TransformiceError(Exception):
  205.     pass
  206.