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
#!/usr/bin/python from django.core.management import setup_environ from opstools import settings from urllib import urlopen from os import path, makedirs import md5 setup_environ(settings) # your code goes here... #vars username = 'user' passhash = 'pass' width = '825' height = '300' target_dir = 'mondash/static/mondash/graph' from mondash.models import Server servers = Server.objects.all() for web in servers: web_hash = md5.new(web.urlname).hexdigest()[:12] if not path.exists(target_dir + '/' + web_hash): makedirs(target_dir + '/' + web_hash) for sensor in web.sensor_set.all(): sensor_id = str(sensor.monitor_id) for time in [ '0', '1', '2' ]: url = 'http://imonitor01.namics.home/chart.png'\ + '?username=' + username\ + '&passhash=' + passhash\ + '&type=graph&width=' + width + '&height=' + height\ + '&graphid=' + time\ + '&id=' + sensor_id content = urlopen(url).read() image = target_dir + '/' + web_hash + '/' + sensor_id + '-' + time + '.png' print 'getting ' + image f = open(image, 'w') f.write(content) f.close()