mahedimaruf / bikroy
A PHP library for scraping phone numbers from bikroy.com
1.0
2018-02-06 23:38 UTC
Requires
- php: >=5.4.0
- fabpot/goutte: ^3.2
This package is not auto-updated.
Last update: 2025-06-15 18:32:52 UTC
README
Requirements
PHP version 5.4.0 or higher
Installation with composer
It is also possible to install library via composer
composer require mahedimaruf/bikroy
Example usage
require_once 'vendor/autoload.php'; // import goutte use Goutte\Client; // Create new goutte client $bot = new Client(); //Initialize a Instance "bikroy" class $bikroy = new Mahedimaruf\Bikroy($bot); $city = 'dhaka'; // Pass the city to start_page method.It will return the first ad list page link to start scraping $nextlink = $bikroy->start_page($city); while ($nextlink) { //Pass page link. It will return an array with all the name and phone numbers from the ad list page and a link to next page. $results = $bikroy->scrap($nextlink); var_dump($results['details']); //Set next page link. So script will continue scraping until there is no next link! $nextlink = $results['nextlink']; }