• 16-10-2021, 14:10:00
    #1
    {"results":[{"title":"R10.net: Webmaster Platformu","link":"https://www.r10.net/","description":"Webmaster Forumu, Google, adsense, hosting hakkında bilgiler ve tartışma platformu.","additional_links":[{"text":"R10.net: Webmaster Platformuhttps://www.r10.net","href":"https://www.r10.net/"},{"text":"Translate this page","href":"https://translate.google.com/translate?hl=en&sl=tr&u=https://www.r10.net/&prev=search&pto=aue"}],"cite":{}}],"image_results":[],"total":18800000,"answers":[],"ts":2.945996046066284}

    Yukaridaki gibi bir veri donuyor. Buradan sadece
    "link":"https://www.r10.net/"

    almak istiyorum bu kismi nasil yazdiracam php ile ?
  • 16-10-2021, 14:14:16
    #2
    Dizin içinde arama yapın hocam. Array_search.
  • 16-10-2021, 14:18:17
    #3
    kayazade adlı üyeden alıntı: mesajı görüntüle
    {"results":[{"title":"R10.net: Webmaster Platformu","link":"https://www.r10.net/","description":"Webmaster Forumu, Google, adsense, hosting hakkında bilgiler ve tartışma platformu.","additional_links":[{"text":"R10.net: Webmaster Platformuhttps://www.r10.net","href":"https://www.r10.net/"},{"text":"Translate this page","href":"https://translate.google.com/translate?hl=en&sl=tr&u=https://www.r10.net/&prev=search&pto=aue"}],"cite":{}}],"image_results":[],"total":18800000,"answers":[],"ts":2.945996046066284}

    Yukaridaki gibi bir veri donuyor. Buradan sadece
    "link":"https://www.r10.net/"

    almak istiyorum bu kismi nasil yazdiracam php ile ?
    $gelen_veri = '{"results":[{"title":"R10.net: Webmaster Platformu","link":"https://www.r10.net/","description":"Webmaster Forumu, Google, adsense, hosting hakkında bilgiler ve tartışma platformu.","additional_links":[{"text":"R10.net: Webmaster Platformuhttps://www.r10.net","href":"https://www.r10.net/"},{"text":"Translate this page","href":"https://translate.google.com/translate?hl=en&sl=tr&u=https://www.r10.net/&prev=search&pto=aue"}],"cite":{}}],"image_results":[],"total":18800000,"answers":[],"ts":2.945996046066284}';
    
    $veri = json_decode($gelen_veri);
    echo $veri['results']['link'];
  • 17-10-2021, 00:55:09
    #4
    digiklan adlı üyeden alıntı: mesajı görüntüle
    $gelen_veri = '{"results":[{"title":"R10.net: Webmaster Platformu","link":"https://www.r10.net/","description":"Webmaster Forumu, Google, adsense, hosting hakkında bilgiler ve tartışma platformu.","additional_links":[{"text":"R10.net: Webmaster Platformuhttps://www.r10.net","href":"https://www.r10.net/"},{"text":"Translate this page","href":"https://translate.google.com/translate?hl=en&sl=tr&u=https://www.r10.net/&prev=search&pto=aue"}],"cite":{}}],"image_results":[],"total":18800000,"answers":[],"ts":2.945996046066284}';
    
    $veri = json_decode($gelen_veri);
    echo $veri['results']['link'];

    $veri = json_decode($gelen_veri,true);
  • 17-10-2021, 01:14:14
    #5
    trgino adlı üyeden alıntı: mesajı görüntüle
    $veri = json_decode($gelen_veri,true);
    Doğru arkadaş kod çalışmadı diye özelden yazdığında düzeltmiştim, array olarak değil object olarak döndürüyordu hatalı kod.