Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 140

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 196

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 198

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 246

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 252

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 268

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 274

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 290

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/otobustv/test.otobus.tv/api/metro-turizm-debug.php on line 296
Metro Turizm Debug Test

🚌 Metro Turizm Entegrasyon Debug Test

Bu araç Metro Turizm entegrasyonundaki sorunları tespit etmek için kullanılır.

📊 Veritabanı Bağlantı Testi

✅ Veritabanı bağlantısı başarılı
✅ Tablo 'otobus_takip_verileri' mevcut
✅ Tablo 'metro_turizm_api_log' mevcut
✅ Tablo 'metro_turizm_pnr_takip' mevcut

🔧 Metro Turizm Scraper Sınıf Testi

✅ MetroTurizmScraper sınıfı başarıyla yüklendi
Mevcut metodlar:
• __construct
• getOtobusKonum
• getSeferBilgileri
• getRealtimeData
• scrapePage
• getActiveBuses
• getBusesByRoute
• getActiveRoutes
• scrapeActiveBuses
• saveToDatabase

🌐 cURL Fonksiyon Testi

✅ cURL fonksiyonu mevcut
cURL Versiyonu: 7.76.1
SSL Versiyonu: OpenSSL/3.5.1
Desteklenen Protokoller: dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, ldap, ldaps, mqtt, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp

🌍 Metro Turizm Web Sitesi Erişim Testi

Ana Sayfa: https://www.metroturizm.com.tr
✅ Erişim başarılı (HTTP 200) - 808.17ms
Yanıt boyutu: 63376 byte
Yolcum Nerede: https://www.metroturizm.com.tr/yolcum-nerede
✅ Erişim başarılı (HTTP 200) - 767.92ms
Yanıt boyutu: 32451 byte
Canlı Takip: https://www.metroturizm.com.tr/canli-takip
❌ Erişim başarısız (HTTP 404)

🔌 API Endpoint Testleri

Sefer Bilgileri: /api/passenger/trip-info
⚠️ Endpoint yanıt verdi (HTTP 302) - 551.42ms
Content-Type: text/html; charset=utf-8
⚠️ JSON olmayan yanıt
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Home/PageNotFound?aspxerrorpath=/api/passenger/trip-info">here</a>.</h2>
</body></html>
Gerçek Zamanlı Veri: /api/realtime/bus-status
⚠️ Endpoint yanıt verdi (HTTP 302) - 590.72ms
Content-Type: text/html; charset=utf-8
⚠️ JSON olmayan yanıt
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Home/PageNotFound?aspxerrorpath=/api/realtime/bus-status">here</a>.</h2>
</body></html>
Otobüs Konumu: /api/tracking/bus-location
⚠️ Endpoint yanıt verdi (HTTP 302) - 154.2ms
Content-Type: text/html; charset=utf-8
⚠️ JSON olmayan yanıt
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Home/PageNotFound?aspxerrorpath=/api/tracking/bus-location">here</a>.</h2>
</body></html>
Aktif Otobüsler: /api/fleet/active-buses
⚠️ Endpoint yanıt verdi (HTTP 302) - 158.41ms
Content-Type: text/html; charset=utf-8
⚠️ JSON olmayan yanıt
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Home/PageNotFound?aspxerrorpath=/api/fleet/active-buses">here</a>.</h2>
</body></html>
Rota Otobüsleri: /api/fleet/route-buses
⚠️ Endpoint yanıt verdi (HTTP 302) - 610.96ms
Content-Type: text/html; charset=utf-8
⚠️ JSON olmayan yanıt
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Home/PageNotFound?aspxerrorpath=/api/fleet/route-buses">here</a>.</h2>
</body></html>
Aktif Rotalar: /api/routes/active
⚠️ Endpoint yanıt verdi (HTTP 302) - 601.76ms
Content-Type: text/html; charset=utf-8
⚠️ JSON olmayan yanıt
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Home/PageNotFound?aspxerrorpath=/api/routes/active">here</a>.</h2>
</body></html>

🧪 Scraper Metodları Test

getActiveBuses() Testi:
⚠️ Veri bulunamadı - 578.96ms
getActiveRoutes() Testi:
⚠️ Veri bulunamadı - 167.18ms
scrapeActiveBuses() Testi:
⚠️ Veri bulunamadı - 507.86ms

💾 Veritabanı Veri Kontrolü

Toplam Kayıt Sayısı: 0
⚠️ Veritabanında henüz veri bulunmuyor

💡 Sorun Giderme Önerileri

Metro Turizm Entegrasyonu İçin Öneriler:
  • API Endpoint'leri: Metro Turizm'in gerçek API endpoint'leri bu örneklerde tahmin edilmiştir. Gerçek endpoint'ler için Metro Turizm'in resmi dokümantasyonunu kontrol edin.
  • Rate Limiting: Çok sık istek göndermekten kaçının. İstekler arasında en az 1-2 saniye bekleyin.
  • User Agent: Gerçek bir tarayıcı User Agent'ı kullanın ve düzenli olarak güncelleyin.
  • Session Yönetimi: Bazı endpoint'ler oturum gerektiriyor olabilir. Cookie'leri saklayın ve yeniden kullanın.
  • Fallback Mekanizması: API çalışmadığında sayfa scraping'e geçin.
  • Hata Yönetimi: Tüm hataları logla ve uygun hata mesajları göster.
  • Veri Doğrulama: Gelen verileri doğrulayın ve temizleyin.
Yaygın Sorunlar ve Çözümleri:
  • HTTP 403/404 Hataları: Endpoint URL'lerini kontrol edin, User Agent ekleyin.
  • Boş Yanıtlar: İstek header'larını kontrol edin, CSRF token gerekebilir.
  • Timeout Hataları: Timeout süresini artırın (30-60 saniye).
  • SSL Hataları: CURLOPT_SSL_VERIFYPEER => false kullanın (sadece test için).
  • Encoding Sorunları: UTF-8 encoding'i doğru ayarlayın.

🧪 Hızlı Test Butonları