Skip to content

Commit

Permalink
~ example
Browse files Browse the repository at this point in the history
  • Loading branch information
vantoozz committed Feb 20, 2021
1 parent 402e0be commit 7af184f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/07-metrics.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<?php declare(strict_types=1);

use Vantoozz\ProxyScraper\Proxy;
use Vantoozz\ProxyScraper\Scrapers;

require_once __DIR__ . '/../vendor/autoload.php';

$scraper = new Scrapers\FreeProxyListScraper(guzzleHttpClient());

foreach ($scraper->get() as $proxy) {
echo $proxy . "\n";
/** @var Proxy $proxy */
$proxy = $scraper->get()->current();

foreach ($proxy->getMetrics() as $metric) {
echo $metric->getName() . ': ' . $metric->getValue() . "\n";
}

0 comments on commit 7af184f

Please sign in to comment.