PageGrabber
PageGrabber is a Composer package the makes it easy to grab website's title., (*1)
Installing PageGrabber
The recommended way to install PageGrabber is throught [Composer] (https://getcomposer.org/)., (*2)
if you don't have Composer installed, you may install it via CLI, by typing, (*3)
curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install PageGrabber:, (*4)
composer require alexgoldovsky/page-grabber
Usage
Here is a simple example:, (*5)
<?php
require 'vendor/autoload.php';
use PageGrabber\PageGrabber;
$grabber = new PageGrabber("https://blazemeter.com");
$title = $grabber->getTitle();
echo $title;
Output:, (*6)
JMeter, Load & Continuous Performance Testing Platform
notes
- PageGrabber validates input value as URL according to [RFC 2396] (http://www.faqs.org/rfcs/rfc2396.html)