Advertisement
joris

Full Code EPG

Sep 17th, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <?php
  2. require_once('lib/nusoap.php');
  3. require_once('koneksi.php');
  4.  
  5. $client = new nusoap_client('http://118.97.88.27:81/TBISAPI/view/Epg.php');
  6. $result = $client->call('getSchedule', array('ChannelCode' => 'HBO', 'TglAwal' => '20120812', 'TglAkhir' => '20120913'));
  7.  
  8.  
  9. echo "<pre>" , print_r($result, 1) , "</pre>";
  10.  
  11. foreach($result as $row){
  12.     $ChannelCode        = $row['CHANNEL_CODE'];
  13.         $ChannelName        = $row['CHANNEL_NAME'];
  14.         $TglMulai               = $row['TGL_MULAI'];
  15.        
  16.         $WaktuMulai             = $row['WAKTU_MULAI'];
  17.         $FormatWM               = date('Y-m-d G:i:s',strtotime($WaktuMulai));
  18.        
  19.         $WaktuAkhir             = $row['WAKTU_AKHIR'];
  20.         $FormatWA               = date('Y-m-d G:i:s',strtotime($WaktuAkhir));
  21.        
  22.         $Judul                  = $row['JUDUL'];
  23.         $Sinopsis               = $row['SINOPSIS'];;
  24.    
  25.     $query = "INSERT INTO epg (channel_code,channel_name,tgl_mulai,waktu_mulai,waktu_akhir,judul,sinopsis)
  26.     VALUES ('$ChannelCode','$ChannelName','$TglMulai','$FormatWM','$FormatWA','$Judul','$Sinopsis')";
  27.     mysql_query($query) or die(mysql_error());
  28. }
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement