{"id":33492,"date":"2025-11-03T14:42:30","date_gmt":"2025-11-03T11:42:30","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=33492"},"modified":"2025-11-03T14:42:30","modified_gmt":"2025-11-03T11:42:30","slug":"giris-web-apileri-ve-phpnin-gucu","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/","title":{"rendered":"Giri\u015f: Web API&#8217;leri ve PHP&#8217;nin G\u00fcc\u00fc"},"content":{"rendered":"<p><body><\/p>\n<h2>Giri\u015f: Web API&#8217;leri ve PHP&#8217;nin G\u00fcc\u00fc<\/h2>\n<p>G\u00fcn\u00fcm\u00fcz web uygulamalar\u0131, sadece kendi veritabanlar\u0131yla s\u0131n\u0131rl\u0131 kalmay\u0131p, farkl\u0131 servislerle etkile\u015fim kurarak \u00e7ok daha zengin ve i\u015flevsel deneyimler sunmaktad\u0131r. Bu etkile\u015fimin temelini ise Web API&#8217;leri (Uygulama Programlama Aray\u00fczleri) olu\u015fturur. Bir Web API&#8217;si, iki yaz\u0131l\u0131m sisteminin birbiriyle ileti\u015fim kurmas\u0131n\u0131 sa\u011flayan kurallar ve protokoller b\u00fct\u00fcn\u00fcd\u00fcr. Hava durumu bilgisi almak, \u00f6deme i\u015flemleri yapmak, sosyal medya verilerine eri\u015fmek veya bir harita servisini entegre etmek gibi bir\u00e7ok senaryoda API&#8217;ler devreye girer.<\/p>\n<p>PHP, \u00f6zellikle web geli\u015ftirme alan\u0131ndaki g\u00fc\u00e7l\u00fc konumu ve kolay \u00f6\u011frenilebilir yap\u0131s\u0131yla API entegrasyonlar\u0131 i\u00e7in pop\u00fcler bir tercihtir. PHP 8.0 ile birlikte gelen performans iyile\u015ftirmeleri, daha modern sentaks \u00f6zellikleri ve geli\u015ftirilmi\u015f hata y\u00f6netimi, API&#8217;lerle \u00e7al\u0131\u015fmay\u0131 her zamankinden daha verimli ve keyifli hale getirmi\u015ftir. Bu rehberde, PHP 8.0 kullanarak Web API&#8217;lerinden nas\u0131l veri alaca\u011f\u0131n\u0131z\u0131, veri g\u00f6nderece\u011finizi, yan\u0131tlar\u0131 nas\u0131l i\u015fleyece\u011finizi ve bu s\u00fcre\u00e7te dikkat etmeniz gereken en iyi uygulamalar\u0131 \u00f6\u011freneceksiniz.<\/p>\n<h2>Temel HTTP \u0130stekleri Yapmak<\/h2>\n<p>Bir Web API ile etkile\u015fim kurman\u0131n \u00f6z\u00fc, HTTP istekleri (GET, POST, PUT, DELETE vb.) g\u00f6ndermektir. PHP&#8217;de bu istekleri yapman\u0131n birka\u00e7 farkl\u0131 yolu vard\u0131r.<\/p>\n<h3>cURL Kullan\u0131m\u0131<\/h3>\n<p>cURL, PHP&#8217;nin en g\u00fc\u00e7l\u00fc ve esnek HTTP istemcisi k\u00fct\u00fcphanelerinden biridir. Neredeyse t\u00fcm HTTP istek t\u00fcrlerini ve geli\u015fmi\u015f se\u00e7enekleri (header y\u00f6netimi, kimlik do\u011frulama, \u00e7erezler, proxy vb.) destekler.<\/p>\n<h4>GET \u0130ste\u011fi \u00d6rne\u011fi<\/h4>\n<p>Bir API&#8217;den veri almak i\u00e7in genellikle GET iste\u011fi kullan\u0131l\u0131r. A\u015fa\u011f\u0131daki \u00f6rnek, herkese a\u00e7\u0131k bir API&#8217;den (\u00f6rne\u011fin, JSONPlaceholder) g\u00f6nderi listesi \u00e7ekmeyi g\u00f6stermektedir:<\/p>\n<pre><code class=\"language-php\"><?php\n\n$url = 'https:\/\/jsonplaceholder.typicode.com\/posts';\n\n\/\/ cURL oturumu ba\u015flat\n$ch = curl_init();\n\n\/\/ URL ayarla\ncurl_setopt($ch, CURLOPT_URL, $url);\n\n\/\/ Yan\u0131t\u0131 bir string olarak d\u00f6nd\u00fcrmeyi etkinle\u015ftir\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\/\/ SSL sertifika do\u011frulamay\u0131 kapat (sadece geli\u015ftirme ortam\u0131nda dikkatli kullan\u0131n!)\n\/\/ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); \n\/\/ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\n\/\/ \u0130stekleri y\u00fcr\u00fct ve yan\u0131t\u0131 al\n$response = curl_exec($ch);\n\n\/\/ Hata kontrol\u00fc\nif (curl_errno($ch)) {\n    $error_msg = curl_error($ch);\n    echo \"cURL hatas\u0131: \" . $error_msg;\n} else {\n    \/\/ Yan\u0131t\u0131 ekrana bas\n    echo \"API Yan\u0131t\u0131:\\n\";\n    echo $response;\n}\n\n\/\/ cURL oturumunu kapat\ncurl_close($ch);\n\n?><\/code><\/pre>\n<h4>POST \u0130ste\u011fi \u00d6rne\u011fi<\/h4>\n<p>Bir API&#8217;ye veri g\u00f6ndermek (yeni bir kaynak olu\u015fturmak) i\u00e7in POST iste\u011fi kullan\u0131l\u0131r.<\/p>\n<pre><code class=\"language-php\"><?php\n\n$url = 'https:\/\/jsonplaceholder.typicode.com\/posts';\n$data = [\n    'title' => 'Foo',\n    'body' => 'Bar',\n    'userId' => 1,\n];\n\n\/\/ cURL oturumu ba\u015flat\n$ch = curl_init();\n\n\/\/ URL ayarla\ncurl_setopt($ch, CURLOPT_URL, $url);\n\n\/\/ POST iste\u011fi oldu\u011funu belirt\ncurl_setopt($ch, CURLOPT_POST, true);\n\n\/\/ G\u00f6nderilecek veriyi JSON format\u0131na \u00e7evir\ncurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));\n\n\/\/ HTTP ba\u015fl\u0131klar\u0131n\u0131 ayarla (\u00f6zellikle Content-Type)\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Content-Type: application\/json',\n    'Content-Length: ' . strlen(json_encode($data))\n]);\n\n\/\/ Yan\u0131t\u0131 bir string olarak d\u00f6nd\u00fcrmeyi etkinle\u015ftir\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\/\/ \u0130stekleri y\u00fcr\u00fct ve yan\u0131t\u0131 al\n$response = curl_exec($ch);\n\n\/\/ Hata kontrol\u00fc\nif (curl_errno($ch)) {\n    $error_msg = curl_error($ch);\n    echo \"cURL hatas\u0131: \" . $error_msg;\n} else {\n    echo \"API Yan\u0131t\u0131:\\n\";\n    echo $response;\n}\n\n\/\/ cURL oturumunu kapat\ncurl_close($ch);\n\n?><\/code><\/pre>\n<h3>file_get_contents Kullan\u0131m\u0131 (Basit Durumlar \u0130\u00e7in)<\/h3>\n<p><code>file_get_contents()<\/code> fonksiyonu, uzak bir URL&#8217;den veri okumak i\u00e7in kullan\u0131labilir. Ancak, cURL kadar esnek de\u011fildir ve genellikle sadece basit GET istekleri i\u00e7in uygundur. POST gibi daha karma\u015f\u0131k istekler i\u00e7in <code>stream_context_create()<\/code> ile ek se\u00e7enekler belirtmek gerekir, bu da kodu daha az okunur hale getirebilir.<\/p>\n<pre><code class=\"language-php\"><?php\n\n$url = 'https:\/\/jsonplaceholder.typicode.com\/posts\/1';\n\n\/\/ Basit bir GET iste\u011fi\n$response = @file_get_contents($url); \/\/ Hatalar\u0131 bast\u0131rmak i\u00e7in @ kullan\u0131ld\u0131\n\nif ($response === false) {\n    echo \"API iste\u011fi ba\u015far\u0131s\u0131z oldu.\";\n} else {\n    echo \"API Yan\u0131t\u0131:\\n\";\n    echo $response;\n}\n\n?><\/code><\/pre>\n<h3>Guzzle HTTP \u0130stemcisi (\u00d6nerilen Y\u00f6ntem)<\/h3>\n<p>Profesyonel PHP projelerinde API entegrasyonu i\u00e7in en yayg\u0131n ve \u00f6nerilen y\u00f6ntemlerden biri Guzzle HTTP istemcisidir. PSR-7 uyumlu, modern, esnek ve bir\u00e7ok geli\u015fmi\u015f \u00f6zelli\u011fi (middleware, asenkron istekler, hata y\u00f6netimi vb.) kutudan \u00e7\u0131kt\u0131\u011f\u0131 gibi sunar.<\/p>\n<h4>Neden Guzzle?<\/h4>\n<p>*   <strong>Kolay Kullan\u0131m:<\/strong> Temiz ve sezgisel bir API sunar.<br \/>\n*   <strong>Esneklik:<\/strong> Her t\u00fcrl\u00fc HTTP iste\u011fini ve senaryoyu destekler.<br \/>\n*   <strong>Geli\u015fmi\u015f \u00d6zellikler:<\/strong> Zaman a\u015f\u0131m\u0131, yeniden deneme mekanizmalar\u0131, asenkron istekler, ara katman yaz\u0131l\u0131mlar\u0131 (middleware) gibi \u00f6zelliklere sahiptir.<br \/>\n*   <strong>Topluluk Deste\u011fi:<\/strong> Geni\u015f bir toplulu\u011fa ve iyi belgelere sahiptir.<\/p>\n<h4>Kurulum<\/h4>\n<p>Guzzle, Composer arac\u0131l\u0131\u011f\u0131yla kurulur:<\/p>\n<pre><code class=\"language-bash\">composer require guzzlehttp\/guzzle<\/code><\/pre>\n<h4>GET \u0130ste\u011fi \u00d6rne\u011fi (Guzzle)<\/h4>\n<pre><code class=\"language-php\"><?php\n\nrequire 'vendor\/autoload.php'; \/\/ Composer autoloader'\u0131 dahil et\n\nuse GuzzleHttp\\Client;\nuse GuzzleHttp\\Exception\\RequestException;\n\n$client = new Client();\n$url = 'https:\/\/jsonplaceholder.typicode.com\/posts\/1';\n\ntry {\n    $response = $client->request('GET', $url);\n\n    echo \"Status Kodu: \" . $response->getStatusCode() . \"\\n\"; \/\/ 200\n    echo \"API Yan\u0131t\u0131:\\n\";\n    echo $response->getBody(); \/\/ Yan\u0131t i\u00e7eri\u011fini string olarak al\n} catch (RequestException $e) {\n    echo \"API iste\u011fi ba\u015far\u0131s\u0131z oldu: \" . $e->getMessage() . \"\\n\";\n    if ($e->hasResponse()) {\n        echo \"Yan\u0131t Kodu: \" . $e->getResponse()->getStatusCode() . \"\\n\";\n        echo \"Yan\u0131t \u0130\u00e7eri\u011fi: \" . $e->getResponse()->getBody() . \"\\n\";\n    }\n}\n\n?><\/code><\/pre>\n<h4>POST \u0130ste\u011fi \u00d6rne\u011fi (Guzzle)<\/h4>\n<pre><code class=\"language-php\"><?php\n\nrequire 'vendor\/autoload.php';\n\nuse GuzzleHttp\\Client;\nuse GuzzleHttp\\Exception\\RequestException;\n\n$client = new Client();\n$url = 'https:\/\/jsonplaceholder.typicode.com\/posts';\n$data = [\n    'title' => 'Guzzle ile G\u00f6nderildi',\n    'body' => 'Bu bir Guzzle POST iste\u011fidir.',\n    'userId' => 1,\n];\n\ntry {\n    $response = $client->request('POST', $url, [\n        'json' => $data, \/\/ Guzzle, bu veriyi otomatik olarak JSON'a \u00e7evirir ve Content-Type ba\u015fl\u0131\u011f\u0131n\u0131 ayarlar\n    ]);\n\n    echo \"Status Kodu: \" . $response->getStatusCode() . \"\\n\"; \/\/ 201 Created\n    echo \"API Yan\u0131t\u0131:\\n\";\n    echo $response->getBody();\n} catch (RequestException $e) {\n    echo \"API iste\u011fi ba\u015far\u0131s\u0131z oldu: \" . $e->getMessage() . \"\\n\";\n    if ($e->hasResponse()) {\n        echo \"Yan\u0131t Kodu: \" . $e->getResponse()->getStatusCode() . \"\\n\";\n        echo \"Yan\u0131t \u0130\u00e7eri\u011fi: \" . $e->getResponse()->getBody() . \"\\n\";\n    }\n}\n\n?><\/code><\/pre>\n<h2>API Yan\u0131tlar\u0131n\u0131 \u0130\u015flemek<\/h2>\n<p>API&#8217;lerden gelen yan\u0131tlar genellikle JSON veya bazen XML format\u0131nda olur. Bu verileri PHP&#8217;de kullan\u0131labilir hale getirmek \u00f6nemlidir.<\/p>\n<h3>JSON Veri \u0130\u015fleme<\/h3>\n<p>JSON (JavaScript Object Notation), API&#8217;ler aras\u0131nda veri al\u0131\u015fveri\u015fi i\u00e7in en yayg\u0131n formatt\u0131r. PHP, JSON verilerini i\u015flemek i\u00e7in yerle\u015fik fonksiyonlara sahiptir.<\/p>\n<pre><code class=\"language-php\"><?php\n\n$jsonResponse = '{\n    \"id\": 1,\n    \"title\": \"sunt aut facere repellat provident occaecati excepturi optio reprehenderit\",\n    \"body\": \"quia et suscipit\\\\nsuscipit recusandae consequuntur expedita et cum\\\\nreprehenderit molestiae ut ut quas totam\\\\nnostrum rerum est autem sunt rem eveniet architecto\",\n    \"userId\": 1,\n    \"tags\": [\"web\", \"api\", \"php\"],\n    \"comments\": [\n        {\"id\": 101, \"text\": \"Harika yaz\u0131!\"},\n        {\"id\": 102, \"text\": \"\u00c7ok a\u00e7\u0131klay\u0131c\u0131.\"}\n    ]\n}';\n\n\/\/ JSON string'ini PHP nesnesine d\u00f6n\u00fc\u015ft\u00fcr\n$dataObject = json_decode($jsonResponse);\n\nif ($dataObject === null &#038;&#038; json_last_error() !== JSON_ERROR_NONE) {\n    echo \"JSON \u00e7\u00f6z\u00fcmlenirken hata olu\u015ftu: \" . json_last_error_msg();\n} else {\n    echo \"Ba\u015fl\u0131k: \" . $dataObject->title . \"\\n\";\n    echo \"V\u00fccut: \" . $dataObject->body . \"\\n\";\n    echo \"\u0130lk Yorum: \" . $dataObject->comments[0]->text . \"\\n\";\n    echo \"\u0130lk Etiket: \" . $dataObject->tags[0] . \"\\n\";\n}\n\necho \"\\n\";\n\n\/\/ JSON string'ini PHP ili\u015fkisel diziye d\u00f6n\u00fc\u015ft\u00fcr (true parametresi ile)\n$dataArray = json_decode($jsonResponse, true);\n\nif ($dataArray === null && json_last_error() !== JSON_ERROR_NONE) {\n    echo \"JSON \u00e7\u00f6z\u00fcmlenirken hata olu\u015ftu: \" . json_last_error_msg();\n} else {\n    echo \"Ba\u015fl\u0131k (dizi): \" . $dataArray['title'] . \"\\n\";\n    echo \"V\u00fccut (dizi): \" . $dataArray['body'] . \"\\n\";\n    echo \"\u0130lk Yorum (dizi): \" . $dataArray['comments'][0]['text'] . \"\\n\";\n    echo \"\u0130lk Etiket (dizi): \" . $dataArray['tags'][0] . \"\\n\";\n}\n\n?><\/code><\/pre>\n<p><code>json_decode()<\/code> fonksiyonunun ikinci parametresini <code>true<\/code> olarak ayarlamak, JSON objelerini PHP&#8217;de ili\u015fkisel dizilere d\u00f6n\u00fc\u015ft\u00fcr\u00fcr. Bu, verilere eri\u015fimi bazen daha esnek hale getirebilir. <code>json_last_error()<\/code> ve <code>json_last_error_msg()<\/code> fonksiyonlar\u0131, JSON i\u015fleme hatalar\u0131n\u0131 yakalamak i\u00e7in kritik \u00f6neme sahiptir.<\/p>\n<h3>XML Veri \u0130\u015fleme (K\u0131saca)<\/h3>\n<p>Baz\u0131 eski veya \u00f6zel API&#8217;ler hala XML format\u0131nda yan\u0131t verebilir. PHP&#8217;nin <code>SimpleXMLElement<\/code> s\u0131n\u0131f\u0131, XML verilerini nesne olarak i\u015flemek i\u00e7in kullan\u0131\u015fl\u0131d\u0131r.<\/p>\n<pre><code class=\"language-php\"><?php\n\n$xmlResponse = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bookstore>\n  <book category=\"cooking\">\n    <title lang=\"en\">Everyday Italian<\/title>\n    <author>Giada De Laurentiis<\/author>\n    <year>2005<\/year>\n    <price>30.00<\/price>\n  <\/book>\n  <book category=\"children\">\n    <title lang=\"en\">Harry Potter<\/title>\n    <author>J.K. Rowling<\/author>\n    <year>2005<\/year>\n    <price>29.99<\/price>\n  <\/book>\n<\/bookstore>';\n\ntry {\n    $xml = new SimpleXMLElement($xmlResponse);\n\n    echo \"\u0130lk Kitab\u0131n Ba\u015fl\u0131\u011f\u0131: \" . $xml->book[0]->title . \"\\n\";\n    echo \"\u0130kinci Kitab\u0131n Yazar\u0131: \" . $xml->book[1]->author . \"\\n\";\n    echo \"\u0130lk Kitab\u0131n Kategorisi: \" . $xml->book[0]->attributes()->category . \"\\n\";\n\n} catch (Exception $e) {\n    echo \"XML \u00e7\u00f6z\u00fcmlenirken hata olu\u015ftu: \" . $e->getMessage();\n}\n\n?><\/code><\/pre>\n<p>JSON&#8217;un daha hafif ve daha kolay \u00e7\u00f6z\u00fcmlenebilir olmas\u0131 nedeniyle g\u00fcn\u00fcm\u00fczde \u00e7o\u011fu API JSON&#8217;u tercih etmektedir.<\/p>\n<h2>Kimlik Do\u011frulama ve G\u00fcvenlik<\/h2>\n<p>Bir\u00e7ok API, kaynaklar\u0131na eri\u015fimi k\u0131s\u0131tlamak ve kullan\u0131c\u0131lar\u0131 yetkilendirmek i\u00e7in kimlik do\u011frulama gerektirir.<\/p>\n<h3>API Anahtarlar\u0131 (API Keys)<\/h3>\n<p>En basit kimlik do\u011frulama y\u00f6ntemidir. API anahtar\u0131, genellikle bir string&#8217;den olu\u015fan benzersiz bir tan\u0131mlay\u0131c\u0131d\u0131r ve istekle birlikte g\u00f6nderilir.<\/p>\n<h4>URL Parametresi Olarak<\/h4>\n<pre><code class=\"language-php\">\/\/ \u00d6rnek: API anahtar\u0131n\u0131 URL'ye ekleme\n$apiKey = 'YOUR_API_KEY';\n$url = \"https:\/\/api.example.com\/data?apiKey={$apiKey}&param=value\";\n\/\/ Guzzle veya cURL ile bu URL'ye istek yapabilirsiniz.<\/code><\/pre>\n<h4>HTTP Ba\u015fl\u0131\u011f\u0131 Olarak<\/h4>\n<p>Daha g\u00fcvenli bir y\u00f6ntemdir. Anahtar, <code>Authorization<\/code> veya \u00f6zel bir <code>X-API-Key<\/code> ba\u015fl\u0131\u011f\u0131 alt\u0131nda g\u00f6nderilir.<\/p>\n<pre><code class=\"language-php\">\/\/ cURL ile ba\u015fl\u0131k ekleme\ncurl_setopt($ch, CURLOPT_HTTPHEADER, [\n    'Authorization: Bearer YOUR_API_KEY', \/\/ veya 'X-API-Key: YOUR_API_KEY'\n    'Content-Type: application\/json'\n]);\n\n\/\/ Guzzle ile ba\u015fl\u0131k ekleme\n$response = $client->request('GET', $url, [\n    'headers' => [\n        'Authorization' => 'Bearer YOUR_API_KEY',\n        \/\/ 'X-API-Key' => 'YOUR_API_KEY',\n    ]\n]);<\/code><\/pre>\n<h3>OAuth 2.0 (K\u0131saca)<\/h3>\n<p>OAuth 2.0, API&#8217;lere g\u00fcvenli ve yetkilendirilmi\u015f eri\u015fim sa\u011flamak i\u00e7in kullan\u0131lan bir yetkilendirme \u00e7er\u00e7evesidir. Kullan\u0131c\u0131lar\u0131n kendi kimlik bilgilerini payla\u015fmadan \u00fc\u00e7\u00fcnc\u00fc taraf uygulamalar\u0131n belirli kaynaklara eri\u015fmesine izin verir. Uygulaman\u0131z\u0131n bir kullan\u0131c\u0131n\u0131n Google Drive&#8217;\u0131na veya Twitter hesab\u0131na eri\u015fmesi gerekti\u011finde kullan\u0131l\u0131r. Olduk\u00e7a karma\u015f\u0131k bir konudur ve genellikle \u00f6zel k\u00fct\u00fcphaneler (\u00f6rne\u011fin <code>league\/oauth2-client<\/code>) gerektirir.<\/p>\n<h3>G\u00fcvenli \u0130stekler (HTTPS)<\/h3>\n<p>API isteklerinizi her zaman HTTPS \u00fczerinden yapmal\u0131s\u0131n\u0131z. HTTPS, istemci ile sunucu aras\u0131ndaki ileti\u015fimi \u015fifreleyerek verilerin \u00fc\u00e7\u00fcnc\u00fc taraflarca okunmas\u0131n\u0131 veya de\u011fi\u015ftirilmesini engeller. Modern HTTP istemcileri (cURL, Guzzle) varsay\u0131lan olarak HTTPS&#8217;i destekler ve sertifika do\u011frulamas\u0131 yapar. Geli\u015ftirme ortam\u0131nda bile olsa, <code>CURLOPT_SSL_VERIFYPEER<\/code> ve <code>CURLOPT_SSL_VERIFYHOST<\/code> gibi se\u00e7enekleri kapatmaktan ka\u00e7\u0131n\u0131n.<\/p>\n<h2>Hata Y\u00f6netimi ve En \u0130yi Uygulamalar<\/h2>\n<p>API entegrasyonlar\u0131 s\u0131ras\u0131nda hatalar ka\u00e7\u0131n\u0131lmazd\u0131r. Sa\u011flam bir hata y\u00f6netimi ve iyi uygulamalar, uygulaman\u0131z\u0131n g\u00fcvenilirli\u011fini art\u0131r\u0131r.<\/p>\n<h3>API Yan\u0131t Kodlar\u0131<\/h3>\n<p>HTTP durum kodlar\u0131, bir API iste\u011finin sonucunu g\u00f6sterir:<br \/>\n*   <strong>2xx (Ba\u015far\u0131l\u0131):<\/strong> \u0130stek ba\u015far\u0131yla al\u0131nd\u0131, anla\u015f\u0131ld\u0131 ve kabul edildi (\u00f6rn. 200 OK, 201 Created).<br \/>\n*   <strong>4xx (\u0130stemci Hatas\u0131):<\/strong> \u0130stekte bir sorun var (\u00f6rn. 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests).<br \/>\n*   <strong>5xx (Sunucu Hatas\u0131):<\/strong> Sunucu iste\u011fi i\u015flerken bir sorunla kar\u015f\u0131la\u015ft\u0131 (\u00f6rn. 500 Internal Server Error, 503 Service Unavailable).<\/p>\n<p>Her API iste\u011finden sonra yan\u0131t kodunu kontrol etmek ve buna g\u00f6re i\u015flem yapmak \u00f6nemlidir.<\/p>\n<pre><code class=\"language-php\">\/\/ Guzzle \u00f6rne\u011fi \u00fczerinden\ntry {\n    $response = $client->request('GET', $url);\n    $statusCode = $response->getStatusCode();\n\n    if ($statusCode >= 200 && $statusCode < 300) {\n        \/\/ Ba\u015far\u0131l\u0131 yan\u0131t\u0131 i\u015fle\n        echo \"\u0130stek Ba\u015far\u0131l\u0131! Durum Kodu: \" . $statusCode . \"\\n\";\n    } else {\n        \/\/ Hatal\u0131 yan\u0131t\u0131 i\u015fle (Guzzle zaten 4xx\/5xx i\u00e7in exception f\u0131rlat\u0131r)\n        echo \"API hatas\u0131! Durum Kodu: \" . $statusCode . \"\\n\";\n    }\n} catch (RequestException $e) {\n    \/\/ A\u011f hatalar\u0131 veya 4xx\/5xx durumlar\u0131 burada yakalan\u0131r\n    echo \"API iste\u011fi s\u0131ras\u0131nda bir hata olu\u015ftu: \" . $e->getMessage() . \"\\n\";\n    if ($e->hasResponse()) {\n        echo \"Yan\u0131t Kodu: \" . $e->getResponse()->getStatusCode() . \"\\n\";\n        echo \"Yan\u0131t \u0130\u00e7eri\u011fi: \" . $e->getResponse()->getBody() . \"\\n\";\n    }\n}<\/code><\/pre>\n<h3>Zaman A\u015f\u0131m\u0131 ve Tekrar Deneme Mekanizmalar\u0131<\/h3>\n<p>API&#8217;ler bazen yava\u015f yan\u0131t verebilir veya ge\u00e7ici olarak kullan\u0131lamaz hale gelebilir.<br \/>\n*   <strong>Zaman A\u015f\u0131m\u0131 (Timeout):<\/strong> \u0130steklerin belirli bir s\u00fcre i\u00e7inde yan\u0131t vermemesi durumunda sonland\u0131r\u0131lmas\u0131n\u0131 sa\u011flar. Bu, uygulaman\u0131z\u0131n sonsuza kadar beklemesini \u00f6nler.<br \/>\n    *   <strong>cURL:<\/strong> <code>CURLOPT_TIMEOUT<\/code> (toplam s\u00fcre), <code>CURLOPT_CONNECTTIMEOUT<\/code> (ba\u011flant\u0131 s\u00fcresi)<br \/>\n    *   <strong>Guzzle:<\/strong> <code>timeout<\/code> ve <code>connect_timeout<\/code> se\u00e7enekleri<br \/>\n*   <strong>Tekrar Deneme (Retry):<\/strong> Ge\u00e7ici hatalar (\u00f6rn. 503 Service Unavailable veya a\u011f sorunlar\u0131) durumunda iste\u011fi otomatik olarak birka\u00e7 kez daha denemek, uygulaman\u0131n dayan\u0131kl\u0131l\u0131\u011f\u0131n\u0131 art\u0131r\u0131r. Guzzle gibi k\u00fct\u00fcphaneler, middleware&#8217;ler arac\u0131l\u0131\u011f\u0131yla bu t\u00fcr mekanizmalar\u0131 kolayca uygulaman\u0131za olanak tan\u0131r (\u00f6rn. <code>guzzlehttp\/retry-middleware<\/code>).<\/p>\n<h3>Veri Do\u011frulama ve G\u00fcvenlik<\/h3>\n<p>*   <strong>\u0130stek Verilerini Do\u011frulama:<\/strong> API&#8217;ye g\u00f6ndermeden \u00f6nce t\u00fcm giri\u015f verilerini do\u011frulay\u0131n ve temizleyin. Bu, SQL enjeksiyonu, XSS gibi g\u00fcvenlik a\u00e7\u0131klar\u0131n\u0131 \u00f6nler ve API&#8217;nin bekledi\u011fi format\u0131 garanti eder.<br \/>\n*   <strong>Yan\u0131t Verilerini Do\u011frulama:<\/strong> API&#8217;den gelen yan\u0131t\u0131n bekledi\u011finiz formatta ve i\u00e7erikte olup olmad\u0131\u011f\u0131n\u0131 do\u011frulay\u0131n. \u00d6rne\u011fin, <code>json_decode()<\/code> sonras\u0131 <code>null<\/code> kontrol\u00fc yapmak veya gerekli alanlar\u0131n mevcut olup olmad\u0131\u011f\u0131n\u0131 kontrol etmek.<br \/>\n*   <strong>API Anahtarlar\u0131n\u0131 G\u00fcvenli Tutma:<\/strong> API anahtarlar\u0131n\u0131z\u0131 asla do\u011frudan kodunuzda veya s\u00fcr\u00fcm kontrol sisteminde (Git vb.) saklamay\u0131n. Bunun yerine, <code>.env<\/code> dosyalar\u0131 veya sunucu ortam de\u011fi\u015fkenleri gibi g\u00fcvenli konfig\u00fcrasyon y\u00f6ntemlerini kullan\u0131n. <code>vlucas\/phpdotenv<\/code> gibi Composer paketleri, <code>.env<\/code> dosyalar\u0131n\u0131 kolayca y\u00f6netmenizi sa\u011flar.<\/p>\n<pre><code class=\"language-php\">\/\/ .env dosyas\u0131nda\n\/\/ API_KEY=\"your_secret_api_key_here\"\n\n\/\/ PHP kodunda\nrequire 'vendor\/autoload.php';\n$dotenv = Dotenv\\Dotenv::createImmutable(__DIR__);\n$dotenv->load();\n\n$apiKey = $_ENV['API_KEY']; \/\/ API_KEY'i ortam de\u011fi\u015fkeninden al<\/code><\/pre>\n<h2>Sonu\u00e7 ve S\u0131k\u00e7a Sorulan Sorular (SSS)<\/h2>\n<p>PHP 8.0 ile Web API&#8217;leri kullanmak, modern web uygulamalar\u0131 geli\u015ftirmenin vazge\u00e7ilmez bir par\u00e7as\u0131d\u0131r. cURL, <code>file_get_contents<\/code> gibi yerle\u015fik ara\u00e7lar ba\u015flang\u0131\u00e7 i\u00e7in yeterli olsa da, Guzzle gibi profesyonel HTTP istemcileri, geli\u015fmi\u015f \u00f6zellikler ve daha iyi hata y\u00f6netimi ile karma\u015f\u0131k entegrasyonlar i\u00e7in en iyi se\u00e7enektir. Yan\u0131tlar\u0131 do\u011fru \u015fekilde i\u015flemek, kimlik do\u011frulama mekanizmalar\u0131n\u0131 anlamak ve g\u00fcvenlik en iyi uygulamalar\u0131n\u0131 takip etmek, uygulamalar\u0131n\u0131z\u0131n hem i\u015flevsel hem de g\u00fcvenli olmas\u0131n\u0131 sa\u011flar.<\/p>\n<p>Bu rehber, PHP&#8217;de API entegrasyonlar\u0131n\u0131n temel ta\u015flar\u0131n\u0131 atm\u0131\u015ft\u0131r. Bundan sonraki ad\u0131mlar\u0131n\u0131z, entegre etmek istedi\u011finiz spesifik API&#8217;lerin belgelerini dikkatlice okumak, farkl\u0131 HTTP metodlar\u0131n\u0131 (PUT, DELETE) denemek ve daha karma\u015f\u0131k senaryolar (webhook&#8217;lar, asenkron i\u015flemler) \u00fczerinde \u00e7al\u0131\u015fmak olacakt\u0131r.<\/p>\n<h3>S\u0131k\u00e7a Sorulan Sorular (SSS)<\/h3>\n<h3>API istekleri neden ba\u015far\u0131s\u0131z olur?<\/h3>\n<p>Bir\u00e7ok nedeni olabilir: yanl\u0131\u015f URL, ge\u00e7ersiz API anahtar\u0131\/kimlik bilgileri, API&#8217;nin bekledi\u011fi formatta olmayan istek verileri, a\u011f sorunlar\u0131, API sunucusunun kapal\u0131 olmas\u0131, zaman a\u015f\u0131m\u0131 veya API&#8217;nin &#8220;rate limit&#8221; (istek s\u0131n\u0131rlamas\u0131) uygulamas\u0131.<\/p>\n<h3>API anahtarlar\u0131m\u0131 nas\u0131l g\u00fcvende tutar\u0131m?<\/h3>\n<p>API anahtarlar\u0131n\u0131z\u0131 do\u011frudan kodda veya Git deposunda saklamay\u0131n. Bunun yerine, sunucu ortam de\u011fi\u015fkenleri, <code>.env<\/code> dosyalar\u0131 (vlucas\/phpdotenv gibi k\u00fct\u00fcphanelerle) veya sunucunuzun g\u00fcvenli bir anahtar deposunu kullan\u0131n. Bu sayede anahtarlar\u0131n\u0131z koddan ayr\u0131 tutulur ve hassas bilgiler if\u015fa olmaz.<\/p>\n<h3>Hangi HTTP istemcisini kullanmal\u0131y\u0131m?<\/h3>\n<p>Basit ve tek seferlik GET istekleri i\u00e7in <code>file_get_contents()<\/code> kullan\u0131labilir. Ancak, daha fazla kontrol, hata y\u00f6netimi, POST\/PUT\/DELETE istekleri ve genel esneklik i\u00e7in cURL veya Guzzle tercih edilmelidir. Profesyonel ve b\u00fcy\u00fck projelerde Guzzle, modern PHP standartlar\u0131na uygunlu\u011fu ve sundu\u011fu geli\u015fmi\u015f \u00f6zellikler nedeniyle \u015fiddetle tavsiye edilir.<\/p>\n<h3>Rate limiting nedir ve nas\u0131l ba\u015fa \u00e7\u0131kar\u0131m?<\/h3>\n<p>Rate limiting (istek s\u0131n\u0131rlamas\u0131), bir API&#8217;nin belirli bir zaman diliminde yapabilece\u011finiz istek say\u0131s\u0131n\u0131 k\u0131s\u0131tlamas\u0131d\u0131r. Bu, API sunucusunun a\u015f\u0131r\u0131 y\u00fcklenmesini \u00f6nler. S\u0131n\u0131rlamalara tak\u0131lmamak i\u00e7in:<\/p>\n<ul>\n<li>API&#8217;nin belgelerini okuyarak limitleri \u00f6\u011frenin.<\/li>\n<li>\u0130stekler aras\u0131nda gecikme ekleyin (sleep()).<\/li>\n<li>\u0130stekleri kuyru\u011fa al\u0131n ve s\u0131rayla i\u015fleyin.<\/li>\n<li>429 Too Many Requests yan\u0131t\u0131 ald\u0131\u011f\u0131n\u0131zda, iste\u011fi &#8220;Exponential Backoff&#8221; stratejisiyle (artarak artan bekleme s\u00fcresiyle) tekrar deneyin.<\/li>\n<\/ul>\n<h3>Asenkron API istekleri yapabilir miyim?<\/h3>\n<p>Evet, Guzzle gibi k\u00fct\u00fcphaneler asenkron istekleri destekler. Bu, birden fazla API iste\u011fini paralel olarak g\u00f6nderip yan\u0131tlar\u0131 beklerken uygulaman\u0131z\u0131n ba\u015fka i\u015fler yapmaya devam etmesini sa\u011flar. \u00d6zellikle y\u00fcksek performans gerektiren uygulamalarda veya birden \u00e7ok ba\u011f\u0131ms\u0131z API&#8217;den veri \u00e7ekerken faydal\u0131d\u0131r.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"Giri\u015f: Web API&#8217;leri ve PHP&#8217;nin G\u00fcc\u00fc\nG\u00fcn\u00fcm\u00fcz web uygulamalar\u0131, sadece kendi veritabanlar\u0131yla s\u0131n\u0131rl\u0131 kalmay\u0131p, farkl\u0131 servislerle etkil","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[133],"tags":[],"class_list":{"0":"post-33492","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-php","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Giri\u015f: Web API&#039;leri ve PHP&#039;nin G\u00fcc\u00fc - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Giri\u015f: Web API&#039;leri ve PHP&#039;nin G\u00fcc\u00fc\" \/>\n<meta property=\"og:description\" content=\"Giri\u015f: Web API&#039;leri ve PHP&#039;nin G\u00fcc\u00fc G\u00fcn\u00fcm\u00fcz web uygulamalar\u0131, sadece kendi veritabanlar\u0131yla s\u0131n\u0131rl\u0131 kalmay\u0131p, farkl\u0131 servislerle etkil\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-03T11:42:30+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"Giri\u015f: Web API&#8217;leri ve PHP&#8217;nin G\u00fcc\u00fc\",\"datePublished\":\"2025-11-03T11:42:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/\"},\"wordCount\":1688,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"PHP\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/\",\"name\":\"Giri\u015f: Web API'leri ve PHP'nin G\u00fcc\u00fc - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-11-03T11:42:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Giri\u015f: Web API&#8217;leri ve PHP&#8217;nin G\u00fcc\u00fc\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Giri\u015f: Web API'leri ve PHP'nin G\u00fcc\u00fc - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/","og_locale":"tr_TR","og_type":"article","og_title":"Giri\u015f: Web API'leri ve PHP'nin G\u00fcc\u00fc","og_description":"Giri\u015f: Web API'leri ve PHP'nin G\u00fcc\u00fc G\u00fcn\u00fcm\u00fcz web uygulamalar\u0131, sadece kendi veritabanlar\u0131yla s\u0131n\u0131rl\u0131 kalmay\u0131p, farkl\u0131 servislerle etkil","og_url":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-11-03T11:42:30+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"9 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"Giri\u015f: Web API&#8217;leri ve PHP&#8217;nin G\u00fcc\u00fc","datePublished":"2025-11-03T11:42:30+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/"},"wordCount":1688,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["PHP"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/","url":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/","name":"Giri\u015f: Web API'leri ve PHP'nin G\u00fcc\u00fc - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-11-03T11:42:30+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/giris-web-apileri-ve-phpnin-gucu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Giri\u015f: Web API&#8217;leri ve PHP&#8217;nin G\u00fcc\u00fc"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/33492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=33492"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/33492\/revisions"}],"predecessor-version":[{"id":33493,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/33492\/revisions\/33493"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=33492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=33492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=33492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}