Die 3d Studio MAX - Bücherliste |
Bewertung
|
deutsche Bücher Es gibt nicht gerade viele, aber ein paar sind es doch. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## |
englische Bücher hier ist die Auswahl um einiges größer, und auch die Inhalte sind teilweise sehr viel mehr spezialisiert. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Herstellerfirmen & Distributoren |
Bewertung
|
Kinetix - englisch: Die Jungs die 3D Studio MAX verbrochen haben. Besonders nützlich auf dieser Page, das (englischsprachige) Forum. Wenn dort ein Problem nicht gelöst werden kann, wo sonst? |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Discreet - deutsch: Die Jungs die 3D Studio MAX aufgekauft haben (oder hat Autodesk discreet gekauft?!?). Hier findet man auch diveres Zeug zum Thema Compositing mit Flint, Flame, Smoke und Inferno. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Digimation - englisch: Hier gibt's tonnenweise (kommerzielle) Plugins für 3dsMax. Treefactory, Shag: Hair, Afterburn, und vieles vieles mehr. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
CAT-Zentrum - deutsch: Hier gibt's nicht nur Max zu kaufen, sondern auch alles andere was auch nur irgendwie mit 3D zu tun hat. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Cebas - deutsch: entwickelt und vertreibt Pyrocluster, Bunch of Volumes oder Raymax. Hier gibt's auch Freepyro und ein paar andere Plugins zum kostenlosen Download. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Modell - Datenbanken |
Bewertung
|
ModelLinks - englisch: Viele Links zu anderen Model-Seiten. Hier findet man bestimmt was. Viel Spaß beim Surfen....! |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Avalon - englisch: Viele Models zu allen erdenklichen Themen in vielen Formaten. Scheinbar von Viewpoint gesponsort. ;-) |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Model Market - englisch: Diverse Links zu anderen Modell-Seiten, und eigene Modelle im .lwo .dxf .3ds-format |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3D-Cafe - englisch: Alles was der 3d-artist braucht. Models, Texturen, Tutorials zu allen möglichen 3d-Paketen. Leider ist das 3d-Cafe immer etwas langsam, was die Übertragungsgeschwindigkeit betrifft. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3D total - englisch: Modells, Texture, Plugins (alles forfree), Tutoriallink-Sammlung und eine sehr schöne Gallery. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Textur - Datenbanken |
Bewertung
|
TextureLinks - englisch: Viele Links zu anderen Textures-Seiten. Hier findet man bestimmt was. Viel Spaß beim Surfen....! |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Free Textures.com - englisch: Viele freie Texturen, größtenteils von guter Qualität. Allerdings umständlich zum Downloaden. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Forrest Gump - englisch: Viele Free-Textures von guter Qualität, leider etwas umständlich zum runterladen. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3D-Cafe - englisch: Alles was der 3d-artist braucht. Models, Texturen, Tutorials zu allen möglichen 3d-Paketen. Leider ist das 3d-Cafe immer etwas langsam, was die Übertragungsgeschwindigkeit betrifft. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3D total - englisch: Modells, Texture, Plugins (alles forfree), Tutoriallink-Sammlung und eine sehr schöne Gallery. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Tutorials, Tipps & Tricks |
Bewertung
|
A new Hope - englisch: Wohl die größte englsiche Tutorial-Link Sammlung, alphabetisch sortiert. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3dmax Forum - deutsch: einige recht gute deutsche Tutorials (von mir sind auch zwei dabei ;-)) |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3D-Cafe - englisch: Alles was der 3d-artist braucht. Models, Texturen, Tutorials zu allen möglichen 3d-Paketen. Leider ist das 3d-Cafe immer etwas langsam, was die Übertragungsgeschwindigkeit betrifft. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Peter Watje's 3dmaxstuff - english: Peter Watje hat zig Plugins für 3ds Max programmiert. Auf dieser Seite kann man sich die Dinger downloaden, und findet auch passende Tutorials dazu. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Semimax Pro - deutsch: Ein Online-Handbuch: "Was bedeutet nur dieses Knöpfchen?" Diese Frage stellt sich manchmal auch nach mehrjähriger MAX-Erfahrung. Semimax Pro gibt die Antwort. Grafisch schon dargestellt werden hier Aussehen, Funktionsweisen und Bedeutung von sämtlichen Buttons erklärt. Angucken! |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3D
Studio MAX Definitiv Resource
- englisch: Wunderbare Tutorial-Link Sammlung, unterteilt in verschiedene
Kategorien (Animation, Materials, Lighting...), mit Suchfunktion. Die Lightrays-Tuts sind auch aufgelistet :) |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## |
phantasitx.de - deutsch: auch hier gibt es allerhand an Max-Stuff. Vorallem findet man dort englische Tutorials, die ins Deutsch übersetzt wurden. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Andere 3d Studio MAX Seiten |
Bewertung
|
MaxUnderground.com - englisch: täglich gute News rund um 3dsMax. Und ein riesiges Plugin-Archiv. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Max3d.3dluvr.com - englisch: (ehem. max3d.com) Tutorials, Neuigkeiten, Plugins. Schöne Seite, aber englisch ;-) |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3dmax Forum - deutsch: Das wohl größte (und erste) Deutsche 3dsMax-Forum, ein paar Tutorials, schöne Plugin-Sammlung. Eine der wenigen guten, deutschen Max-Seiten. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3dMax.com - englisch: Tutorialsl, ein paar Modelle, Texturen und Plugins. Im großen und ganzen aber weniger informativ wie der verdrehten Namensvetter Max3d.3dluvr.com |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
phantasitx.de - deutsch: auch hier gibt es allerhand an Max-Stuff. Vorallem findet man dort englische Tutorials, die ins Deutsch übersetzt wurden. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
knowhow3d.de - deutsch: kleine Tutorials, ein paar Modelle, Texturen, Plugins, Gallery und ein Forum. Die Jungs haben sich viel vorgenommen. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Sonstige 3d Websites |
Bewertung
|
3D ark - englisch: allgemeine 3d-Seite (nicht nur Max) mit Tonnen von Stuff, News und Links |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3D gate - englisch: allgemeine 3d-Seite mit Tutorials, Texturen, News, Gallery, Jobbörse (geplant) |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3D total - english: Modells, Texture, Plugins (alles forfree), Tutoriallink-Sammlung und eine sehr schöne Gallery. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
cg-channel - english: News & Animationen. Sehr professionell, nur Top-Artists sind dort vertreten. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Plugins für 3d Studio Max |
Bewertung
|
Blur Studios - englisch: Die Jungs machen feine Sachen. Zig Plugins die einem das Max-Leben wesentlich leichter machen. Unbedingt angucken! |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Peter Watje's 3dmaxstuff - englisch: Peter Watje hat zig Plugins für 3ds Max programmiert. Auf dieser Seite kann man sich die Dinger downloaden, und findet auch passende Tutorials dazu. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
3dmax Forum - deutsch: Schöne Plugin-Sammlung. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
gfxcentral - Boboland - englisch: gute Plugin-Sammlung, Freeware... |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
The box - 3D Studio Max Plugin Listing - englisch: gute Plugin-Link-Sammlung, sortierbar nach Hersteller, Datum, Titel oder Typus. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |
Script-Spot - englisch: Ein schöne Script-Sammlung mit ausführlichen Beschreibungen (meist in englisch, manche auch in französisch). Sortiert nach Kategorien und mit komfortabler Suchfunktion. |
#!/usr/bin/perl
##############################################################################
# Click Count v2.0
# Copyright (c)1998 ieo, All Rights Reserved.
#
# Created: 12/15/1998
# Last Modified: 2/20/1999
#
# What This Does: Counts how many times a link is clicked! Great for counting
# how many times a file has been downloaded. Requires SSI.
#
# You may do what you like with this script, hack it to your delight, so long
# as you follow these basic rules.
# 1. Leave me some credit! I make this free to use and modify but like all
# programmers I like to be acknowledged for my work. Link to my site if
# you will, or just email me and say 'ryan, you did good work on this'.
# Anything is appreciated =)
# 2. No selling this script or making money of it without my written consent.
# 3. I can't be held responsible for the use of this code!
# 4. Ask before redistributing this script in any way shape or form.
# 5. Enjoy it! I enjoyed making it =)
#
# Email: ral@bitsmart.com
# Web Site: http://www.bitsmart.com/ral/
##############################################################################
# Define Variables
# Path to store logs. Relative to the web path! No trailing "/"!
$data_dir = '/forbidden/clicklog';
# Do not set this unless the script specifies it when u try to run
$cgi_url = '';
# Don't modify this unless you know what your doing
$data_ext = 'click.log';
# Done! No need to go below unless you know what your doing!
##############################################################################
# Gets the POST and GET data input
&get_form;
# Tries to retrieve the URL to the script
&get_script;
# If get_script was unable to retrieve the cgi url return an error
unless ( $cgi_url ) { &error('cgi_url'); }
# Go to admin functions if 'admin' is in the query string
&admin unless $ENV{'QUERY_STRING'};
# Verifies data submitted
&verify_input;
# Sets the location of the count data file for the current ID
$idfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$id.$data_ext";
# Send count data if no URL exists on query string
&view_count unless $url;
# Redirects the user
print "Location: $url\n\n";
# Updates the count data (increments by 1)
&update_count;
# All Done, Buh Bye Now. =)
exit;
##############################################################################
# Sub-Routines
sub admin {
$pwfile = "$ENV{'DOCUMENT_ROOT'}$data_dir/$data_ext.password";
unless ( $POST{'pw'} )
{
print "Content-type: text/html\n\n";
print "\n";
exit;
}
unless ( -e $pwfile )
{
open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!");
$password = crypt($POST{'pw'},$data_ext);
print PASSWORD "$password\n";
close(PASSWORD);
}
open(PASSWORD,"$pwfile") || &error("Error reading password file: $!");
$password =
Invalid Password\n"; print "\n"; exit; } if ( $POST{'submit'} ) { if ( $POST{'submit'} EQ 'Delete' ) { $RM = `rm $ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext`; } elsif ( $POST{'submit'} EQ 'Modify' || $POST{'submit'} EQ 'Create New Count' ) { unless ( $POST{'count'} || $POST{'id'} ) { print "Content-type: text/html\n\n"; print "Invalid ID or Count Data\n"; print "\n"; exit; } open(COUNT,"+>$ENV{'DOCUMENT_ROOT'}$data_dir/$POST{'id'}.$data_ext") || &error("Error updating counter '$POST{'id'}': $!"); flock(MAIN,2); print COUNT "$POST{'count'}"; flock(MAIN,8); close(COUNT); } elsif ( $POST{'submit'} EQ 'Modify Password' ) { if ( !$POST{'newpw'} ) { print "Content-type: text/html\n\n"; print "Invalid Password\n"; print "\n"; exit; } open(PASSWORD,"+>$pwfile") || &error("Error writing password file: $!"); $password = crypt($POST{'newpw'},$data_ext); print PASSWORD "$password\n"; close(PASSWORD); print "Content-type: text/html\n\n"; print "Password Changed\n"; print "\n"; exit; } } # =================================================================================== # LIST CURRENT CLICK LOGS AND THEIR VALUES AS WELL AS ADMIN FUNCTIONS =============== chdir("$ENV{'DOCUMENT_ROOT'}$data_dir/") ? print("Content-type: text/html\n\n$ENV{'DOCUMENT_ROOT'}$data_dir/\n \n\n") : &error("Unable to change to directory '$ENV{'DOCUMENT_ROOT'}$data_dir/'.\n"); print "Note: Do not press Enter to submit data! You must click the button. \n"; print " \n"; print "\n"; print " \n"; print "\n"; print " \n"; $ls = `ls *.$data_ext`; @ls = split(/\s+/,$ls); foreach $temp_file (@ls) { if (-d $file) { $filename = "$file$temp_file"; if (-T $filename) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$filename") || die $!; $line = \n\n"; } } elsif (-T $temp_file) { open(COUNT,"$ENV{'DOCUMENT_ROOT'}$data_dir/$temp_file") || die $!; $line = \n\n"; } } # END ADMIN ========================================================================= # =================================================================================== exit; } sub update_count { $line = 1; if ( -e "$idfile" ) { open(COUNT,"$idfile") || die $!; $line = //g; $verifyurl =~ s/\n//g; $verifyurl =~ s/ //g; if ( $url EQ "" || $verifyurl NE $url ) { &error('bad_url'); } } } sub error { $error = $_[0]; print "Content-type: text/html\n\n"; if ( $error EQ 'cgi_url' ) { print " Script error! Could not set \$cgi_url variable!\n"; print "\n This error is due to a problem in the script not being able to locate itself! To fix this error open the script (default is click.cgi) and under the line \"\$cgi_url = '';\" put the location of the script in the single quotations (so it looks something like \"\$cgi_url = 'http://www.yourdomain.com/cgi-bin/click.cgi';\" \n"; } elsif ( $error EQ 'bad_id' ) { print " Script error! Invalid or Empty ID specified!\n"; print "\n ID's should generally consist of only letters and numbers. ID's are specified on the URL, if you don't know what this means or how to do it please readme the readme.txt file that came with this script.\n"; } elsif ( $error EQ 'bad_url' ) { print " Script error! Invalid or Empty URL!\n"; print "\n URL's should only be a valid URL that you can type into your browsers Goto text box, if they won't go there then that can't go here.\n"; } else { print " Script error! $error\n"; } print "\n \nNote: If you are are still having problems you can contact me for help at ral\@bitsmart.com.\n"; exit; } sub get_form { # [GET] Query Input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $GET{$name} = $value; } # [POST] Form input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $POST{$name} = $value; } } sub get_script { unless ( $cgi_url ) { if ( $ENV{'HTTP_HOST'} ) { if ( $ENV{'SERVER_PORT'} NE 80 && $ENV{'SERVER_PORT'} ) { $cgi_url = "http://$ENV{'HTTP_HOST'}:$ENV{'SERVER_PORT'}$ENV{'SCRIPT_NAME'}"; } else { $cgi_url = "http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}"; } } } } # End of sub-routines. End of script. All done. ############################################################################## Hits |