Home > Archive > PHP Language > October 2006 > using php to open a broswer?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
using php to open a broswer?
|
|
| Sunusi Ringim 2006-10-23, 6:57 pm |
| hi
how can u i use php to open a browser and display somthing? am developing
an application i want to uweb GUI. please help.
| |
|
| Sunusi Ringim wrote:
> hi
> how can u i use php to open a browser and display somthing? am
> developing an application i want to uweb GUI. please help.
Indeed. If a browser is installed on the server, you can simply open a
browser window with exec(). Check the command line options of that browser
to open a certain page. Given enough rights, PHP will happily open a
browserwindow for you on the server.
If you mean that a window has to be opened by a remote client on a request:
not possible with PHP.
--
Grtz,
Rik Wasmus
| |
| bob.chatman@gmail.com 2006-10-30, 7:02 pm |
| It might not be possible directly through PHP, but it is possible
indirectly.
<?
function openwindow($url, $title = "MyWindow", $width = 400, $height =
200)
{
?><script language="javascript" type="text/javascript">
window.open('<?= $url ?>','<?= title ?>','width=<?= $width
?>,height=<?= $height ?> );
</script>
<?
exit;
}
?>
PHP May be server side, but it writes all the content that is seen by
the user, so it is in effect, controlling the js.
Rik wrote:
> Sunusi Ringim wrote:
>
> Indeed. If a browser is installed on the server, you can simply open a
> browser window with exec(). Check the command line options of that browser
> to open a certain page. Given enough rights, PHP will happily open a
> browserwindow for you on the server.
>
> If you mean that a window has to be opened by a remote client on a request:
> not possible with PHP.
>
> --
> Grtz,
>
> Rik Wasmus
|
|
|
|
|