Advertisement
Advertisement
| 02.01.2008 at 12:55AM PST, ID: 23128967 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 02.01.2008 at 01:11AM PST, ID: 20795150 |
| 02.01.2008 at 01:12AM PST, ID: 20795156 |
| 02.01.2008 at 01:13AM PST, ID: 20795163 |
| 02.01.2008 at 01:22AM PST, ID: 20795214 |
1: 2: 3: 4: 5: |
$("a").click(
function() {
$.get("count.php", { downloadid: "32345"} );
}
);
|
| 02.01.2008 at 01:29AM PST, ID: 20795241 |
| 02.01.2008 at 01:31AM PST, ID: 20795251 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: |
<?php
// using PHP as it is more beginner friendly than Perl
// quick and dirty validation
if (!isset($_GET['file'])) exit;
// e.g. only allow text files in same directory
if (preg_match('~(\.\.|/)\.txt$~', $_GET['file'])) exit;
// Increment counter, get IP ($_SERVER['REMOTE_ADDR']) etc.
// Output contents of requested file
readfile($_GET['file']);
|
| 02.01.2008 at 01:37AM PST, ID: 20795279 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: |
<?php
// quick and dirty validation
if (!isset($_GET['file'])) exit;
$file = $_GET['file'];
if (!file_exists($file)) exit;
// e.g. only allow text files in same directory
if (preg_match('~(\.\.|/)\.txt$~', $file)) exit;
// Increment counter, get IP ($_SERVER['REMOTE_ADDR']) etc.
// Output contents of requested file, optionally, use a location header
header('Content-Disposition: attachment; filename="'.$file.'"');
header('Content-Length: ' . filesize($file));
readfile($file);
?>
|
| 02.01.2008 at 02:53AM PST, ID: 20795568 |
| 02.01.2008 at 08:36AM PST, ID: 20798047 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: |
#!/usr/bin/perl
use strict;
use CGI;
use CGI::Carp qw[fatalsToBrowser warningsToBrowser];
my $cgi = new CGI;
die "No file specified" unless $cgi->param('file');
#If you want to restrict to same dir, or something else...
die "Invalid file specified" if $cgi->param('file') =~ /\.\.\//;
print $cgi->header(
'Content-Disposition' => "attachment; filename=$file",
'Content-Length' => filesize($file),
'type' => 'application/x-download');
open(IN,"<", $file) or die "Could not read file: $!\n";
print while(<IN>);
close(IN);
|
| 02.01.2008 at 11:37PM PST, ID: 20803615 |
| 02.11.2008 at 04:20PM PST, ID: 20871622 |
| 02.11.2008 at 10:20PM PST, ID: 20872815 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: |
#!/usr/bin/perl
use strict;
use CGI;
use CGI::Carp qw[fatalsToBrowser warningsToBrowser];
my $cgi = new CGI;
my $file = $cgi->param('file');
die "No file specified" unless $file;
#If you want to restrict to same dir, or something else...
die "Invalid file specified" if $file =~ /\.\.\//;
print $cgi->header(
-Content_Disposition => "attachment; filename=$file",
-Content_Length => -s $file,
-type => 'application/x-download');
open(IN,"<", $file) or die "Could not read file: $!\n";
print while(<IN>);
close(IN);
|
| 02.19.2008 at 01:04PM PST, ID: 20932559 |