Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I put PHP output to other server?

Status
Not open for further replies.

paispatin

Technical User
Joined
Oct 21, 2003
Messages
62
Location
A1
Dear all,

I have 2 server:
server 1 for php server+database server
server 2 for webserver only

I already made a program at server 1, and have output. I also make a index.shtml at server 2 to read the output of my program at server 1. But it can't.

What should I do to join 2 php output from 2 server?

Thank you in advance.
 
Sorry, to make it easy to understan maybe it will be something like text counter.

server 1 to generate counter and text output.
server 2 is a server with server 1 counter.

thank you
 
What is a PHP server? How does it differ from a regular web server?

On server 2 (PHP-less), drop this code in a plain HTML file...
Code:
<script src="[URL unfurl="true"]http://server1.com/function.php"></script>[/URL]

On server 1 (PHP-enabled), create a file called function.php to do your business...
Code:
<?php
$date = date("ymd-Hi");
print ("document.write('Today's timestamp is $date');");
?>

Server 2 will display your PHP output.

This all is kind of silly since you should just give the end user access to the PHP web server. The only way to properly hide or tunnel the data from your database server to your public web server is to use a scripting language on the public web server.

- - picklefish - -
Why is everyone in this forum responding to me as picklefish?
 
Picklefish, thank you for your reply, you right, PHP server mean PHP + Web Server.

Anyway, I still can not run that script at my server.

If I'm not wrong you try to put javascript code to solve my problem, but I still can do that.

Maybe anything else ?

Thank you in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top