Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $perkataan = "encik";
- $url = "https://prpm.dbp.gov.my/Cari1?keyword=".$perkataan;
- $kamus = file_get_contents($url);
- preg_match('/<div class="tab-pane fade in active" id="1">(.*?)<\/div>/s',$kamus,$maksud);
- foreach($maksud as $phc)
- {
- $atom.=$phc.PHP_EOL;
- }
- $atoms = str_replace(". ", "", strip_tags($atom));
- if($atoms !== null)
- {
- echo $atoms;
- }
- else
- {
- echo "perkataan tidak dijumpai";
- }
- ?>
Add Comment
Please, Sign In to add comment