Start Browser from Client-Side PHP Script

Let’s say you have a PHP script (not PHP on a web server, but simply a .php script that you run from a command line), this is one way to start/launch a browser and automatically load/navigate to a URL.

<?php

// Type "start iexplore" and press "Enter" to open Internet Explorer and view its default home screen. 
// Alternatively, type "start firefox," "start opera" or "start chrome" and press "Enter" to open one of those browsers.
	
pclose(popen('start iexplore https://www.chilkatsoft.com &', 'r'));
//pclose(popen('start firefox -url https://www.chilkatsoft.com &', 'r'));
//pclose(popen('start chrome https://www.chilkatsoft.com &', 'r'));

?>
Tags :