SELFPHP: Version 5.8.2 Befehlsreferenz - Tutorial – Kochbuch – Forum für PHP Einsteiger und professionelle Entwickler

SELFPHP


Professional CronJob-Service

Suche



CronJob-Service    
bei SELFPHP mit ...



 + minütlichen Aufrufen
 + eigenem Crontab Eintrag
 + unbegrenzten CronJobs
 + Statistiken
 + Beispielaufrufen
 + Control-Bereich

Führen Sie mit den CronJobs von SELFPHP zeitgesteuert Programme auf Ihrem Server aus. Weitere Infos



:: Buchempfehlung ::

Das Zend Framework

Das Zend Framework zur Buchempfehlung
 

:: Anbieterverzeichnis ::

Globale Branchen

Informieren Sie sich über ausgewählte Unternehmen im Anbieterverzeichnis von SELFPHP  

 

:: Newsletter ::

Abonnieren Sie hier den kostenlosen SELFPHP Newsletter!

Vorname: 
Name:
E-Mail:
 
 

Zurück   PHP Forum > SELFPHP > PHP Grundlagen

PHP Grundlagen Hier kann über grundlegende Probleme oder Anfängerschwierigkeiten diskutiert werden

Antwort
 
Themen-Optionen Ansicht
  #1  
Alt 12.05.2005, 12:17:35
Spawn-Dw Spawn-Dw ist offline
Anfänger
 
Registriert seit: May 2005
Beiträge: 2
Prob mit script

hi erstmal hab ein prob mit einem script
Bekomme immer die fehlermeldung
Warning: getimagesize: Unable to open '/home/var/www/html/c83kas90efli01/3x3_Eyes/tn/eyes0001.jpg' for reading. in /home/animewallsde/var/www/html/chimage.php on line 152

Warning: Cannot add header information - headers already sent by (output started at /home/animewallsde/var/www/html/chimage.php:152) in /home/animewallsde/var/www/html/chimage.php on line 163

wo liegt der fehler?
brauche unbedingt hilfe
thx schon mal im vorraus
PHP-Code:
<?
  /*

  CHImageGuard (PHP version) 1.01
  Copyright 2000-2003 by Christopher Heng. All rights reserved.

  Visit http://www.thesitewizard.com/ for the latest version
  of this script. You can also contact me through the online
  form on the website.


  I. LICENCE TERMS

  1. You may use this script on your website, with or
  without modifications, free of charge.

  2. You may NOT redistribute this script, whether modified
  or not. The script is meant for your personal use on your
  website, and can only be distributed by the author,
  Christopher Heng.

  3. THE SCRIPT AND ITS DOCUMENTATION ARE PROVIDED
  "AS IS", WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
  IMPLIED WARRANTY OF MECHANTABILITY OR FITNESS FOR A
  PARTICULAR PURPOSE. YOU AGREE TO BEAR ALL RISKS AND
  LIABILITIES ARISING FROM THE USE OF THE SCRIPT,
  ITS DOCUMENTATION AND THE INFORMATION PROVIDED BY THE
  SCRIPTS AND THE DOCUMENTATION.

  If you cannot agree to any of the above conditions, you
  may not use the script. 

  Although it is NOT required, I would be most grateful
  if you could also link to us at:

    http://www.thesitewizard.com/


  II. INSTALLATION AND CONFIGURATION INSTRUCTIONS

  Instructions for installing and configuring the
  script can be found at:

    http://www.thesitewizard.com/

  Look for the article "How to Protect Your Images
  from Bandwidth Thieves".


  III. SUPPORT

  There is none. You got it without paying a cent, remember?

  If you beg very politely, I may answer :-) - but there's no
  guarantee of that. Officially, there's no support. You're
  better off trying to read the article and following its
  instructions. It's much faster.


  IV. CONTACTING THE AUTHOR (BUG REPORTS, LICENSING QUESTIONS)

  Please use the feedback form on the website:

    http://www.thesitewizard.com/feedback.php


  V. WANT MORE SCRIPTS AND OTHER USEFUL WEBMASTER INFORMATION?

  Sign up for thesitewizard newsletter. It's free. To
  subscribe, send an email (blank or otherwise) to:
    subscribe@thesitewizard.com
  Or use the online form at:
    http://www.thesitewizard.com/

  Note that the above email address is attached to a
  mailing list program, which will process your subscription
  request automatically. Do not send any email to me there -
  there are no humans at that email address and your message
  will not reach me. Use the feedback form at the site instead.

  */

  // ---------------- CONFIGURABLE SECTION -----------------

  // Please modify the following or it will not work on
  // your website.

  // Where did you actually put your images?
  // Make sure that the path you put below ends with
  // a directory slash ("/"). The script below assumes it.
  $imagedir = "/home/var/www/html/c83kas90efli01/" ;

  // What are the websites (hostnames) that can use this
  // image?
  // If your site can be accessed with or without the
  // "www" prefix, make sure you put both here. Do not put
  // any trailing slashes ("/") nor any "http://" prefixes.
  // Follow the example below.
  $validprefixes = array (
    "animewalls.de",
    "www.animewalls.de",
    "animewalls.net",
    "www.animewalls.net",
    "animewalls.org",
    "www.animewalls.org",
  ) ;

  // What is the main page of your website? Visitors will
  // be directed here if they type
  //   "http://www.yourdomain.com/chimage.php"
  // in their browser.
  $homepage = "http://www.animewalls.de/" ;

  // What is your email address?
  // If you want to be informed when someone tries to use
  // this script to access an image illegitimately, you
  // must uncomment (remove the "//" prefix) the following
  // line and change it to point to your email address.
  // $email = "test@test.com" ;

  // ------------ END OF CONFIGURABLE SECTION ------------


  // --- YOU NEED NOT MODIFY ANYTHING AFTER THIS LINE ---

  function isreferrerokay ( $referrer, $validprefixes )
  {
    $validreferrer = 0 ;
    $authreferrer  = current( $validprefixes );
    while ($authreferrer) {
      if (eregi( "^https?://$authreferrer/", $referrer )) {
        $validreferrer = 1 ;
        break ;
      }
      $authreferrer = next( $validprefixes );
    }
    return $validreferrer ;
  }

  //----------------------- main program -----------------------

  $image = $_GET['image'] ;
  $referrer = getenv( "HTTP_REFERER" );

  if (isset($_GET['image'])) {

    if (empty($referrer) ||
      isreferrerokay( $referrer, $validprefixes )) {

      $imagepath = $imagedir . $image ;

      $imageinfo = getimagesize( $imagepath );
      if ($imageinfo[2] == 1) {
        $imagetype = "gif" ;
      }
      elseif ($imageinfo[2] == 2) {
        $imagetype = "jpeg" ;
      }
      elseif ($imageinfo[2] == 3) {
        $imagetype = "png" ;
      }
      else {
        header( "HTTP/1.0 404 Not Found" );
        exit ;
      }

      header( "Content-type: image/$imagetype" );
      header( "Content-Disposition: filename=$image"); 
#     header("Content-length: ".$dateigroesse);
#     header("Cache-control: private"); 
      @readfile( $imagepath );

    }
    else {

      if (isset($email)) {
        mail( $email, "Bandwidth Theft Alert",
           "WARNING:\n\n$referrer\ntried to access\n$image\n",
           "From: CHImageGuard <$email>" );
      }
      header( "HTTP/1.0 404 Not Found" );
    }
  }
  else {
    header( "Location: $homepage" );
  }

?>
Mit Zitat antworten
  #2  
Alt 12.05.2005, 12:42:13
Benutzerbild von xabbuh
xabbuh xabbuh ist offline
SELFPHP Guru
 
Registriert seit: May 2003
Beiträge: 7.187
AW: Prob mit script

Hast du Zugriffsrechte auf das Bild? Prüfe das mal mit is_readable.
Mit Zitat antworten
  #3  
Alt 12.05.2005, 12:54:35
Benutzerbild von meikel (†)
meikel (†) meikel (†) ist offline
SELFPHP Guru
 
Registriert seit: Dec 2003
Ort: Erfurt
Alter: 75
Beiträge: 4.001
AW: Prob mit script

Zitat:
Zitat von Spawn-Dw
Warning: getimagesize: Unable to open '/home/var/www/html/c83kas90efli01/3x3_Eyes/tn/eyes0001.jpg' for reading. in /home/animewallsde/var/www/html/chimage.php on line 152
Sehr eichelartige Pfade...
Mit Zitat antworten
  #4  
Alt 12.05.2005, 13:03:40
Spawn-Dw Spawn-Dw ist offline
Anfänger
 
Registriert seit: May 2005
Beiträge: 2
AW: Prob mit script

Zitat:
Zitat von meikel
Sehr eichelartige Pfade...
danke das wahr der fehler hatte mal wieder tomaten auf den augen
Big Thx
Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

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

BB-Code ist an.
Smileys sind aus.
[IMG] Code ist aus.
HTML-Code ist aus.

Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Fehler in Script das Inhalt einer .txt Datei (HTML Sourcecode) in Datei schreiben sol RookieXL2 PHP für Fortgeschrittene und Experten 2 09.06.2007 00:58:33
Strings per PHP an ein anderes Script übergeben ? quirrly PHP Grundlagen 18 23.12.2004 16:20:39
Prob mit php script Spawn-D PHP für Fortgeschrittene und Experten 5 24.11.2003 18:53:55
Spezielles Script für Bildergalerie flightlevel PHP Grundlagen 3 05.03.2003 23:04:52
Suche "Länder" Script.. Nomad PHP für Fortgeschrittene und Experten 15 26.02.2003 00:00:25


Alle Zeitangaben in WEZ +2. Es ist jetzt 08:43:49 Uhr.


Powered by vBulletin® Version 3.8.3 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.


© 2001-2024 E-Mail SELFPHP OHG, info@selfphp.deImpressumKontakt