Solved

cross platform includes

Posted on 2002-05-04
6
211 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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
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)

636 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