I'm making a portal page to display info on several different sites we manage. Each site has a servlet installed. When invoked given a specific query parameter, the servlet will output a short text string which I want to display on my portal.
This has previously been done by making 'include' calls to the servlets before any html are displayed to the user.
Code: Select all
...
if (url_exists("http://".$appServer.":".$appPort."/".$appName."/")) {
include("http://".$appServer.":".$appPort."/".$appName."/servlet/".$servlet."?param=VERSION");
}
... I've just recently switched to making separate AJAX calls to a php file - one for each servlet to be called. This should make the page load faster for the user, since fetching the information from the servlets will be asynchroneous.
The problem is that if I recode the above to:
Code: Select all
<?
$url = $_GET['url'];
include($url."?param=VERSION);
?> Code: Select all
<br />
<b>Warning</b>: main(http://server.domain/appName/servlet/se ... er=SITE_ID
): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in <b>e:\oracle\10gas\apache\apache\htdocs\portal2_getinfo.php</b> on line <b>2</b><br />
<br />
<b>Warning</b>: main(): Failed opening 'http://server.domain/appName/servlet/servletName?parameter=SITE_ID' for inclusion (include_path='.;c:\php4\pear') in <b>e:\oracle\10gas\apache\apache\htdocs\portal2_getinfo.php</b> on line <b>2</b><br /> As you've probably guessed, I'm a real novice in PHP. Can anybody help me out here?