Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

include() php files over the internet.


(!)

Boylett's Avatar
Boylett Boylett is offline
Computer Specs
Member with 55 posts.
THREAD STARTER
 
Join Date: Dec 2006
Experience: Intermediate
12-Feb-2007, 12:07 PM #1
include() php files over the internet.
I am try to transfer stuff from server to server using php and variables. This is my variable place: http://vl.xendot.com/echo_vars.php. How do I include it in a file on a different website without it automaticly echoing?
Gibble's Avatar
Member with 27,087 posts.
 
Join Date: Oct 2001
Location: Striking or Scoring
Experience: The Alpha and Omega
13-Feb-2007, 03:56 PM #2
I don't think you can...it would be a security risk.
namenotfound's Avatar
Member with 3,012 posts.
 
Join Date: Apr 2005
Location: New York
13-Feb-2007, 04:01 PM #3
If the PHP file contains any HTML, that will transfer, but I don't think any of the PHP would.

If you had, for example a file on site1.com called "hello.php" with these contents:
Code:
<?php
$world = "world";
?>
Hello <?php echo $world; ?>
And you tried to include it on site2.com, the output will only be:
Quote:
Hello
So you can include a .php file from one server to another, but it will only parse the HTML parts of that file.
brendandonhu's Avatar
Member with 14,681 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
13-Feb-2007, 05:02 PM #4
Above code would output "Hello world", but $world would not be set.

Unless you want your PHP source to be visible to users, you would have to use some kind of authentication or password, or include() the file via FTP.
Boylett's Avatar
Boylett Boylett is offline
Computer Specs
Member with 55 posts.
THREAD STARTER
 
Join Date: Dec 2006
Experience: Intermediate
13-Feb-2007, 05:31 PM #5
Na you dont get it. Its open source to include over the internet so people can put it on there own site if they want. Anyway, I've found out a way to do it.

P.S incase u didnt realise, my problem was just doing include() over the internet didn't set variables even if it did say $bla = 1;
but i managed to fix that. Thanks for your help anyway.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑

Content Relevant URLs by vBSEO 3.3.2