You are not logged in.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#!/usr/bin/env python
import glob
import random
import time
if int(time.time()) % 5 == 3:
print 'Content-Type: image/jpeg\n'
image = random.choice(glob.glob('*.jpg'))
else:
print 'Content-Type: image/png\n'
image = 'codemonkey.png'
for line in open(image):
print line,
|
This post has been edited 1 times, last edit by "Y0Gi" (Jan 22nd 2013, 3:48am)
Quoted from "Bluefake"
Oh Mann! Bislang fand ich das ja lustig, aber jetzt, wo es jeder kann...![]()

;D

#
Quoted
If the script's .py ending is not accepted by forums, you can use mod_rewrite
to make an alias. In the same directory as the script, create a .htaccess file
with this content (without leading indention):
RewriteEngine On
Options +FollowSymLinks
RewriteRule ^avatar.jpg$ avatar.py [PT,L]
This post has been edited 1 times, last edit by "Y0Gi" (Jan 22nd 2013, 3:48am)
-