Solved

cross platform includes

Posted on 2002-05-04
6
185 Views
Last Modified: 2013-11-18
I run PHP on my site and so does another organisation. We want to share data but do not want to give direct access via a username and password to our databases.

Is it possible to include their login script over the internet or do includes have to be local?

Is there any solution to this issue?

Thanks in advance!
0
Comment
Question by:XantioBoy
  • 2
6 Comments
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6990248
....
0
 
LVL 8

Accepted Solution

by:
us111 earned 50 total points
ID: 6990974
<?
$var="TEST STRING";
include("http://www.domain.com/script2.php");
?>
$var will be not set in script2.php. Even if script1.php and script2.php
reside on the same server.

so you can do that but specify the username & login
include("http://www.domain.com/script2.php?login=ttt&pwd=uuu");

but this is not really secured.


0
 
LVL 40

Assisted Solution

by:RQuadling
RQuadling earned 50 total points
ID: 6993994
I thought that if you include a file via http from a server that is running PHP, you will get the executed results, rather than the PHP code?

Unless you have a file-system level access to the PHP files, you will either need to FTP them (yuck and probably useless) or use some other method. Does Samba help in this respect?

I was thinking of some sort of proxy-ing technique but I can't see how you can pass around the sort of data required between different servers.

Richard.

0
 
LVL 8

Expert Comment

by:us111
ID: 6994015
the other solution is to put the php code into a database,
then to extract the content from another server and to use the eval PHP function
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This article discusses four methods for overlaying images in a container on a web page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now