PHP code example of rioastamal / porsi-haji-checker
1. Go to this page and download the library: Download rioastamal/porsi-haji-checker library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rioastamal / porsi-haji-checker example snippets
ika tidak menggunakan autoload cukup r.php
// tamal\Kemenag\NomorHajiParser;
$nomorPorsi = '3000837XXX';
$scrapper = NomorHajiScraper::create($nomorPorsi);
$parser = NomorHajiParser::create($scrapper);
$jsonInfoPorsi = $parser->parse();
print_r( json_decode($jsonInfoPorsi), JSON_OBJECT_AS_ARRAY );
/* output
Array
(
[nomor_porsi] => 3000837XXX
[nama] => HAMBA ALLAH INDONESIA
[kabupaten_kota] => KOTA SURABAYA
[provinsi] => JAWA TIMUR
[kuota] => 12345
[posisi_porsi_kuota] => 12233
[perkiraan_tahun_berangkat_hijriah] => 1444
[perkiraan_tahun_berangkat_masehi] => 2023
)
*/