php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2004

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 25.09.2004, 09:44  
Gast
 
Beiträge: n/a
Standard PHP file Download script ??!!

Hi jungen's,

Also ich habe hier ein download script, das mal ziemlich gut aussieht, allerdings funktioniert das net so ganz, jedesmal, wenn ich versuche über das script von meiner seite was down zu laden, kommt der HTTP_REFFERER zum einsatz und linkt mich auf meine index seite????

Hier mal der code:

Code:
<?php

///////////////////////////////////////////////
//                                           //
// Download Protector v 1.1                  //
// ----------------------------------------- //
// by Graeme (webmaster@phpscriptcenter.com) //
// http://www.phpscriptcenter.com            //
//                                           //////////////////////////////
// PHP Script CENTER offers no warranties on this script.                //
// The owner/licensee of the script is solely responsible for any        //
// problems caused by installation of the script or use of the script    //
//                                                                       //
// All copyright notices regarding Download Protector, must remain       //
// intact on the scripts and in the HTML for the scripts.                //
//                                                                       //
// (c) Copyright 2001 PHP Script CENTER                                  //
//                                                                       //
// For more info on Download Protector,                                  //
// see http://www.phpscriptcenter.com/downloadprotector.php              //
//                                                                       //
///////////////////////////////////////////////////////////////////////////

$ADMIN[defaulturl] = "http://meine-domain.com";

$okaysites = array("http://meine-domain.com","http://meine-domain.com");    

$ADMIN[url_1] = "http://meine-domain.com/Files/New/filename.zip";
$ADMIN[url_2] = "http://meine-domain.com/Files/Old/filename.zip";

//////////////////////////////////////////////////////

$reffer = $HTTP_REFERER;
if($reffer) {
$yes = 0;
while(list($domain, $subarray) = each($okaysites)) {
if (ereg("$reffer",$subarray)) {
$yes = 1;
}
}
$theu = "url"."_"."$site";
if ($ADMIN[$theu] AND $yes == 1) {
header("Location: $ADMIN[$theu]/$file");
} else {
header("Location: $ADMIN[defaulturl]");
}
} else {
header("Location: $ADMIN[defaulturl]");
}

?>
Hier noch die erklärung zum verlinken:

Zitat:
Now just link to the download you want by doing http://yoursite.com/download.php?sit...le=thefile.zip
On that link it has ( site=1 ) that means it calls the download location ( $url_1 )
just change it to what you want so it calls the correct folder
Hmm.. hab aber glaub ich alles richtig gemacht!
Is das schon wieder ein not working script?!
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Gesuch / Einladung: PHP - Anti-Spam Script SvenLittkowski Trash 7 14.01.2006 03:38
[Erledigt] php script und ixed PHP Tipps 2005-2 14 12.10.2005 13:34
Download Script? PHP Tipps 2005-2 3 28.08.2005 14:01
libmysqlclient.so.10 is needed Datenbanken 11 20.06.2005 15:27
[Erledigt] File download &gt; kleines Problem PHP Tipps 2005 3 11.05.2005 23:11
update auf php 5.0.4 robo47 Server, Hosting und Workstations 6 10.04.2005 19:00
2 kleine Fragen zu meinem Download Script Melchior PHP Tipps 2005 10 25.02.2005 16:13
Suche Download Script Beitragsarchiv 3 01.02.2005 13:02
[Erledigt] PHP Script Problem PHP Tipps 2005 12 06.01.2005 12:38
Download script mit unbekannter URL PHP Tipps 2004-2 4 21.12.2004 00:22
download automatisch starten PHP Tipps 2004 7 18.09.2004 20:14
datei nach download löschen HTML, Usability und Barrierefreiheit 0 18.09.2004 17:16
"das" Script oder "der" Script?? Simbo Off-Topic Diskussionen 31 16.09.2004 17:04
download von file verhindern Schiedsrichter PHP Tipps 2004 1 15.09.2004 11:39
download script PHP Tipps 2004 1 31.07.2004 16:43

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
php download script, php script to download file, download script php, php file download, download center script, downloadscripte, filedownload script, php download center script, php \file download\ url, php file protector, download protector php, downloadscript per link, php download file from url, php download file, php script download file, php script download center, php script download files from url, url downloader script, download script, php downloadscript per link urlo

Alle Zeitangaben in WEZ +1. Es ist jetzt 05:33 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.