• 03-05-2017, 12:33:29
    #1
    Merhaba arkadaşlar php bot yapıyorum.gecen ufak idda botu yaptım bu bot beni çok heveslendirdi. Kendime göre biraz daha gelişmiş iddaa botu yapacağım tuttu. Az buçuk araştırdım json olayı var.sanirim birçok firma json sayesinde verileri çekiyor.
    Bende birvlink buldum burdaki json olayını nasıl çekip bot yapabilirim
    http://mservice.fanatik.com.tr/LeagueTemplate

    Eğer mümkünse ufak bir örnek verirseniz çok sevinirim.
  • 03-05-2017, 12:46:58
    #2
    Üyeliği durduruldu
    <?php
    $data = file_get_contents("http://link");
    $json = json_decode($data, true);
    ?>
    <table>
    <?php foreach($json as $veri){ ?>
    	<tr>
                <td><?=$veri[0]?></td>
    	</tr>
    <?php } ?>
    </table>
  • 03-05-2017, 13:43:22
    #3
    Merhaba foruma ilk mesajım,
    Json bir veri tipi gelen bir data var orda array gibi düşün zaten json decode olayını yapıp gelen datayı arraya da cevire bilirsin veya obje olarakta kullanabilirsin telefonda olduğum için örnekleyip yazamıyorum php json encode ve decode olayını araştır en iyi döküman php kendi sitesinde mevcut kolaylıklar ve başarılar
  • 03-05-2017, 15:54:43
    #4
    jooker adlı üyeden alıntı: mesajı görüntüle
    <?php
    $data = file_get_contents("http://link");
    $json = json_decode($data, true);
    ?>
    <table>
    <?php foreach($json as $veri){ ?>
    	<tr>
                <td><?=$veri[0]?></td>
    	</tr>
    <?php } ?>
    </table>
    Teşekkür ederim hocam eve gecince hemen deneyeceğim.
  • 03-05-2017, 19:40:04
    #5
    jooker adlı üyeden alıntı: mesajı görüntüle
    <?php
    $data = file_get_contents("http://link");
    $json = json_decode($data, true);
    ?>
    <table>
    <?php foreach($json as $veri){ ?>
    	<tr>
                <td><?=$veri[0]?></td>
    	</tr>
    <?php } ?>
    </table>
    merhaba hocam bazı değişikler ile kodunuz işime yaradı .lakin array içindeki çıktıyı nasıl alabiliriz.

     [MatchLiveInfoEvents] => Array
            (
                [0] => Array
                    (
                        [elapsed] => 90
                        [elapsed_plus] => 0
                        [elapsed_text] => 90
                        [event_desc] => Manuel Jorge Sousa düdüğünü çalıyor ve karşılaşma 0-0 eşitlikle sona eriyor.
                        [incident_code] => Comment
                        [comment] => 
                        [event_incident_typeFK] => 1
                        [EventTypeText] => 
                        [ExtraIncidentInfo] => 
                    )
    
                [1] => Array
                    (
                        [elapsed] => 90
                        [elapsed_plus] => 0
                        [elapsed_text] => 90
                        [event_desc] => Karşılaşmanın sonuna en az 3 dakika ilave ediliyor.
                        [incident_code] => Comment
                        [comment] => 
                        [event_incident_typeFK] => 1
                        [EventTypeText] => 
                        [ExtraIncidentInfo] => 
                    )
    
    
            )
    bu diziyi nasıl yazdırabilirim hocam.
  • 03-05-2017, 19:48:06
    #6
    Üyeliği durduruldu
    <?php
    $data = file_get_contents("http://link");
    $json = json_decode($data, true);
    ?>
    <table>
    <?php foreach($json["MatchLiveInfoEvents"] as $veri){ ?>
       <tr>
                <td><?=$veri[0]?></td>
       </tr>
    <?php } ?>
  • 03-05-2017, 20:05:36
    #7
    omrumdely adlı üyeden alıntı: mesajı görüntüle
    Merhaba arkadaşlar php bot yapıyorum.gecen ufak idda botu yaptım bu bot beni çok heveslendirdi. Kendime göre biraz daha gelişmiş iddaa botu yapacağım tuttu. Az buçuk araştırdım json olayı var.sanirim birçok firma json sayesinde verileri çekiyor.
    Bende birvlink buldum burdaki json olayını nasıl çekip bot yapabilirim
    http://mservice.fanatik.com.tr/LeagueTemplate

    Eğer mümkünse ufak bir örnek verirseniz çok sevinirim.
    <!DOCTYPE html>
    <html>
    <head>
    	<title></title>
    <style type="text/css">
    	@import url(https://fonts.googleapis.com/css?family=Patua+One|Open+Sans);
    
    * { 
      -moz-box-sizing: border-box; 
      -webkit-box-sizing: border-box; 
    	box-sizing: border-box; 
    }
    
    body {
      background:#353a40;
    }
    
    table {
      border-collapse: separate;
      background:#fff;
      @include border-radius(5px);
      margin:50px auto;
      @include box-shadow(0px 0px 5px rgba(0,0,0,0.3));
    }
    
    thead {
      @include border-radius(5px);
    }
    
    thead th {
      font-family: 'Patua One', cursive;
      font-size:16px;
      font-weight:400;
      color:#fff;
      @include text-shadow(1px 1px 0px rgba(0,0,0,0.5));
      text-align:left;
      padding:20px;
      @include background-image(linear-gradient(#646f7f, #4a5564));
      border-top:1px solid #858d99;
      
      &:first-child {
       @include border-top-left-radius(5px); 
      }
    
      &:last-child {
        @include border-top-right-radius(5px); 
      }
    }
    
    tbody tr td {
      font-family: 'Open Sans', sans-serif;
      font-weight:400;
      color:#5f6062;
      font-size:13px;
      padding:20px 20px 20px 20px;
      border-bottom:1px solid #e0e0e0;
      
    }
    
    tbody tr:nth-child(2n) {
      background:#f0f3f5;
    }
    
    tbody tr:last-child td {
      border-bottom:none;
      &:first-child {
        @include border-bottom-left-radius(5px);
      }
      &:last-child {
        @include border-bottom-right-radius(5px);
      }
    }
    
    tbody:hover > tr td {
      @include opacity(0.5);
      
      /* uncomment for blur effect */
      /* color:transparent;
      @include text-shadow(0px 0px 2px rgba(0,0,0,0.8));*/
    }
    
    tbody:hover > tr:hover td {
      @include text-shadow(none);
      color:#2d2d2d;
      @include opacity(1.0);
    }
    
    th {
    	background-color: purple;
    }
    </style>
    </head>
    <body>
    
    <?php
    	$datas = json_decode(file_get_contents("http://mservice.fanatik.com.tr/LeagueTemplate"));
    	$datas = $datas->League;
    ?>
    <table>
        <thead>
            <tr>
                <th>id</th>
                <th>name</th>
                <th>shownName</th>
                <th>sportFK</th>
                <th>sportName</th>
                <th>isTournament</th>
                <th>activeLeagueTournamentID</th>
                <th>logo</th>
            </tr>
        </thead>
        <tbody>
            	<?php
            		foreach ($datas as $data) {
            	?>
            <tr>
    	            <td><?php echo $data->id; ?></td>
    	            <td><?php echo $data->name; ?></td>
    	            <td><?php echo $data->shownName; ?></td>
    	            <td><?php echo $data->sportFK; ?></td>
    	            <td><?php echo $data->sportName; ?></td>
    	            <td><?php echo $data->isTournament; ?></td>
    	            <td><?php echo $data->activeLeagueTournamentID; ?></td>
    	            <td><img src="<?php echo $data->logo; ?>"></td>
            </tr>
            	<?php
            		}
    
            	?>
        </tbody>
    </table>
    </body>
    </html>
  • 03-05-2017, 22:29:08
    #8
    Mert50356 adlı üyeden alıntı: mesajı görüntüle
    <!DOCTYPE html>
    <html>
    <head>
    	<title></title>
    <style type="text/css">
    	@import url(https://fonts.googleapis.com/css?family=Patua+One|Open+Sans);
    
    * { 
      -moz-box-sizing: border-box; 
      -webkit-box-sizing: border-box; 
    	box-sizing: border-box; 
    }
    
    body {
      background:#353a40;
    }
    
    table {
      border-collapse: separate;
      background:#fff;
      @include border-radius(5px);
      margin:50px auto;
      @include box-shadow(0px 0px 5px rgba(0,0,0,0.3));
    }
    
    thead {
      @include border-radius(5px);
    }
    
    thead th {
      font-family: 'Patua One', cursive;
      font-size:16px;
      font-weight:400;
      color:#fff;
      @include text-shadow(1px 1px 0px rgba(0,0,0,0.5));
      text-align:left;
      padding:20px;
      @include background-image(linear-gradient(#646f7f, #4a5564));
      border-top:1px solid #858d99;
      
      &:first-child {
       @include border-top-left-radius(5px); 
      }
    
      &:last-child {
        @include border-top-right-radius(5px); 
      }
    }
    
    tbody tr td {
      font-family: 'Open Sans', sans-serif;
      font-weight:400;
      color:#5f6062;
      font-size:13px;
      padding:20px 20px 20px 20px;
      border-bottom:1px solid #e0e0e0;
      
    }
    
    tbody tr:nth-child(2n) {
      background:#f0f3f5;
    }
    
    tbody tr:last-child td {
      border-bottom:none;
      &:first-child {
        @include border-bottom-left-radius(5px);
      }
      &:last-child {
        @include border-bottom-right-radius(5px);
      }
    }
    
    tbody:hover > tr td {
      @include opacity(0.5);
      
      /* uncomment for blur effect */
      /* color:transparent;
      @include text-shadow(0px 0px 2px rgba(0,0,0,0.8));*/
    }
    
    tbody:hover > tr:hover td {
      @include text-shadow(none);
      color:#2d2d2d;
      @include opacity(1.0);
    }
    
    th {
    	background-color: purple;
    }
    </style>
    </head>
    <body>
    
    <?php
    	$datas = json_decode(file_get_contents("http://mservice.fanatik.com.tr/LeagueTemplate"));
    	$datas = $datas->League;
    ?>
    <table>
        <thead>
            <tr>
                <th>id</th>
                <th>name</th>
                <th>shownName</th>
                <th>sportFK</th>
                <th>sportName</th>
                <th>isTournament</th>
                <th>activeLeagueTournamentID</th>
                <th>logo</th>
            </tr>
        </thead>
        <tbody>
            	<?php
            		foreach ($datas as $data) {
            	?>
            <tr>
    	            <td><?php echo $data->id; ?></td>
    	            <td><?php echo $data->name; ?></td>
    	            <td><?php echo $data->shownName; ?></td>
    	            <td><?php echo $data->sportFK; ?></td>
    	            <td><?php echo $data->sportName; ?></td>
    	            <td><?php echo $data->isTournament; ?></td>
    	            <td><?php echo $data->activeLeagueTournamentID; ?></td>
    	            <td><img src="<?php echo $data->logo; ?>"></td>
            </tr>
            	<?php
            		}
    
            	?>
        </tbody>
    </table>
    </body>
    </html>
    çok ama çok teşekkür ederim.

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 22:29:08 -->-> Daha önceki mesaj 22:17:42 --

    jooker adlı üyeden alıntı: mesajı görüntüle
    <?php
    $data = file_get_contents("http://link");
    $json = json_decode($data, true);
    ?>
    <table>
    <?php foreach($json["MatchLiveInfoEvents"] as $veri){ ?>
       <tr>
                <td><?=$veri[0]?></td>
       </tr>
    <?php } ?>
    teşekkür ederim deneyecem.