Skip to content

Instantly share code, notes, and snippets.

@333crist 333crist/grab.php
Last active Dec 1, 2018

Embed
What would you like to do?
Grabbing Content kristiandes.com
<?php
// URL TARGET
$url = 'http://blog.kristiandes.com/grabbing-jadwal-bola-hari-ini/';
//end
// get / mengambil content berdasarkan url yang akan di curi datanya
$content = file_get_contents($url);
//
// STEP 1 mengambil syntax pembuka
$first_step = explode( "<table border='1' class='mainhati'>" , $content );
//
// STEP 2 mengambil syntax penutup
$second_step = explode("</table>" , $first_step[1] );
//
// Replace syntax </tbody> dengan </tbody></table>
$text1 = $second_step[0];
//Tampilkan
echo $text1;
?>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.