include thing

A

Anonymous

Guest
is it possible to include a php file from another server?

ex:

url = "www.nowhere.com"
page:
include ('http://www.somewhere.com/variables.php');
echo $username;
echo $password;
 
no, if you include a file from another server,
you can see only the parsed result,
you can't access to the variables (that were a big security-risk...)
 
This isn't a security question. Please post in the "mySQL & php coding" area next time.
 
i think it is a security-risk,
if somebody were be able to access the variables (like password or usernames)...
 
passwd and other imp files are always place out the web directoy folders :arrow:
 
toweter said:
i think it is a security-risk,
if somebody were be able to access the variables (like password or usernames)...

hm... security?
i dint try that thing but please read comment of junk123 at cscoders dot com
http://ua.php.net/manual/ru/function.include.php

One of the previous posts mentioned that you cannot have a return value from a URI included file. This is not exactly true. What you can do is this:

myfile.php
<?
include ('http://www.abc.com/second.php');
echo $var_I_want_to_see;
?>
second.php
<?
echo '<?$var_I_want_to_see = "I can see it";?>';
?>
and the page will output
I can see it

i didnt try that, but IMHO this wouldnt be works.
 
perhaps i have written it false...
i have meant if this were possible it were a securityrisk,
that can't work, you see here...
 
Back
Top