Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.