Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('lib/nusoap.php');
- require_once('koneksi.php');
- $client = new nusoap_client('http://118.97.88.27:81/TBISAPI/view/Epg.php');
- $result = $client->call('getSchedule', array('ChannelCode' => 'HBO', 'TglAwal' => '20120812', 'TglAkhir' => '20120913'));
- echo "<pre>" , print_r($result, 1) , "</pre>";
- foreach($result as $row){
- $ChannelCode = $row['CHANNEL_CODE'];
- $ChannelName = $row['CHANNEL_NAME'];
- $TglMulai = $row['TGL_MULAI'];
- $WaktuMulai = $row['WAKTU_MULAI'];
- $FormatWM = date('Y-m-d G:i:s',strtotime($WaktuMulai));
- $WaktuAkhir = $row['WAKTU_AKHIR'];
- $FormatWA = date('Y-m-d G:i:s',strtotime($WaktuAkhir));
- $Judul = $row['JUDUL'];
- $Sinopsis = $row['SINOPSIS'];;
- $query = "INSERT INTO epg (channel_code,channel_name,tgl_mulai,waktu_mulai,waktu_akhir,judul,sinopsis)
- VALUES ('$ChannelCode','$ChannelName','$TglMulai','$FormatWM','$FormatWA','$Judul','$Sinopsis')";
- mysql_query($query) or die(mysql_error());
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement