|
| 1 | +WIP WIP WIP |
| 2 | + |
| 3 | +# FlushDNS |
| 4 | + |
| 5 | +[//]: # ([](https://packagist.org/packages/knotsphp/flushdns) ) |
| 6 | +[//]: # ([](https://packagist.org/packages/knotsphp/flushdns) ) |
| 7 | +[//]: # ([](https://packagist.org/packages/knotsphp/flushdns) ) |
| 8 | +[//]: # ([](https://packagist.org/packages/knotsphp/flushdns) ) |
| 9 | +[//]: # ([](https://packagist.org/packages/knotsphp/flushdns) ) |
| 10 | +[//]: # ([](https://github.com/knotsphp/flushdns/actions/workflows/test.yml)) |
| 11 | + |
| 12 | +FlushDNS is a PHP library to flush the DNS cache of the current machine. |
| 13 | + |
| 14 | + |
| 15 | +## 🚀 Installation |
| 16 | + |
| 17 | +```bash |
| 18 | +composer require knotsphp/flushdns |
| 19 | +``` |
| 20 | + |
| 21 | +## 📚 Usage |
| 22 | +WIP WIP WIP |
| 23 | + |
| 24 | +```php |
| 25 | +use KnotsPHP\FlushDNS\FlushDNS; |
| 26 | + |
| 27 | +// Flush DNS cache |
| 28 | +$success = FlushDNS::run(); |
| 29 | + |
| 30 | +// Only get the command |
| 31 | +$command = FlushDNS::getCommand(); |
| 32 | + |
| 33 | +// Check if the command needs elevated privileges |
| 34 | +$needsElevation = FlushDNS::needsElevation(); |
| 35 | +``` |
| 36 | + |
| 37 | +## 📚 Use in command line |
| 38 | + |
| 39 | +You can also use this library in the command line by using the `flushdns` command. |
| 40 | + |
| 41 | +It's recommended to install the library globally to use it in the command line. |
| 42 | +```bash |
| 43 | +composer global require knotsphp/flushdns |
| 44 | +``` |
| 45 | + |
| 46 | +Then you can use the `flushdns` command to get the public IP address of the current machine. |
| 47 | +```bash |
| 48 | +# In your project directory |
| 49 | +vendor/bin/flushdns |
| 50 | + |
| 51 | +# Globally installed |
| 52 | +flushdns |
| 53 | +``` |
| 54 | + |
| 55 | +## 📖 Documentation |
| 56 | +This library is compatible with MacOS, Linux, and Windows. |
| 57 | + |
| 58 | +Some operating systems may require root access to flush the DNS cache. |
| 59 | + |
| 60 | +## 🤝 Contributing |
| 61 | +Clone the project and run `composer update` to install the dependencies. |
| 62 | + |
| 63 | +Before pushing your changes, run `composer qa`. |
| 64 | + |
| 65 | +This will run [pint](http://github.com/laravel/pint) (code style), [phpstan](http://github.com/phpstan/phpstan) (static analysis), and [pest](http://github.com/pestphp/pest) (tests). |
| 66 | + |
| 67 | +## 👥 Credits |
| 68 | + |
| 69 | +FlushDNS was created by Eser DENIZ. |
| 70 | + |
| 71 | +## 📝 License |
| 72 | + |
| 73 | +FlushDNS is licensed under the MIT License. See LICENSE for more information. |
0 commit comments