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.
php bot için json çekme
7
●2.334
- 03-05-2017, 13:43:22Merhaba 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:43Teşekkür ederim hocam eve gecince hemen deneyeceğim.jooker adlı üyeden alıntı: mesajı görüntüle
- 03-05-2017, 19:40:04merhaba hocam bazı değişikler ile kodunuz işime yaradı .lakin array içindeki çıktıyı nasıl alabiliriz.jooker adlı üyeden alıntı: mesajı görüntüle
[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, 20:05:36omrumdely 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> - 03-05-2017, 22:29:08çok ama çok teşekkür ederim.Mert50356 adlı üyeden alıntı: mesajı görüntüle
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 22:29:08 -->-> Daha önceki mesaj 22:17:42 --
teşekkür ederim deneyecem.jooker adlı üyeden alıntı: mesajı görüntüle