Solved

cross platform includes

Posted on 2002-05-04
6
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:Richard Quadling
Richard Quadling 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

740 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