[thelist] Javascript <-> PHP

Erik Mattheis gozz at gozz.com
Sat Mar 1 18:59:01 CST 2003


On Saturday, March 1, 2003, at 06:42  PM, nicky wrote:
> I have a php file on a server and I want to show data from this php
> file
> on another server in using JS.

If I understand your question, it's "I need to display content
generated by PHP on server A on a page of Server B, which will grab the
file from server A using JavaScript."

On server A, you can make .js files run through PHP, change the header
by saying header ("Content-type: application/s-javascript"); and call
them from the documents on server B by saying

<script language="javascript" type="text/javascript"
src="http://serverB/my_php_js_file.js"></script>

Or, maybe easier you could try doing the above but just calling the PHP
file (my_php_js_file.php) ... and see how different browsers handle it.
-----------------------
Erik Mattheis
GoZz Digital
<http://goZz.com/>
Flash and ColdFusion Development
Minneapolis, MN
-----------------------




More information about the thelist mailing list