Re: Need help calling PHP page from another server.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Hicks wrote:
Robert Filipovich wrote:
I am using a chat program and trying to call the status page from another
server and the graphic that the page returns does not show up.

It works if you are calling from the webserver that the chat program is
working so i feel it is some type of config problem or security issue.

http://www.hidho.com/chattest.htm is the page that uses the code

<a href="javascript:pophelp('
http://chat.siuprem.com/siupchat/client.php',500,500)"><img src="
http://chat.siuprem.com/siupchat/statusimage.php";></a> and it works on
http://chat.siuprem.com/siupchat/chattest.htm which is the windows IIS
sesrver where PHP is running.


Do you have access to the source of statusimage.php?

(I have a hunch it is checking the request's referer.)

--J

Since this is open source code ('phpOnline') available at
http://www.dayanahost.com/phponline.cfm
I guess it's safe to post an excerpt here:

...
[a number of mysql statements without error checking or other exits]
...
[concluding with:]

header ("Content-type: image/jpeg");

if($LastAdmLoginTime==0 || $LastAdmLoginTime<($TTime-120))
{
	echo implode('', file('pathtooffline.jpg'));
	$OnlineStatus = 0;
}
else
{
	echo implode('', file('pathtoonline.jpg'));
}

Since both of these images are present (i.e. can be accessed directly) and since there isn't any exit prior to the execution of the above statement, I conclude that the program must be erring out before it gets here.

Check your php error log first. If you don't find anything there then edit the program to add error checking for all the sql commands.

You might also find help at the phpOnline forums: http://www.dayanahost.com/forum2/index.php?act=SF&f=11&;

If you can't find the problem, since the program is short, you could post it to the list.

--J

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux