Jump to content

Renew Windows Hosts


glenelkins

Recommended Posts

Hi

So after writing a script to create new virtual hosts on Apache. I figured how to reset the host records without reboot with the following command :  "ipconfig /renew"

Can i run this from php as such?  [code]exec("ipconfig /renew"); [/code]
Link to comment
https://forums.phpfreaks.com/topic/31573-renew-windows-hosts/
Share on other sites

Yes you can, so long as the application has the permissions set up to allow the user to execute it.

You can use [url=http://uk.php.net/manual/en/function.exec.php]exec()[/url], [url=http://uk.php.net/manual/en/function.system.php]system()[/url] or [url=http://uk.php.net/manual/en/function.shell-exec.php]shell_exec()[/url] I believe.

Regards
Huggie
Link to comment
https://forums.phpfreaks.com/topic/31573-renew-windows-hosts/#findComment-146347
Share on other sites

Great. I am actually writing a web control panel. To start with for windows OS (apache only). I will post updates as I go along.

Currently the system has an admin area to setup hosting accounts. The user can then log in and creat sub domains, or access their FTP. I will soon be adding FTP account creation and a simple file manager.
Link to comment
https://forums.phpfreaks.com/topic/31573-renew-windows-hosts/#findComment-146357
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.