coercive / online
Coercive Online Utility
2.0.3
2024-02-28 10:05 UTC
Requires
- php: >=7.1
- ext-curl: *
README
Get websine online information by url.
Get
composer require coercive/online
Usage
use Coercive\Utility\Online; # Website list to test $aWebSites = [ 'my.web.site-1.com', 'my.web.site-2.com', 'my.web.site-3.com', 'my.web.site-4.com' ]; # Add your urls to Online list foreach($aWebSites as $iKey = $sUrl) { # Url can be processed ('/' and space trim) $aWebSites[$iKey] = Online::create($sUrl); } # Run all curl requests Online::run(); # Get datas foreach($aWebSites as $sUrl) { $oOnline = Online::get($sUrl); if($oOnline) { echo "ip : " . $oOnline->ip() . "<br />"; echo "isRedirect : " .$oOnline->isRedirect() . "<br />"; echo "redirectUrl : " .$oOnline->redirectUrl() . "<br />"; echo "time : " .$oOnline->time() . "<br />"; echo "url : " .$oOnline->url() . "<br />"; } }