Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 22nd, 2005, 06:45 PM
googlegroupsneu.20.Jumbo1@spamgourmet.com
Guest
 
Posts: n/a
Default Einbinden von PHP-Dateien mittels include / require mit einem absoluten Pfad (http://...)

Hallo,

ich habe eine Frage zum Thema Einbinden von PHP-Dateien mittels include
/ require mit einem absoluten Pfad (http://...):

Die Problemstellung:
Auf unserer Website werden täglich News veröffentlicht. Jetzt
möchten wir externen Partnern die Möglichkeit geben, eine Newsbox in
ihre Website zu integrieren, die jeweils unsere 5 aktuellsten News
anteasert und verlinkt. Klickt ein User der Partner-Websites auf einen
News-Link, so soll der User auf unserer Website und der entsprechenden
News herauskommen. (Möglicherweise bohren wir das später auf, sodass
der User die News direkt bei unserem Partner angezeigt bekommt - oder
zumindest in dessen "look and feel".)

Meine Idee: Die Sache ließe sich vermutlich mittels include / require
relativ schnell lösen: Man bindet mit "include
('http://www.meinedomain.de/newsbox.inc.php')" ein Skript ein. Dieses
Skript ermittelt die aktuellsten News aus der Datenbank und
übermittelt die entsprechenden Inhalte (Teaser plus Link) an die
Partner-Website, die diese anzeigt.

Um die aktuellsten News aus der Datenbank zu ziehen, muss diese
natürlich mit Paßwort etc. aufgerufen werden. Genau hier bin ich
nicht sicher, ob meine Idee die richtige ist. Denn ich habe schon
öfters (auch in dieser Group) gelesen, dass das Einbinden von
php-Dateien sicherheitstechnisch problematisch sein kann. Ich verstehe
allerdings nicht, ob dies in unserem speziellen Fall überhaupt ein
Problem ist.

Wer kann mir weiterhelfen?

Danke, Annika

  #2  
Old August 23rd, 2005, 11:05 AM
Steve
Guest
 
Posts: n/a
Default Re: Einbinden von PHP-Dateien mittels include / require mit einem absoluten Pfad (http://...)


Annika:

You are right that this is a fast way to set up a news feed. I'm sure
you have noted that all of your partner websites must use PHP,
otherwise they could not use include() or require(). Usually javascript
is used to merge content from an outside source, which means that plain
HTML pages can be used on partner sites.

However, there should be no security problem with this method for your
partner websites, because they do not execute the code in the included
PHP file.

They also cannot see the source code in the included PHP file, so your
database passwords are safe. It should not be possible under normal
circumstances to bypass the execution of the code unless your web
server malfunctions.

You should not store passwords or other sensitive details in variables
that have scope outside the include file. Probably this is one case
where hard-coding such values is better.

Translation: <http://www.google.com/translate_t>

---
Steve

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles