nadimtuhin / dse-scrapper
Dhaka Stock Exchange Scrapper
Requires
- php: >=5.3.0
- symfony/css-selector: 2.6.*
- symfony/dom-crawler: 2.6.*
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-08 04:32:34 UTC
README
DSE Scrapper
One call, one array. Back when DSE served the page.
MIT PHP 5.4+ Composer
Warning
This no longer works. DSE retired the page the scraper reads (latest_share_price_all.php now returns 410 Gone), so scrap() returns an empty array. Kept for reference.
1. Add it to composer.json:
{
"require": {
"nadimtuhin/dse-scrapper": "0.1.*@dev"
}
}
2. Install:
composer install
3. Run it:
require_once('vendor/autoload.php'); $scrapper = new NadimTuhin\DSE\DseScrapper(); $data = $scrapper->scrap(); print_r($data);
Save as run.php, then run php run.php.
Three small steps. Downloader fetches the latest share price page from dsebd.org. Parser reads each table row. Transformer names the columns.
Values stay as text. Numbers come back as strings, like "1,105", so convert them yourself if you need math.
Everything below is reference. You don't need it to get started.
Dhaka Stock Exchange Scrapper
Scrapping Dhaka Stock Exchange (DSE) data were never easier. Easy to use API. Pull requests, bug reports, feature requests are welcome.
Disclaimer:
This software is to be used For Educational Purposes Only . If this software is used against the Terms and Conditions stated in dsebd.org the author would not be responsible.
Install
install using composer
{
"require": {
"nadimtuhin/dse-scrapper": "0.1.*@dev"
}
}
Usage
require_once('vendor/autoload.php'); $scrapper = new NadimTuhin\DSE\DseScrapper(); $data = $scrapper->scrap(); print_r($data);
Data Structure
array:321 [▼ 0 => array:10 [▼ "trading_code" => "1JANATAMF" "ltp" => "4.1" "high" => "4.3" "low" => "4.1" "closep" => "4.1" "ycp" => "4.3" "change" => "-0.2" "trade" => "80" "value" => "1.187" "volume" => "283,615" ] 1 => array:10 [▼ "trading_code" => "1STICB" "ltp" => "1,105" "high" => "1,105" "low" => "1,103.9" "closep" => "1,104" "ycp" => "1,075" "change" => "30" "trade" => "5" "value" => "0.05" "volume" => "45" ] 2 => array:10 [▶] 3 => array:10 [▶] 4 => array:10 [▶] 5 => array:10 [▶] 6 => array:10 [▶] 7 => array:10 [▶] 8 => array:10 [▶] 9 => array:10 [▶] 10 => array:10 [▶] 11 => array:10 [▶] 12 => array:10 [▶] 13 => array:10 [▶] ....