Solved

cross platform includes

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Set a time limit on Wordpress Cookie function. 3 53
Do not understand error message 3 46
php output utf-8 problem 6 52
Last 4 numbers of a variable 9 24
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

752 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