Sie sind nicht angemeldet.
![]() |
Quellcode |
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, |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Y0Gi« (22. Januar 2013, 03:48)
Zitat von »Bluefake«
Oh Mann! Bislang fand ich das ja lustig, aber jetzt, wo es jeder kann...![]()
#
Zitat
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]
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Y0Gi« (22. Januar 2013, 03:48)
-