473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

Aug 22 '05 #1
1 3972

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

Aug 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Cartensy | last post by:
Hi, I try to configure a php applic to load a config file (the purpose is to use in all the php pages variables definied in a config file) Here is a small example which describe my problem: My...
2
by: NotGiven | last post by:
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file, "conn.php", so it's out of the web accessible file...
2
by: Mark | last post by:
Is there a Perl equivalent of the PHP include statement? If so please can you also give me a reference in the perldoc manual. http://www.php.net/function.include Thanks Mark
2
by: William van Zwanenberg | last post by:
Hi there, I wonder if you guys can help. I'm currently experiencing some coding problems what with trying to use PHP and javascript in tandem. What I'm ultimately trying to achieve is use...
18
by: Steven Borrelli | last post by:
Hello, I am using the <?php include() ?statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually...
2
by: crashpolo | last post by:
Hi Any idea why my code doesnt work I need to pull ind ate from numerous other servers ...but the following code doesnt work <?php include 'http://server1/tmp/test.php?';?> or <?php...
4
by: Kevin G. | last post by:
Hello all, I have a flat HTML page with 3 distinct HTML tables, and I'm trying to randomly display the tables when the page loads, without repeating. My idea is to use the PHP include() function...
12
by: Geoff Cox | last post by:
Hello I'm having a problem loading a frameset file using an include in a php file. Nothing is displayed and when I look at the source code I see that <html> <head> <title></title>
25
by: Mark | last post by:
so, i'm making a website. let's say i have header.php, footer.php and content.php. now in index.php I simply want to include the 3 pages. easy enough to do. but let's say the user navigates to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.