slide1
Slide 2

Online öğretmenlerle her derste ustalaşın.

Prepare için achieve sizin goals anytime, anywhere.

What Ders Siz Want için Öğren?

English
English 5 Öğretmenler
Biology
Biology 3 Öğretmenler
Accounts
Accounts 5 Öğretmenler
Physics
Physics 3 Öğretmenler
Arts
Arts 0 Öğretmenler
Geography
Geography 4 Öğretmenler
Chemistry
Chemistry 4 Öğretmenler
Politics
Politics 3 Öğretmenler

için Explore Other Dersler Şimdi görüntüle

Browse our top rated popular eğitmenler

Lydia Deckow

13 Öğrenciler 42 Sessions
India
4.33 (6)

Ariel Bednar

2 Öğrenciler 3 Sessions
Egypt
4.00 (1)

Dwight Vandervort

7 Öğrenciler 18 Sessions
United States of America
3.80 (5)

Marlene Reilly

16 Öğrenciler 45 Sessions
United Kingdom
3.50 (2)

Ezequiel Heaney

6 Öğrenciler 14 Sessions
United Arab Emirates
3.33 (3)

Pascale Baumbach

4 Öğrenciler 15 Sessions
United Kingdom
3.00 (2)

Mustafa Dicki

1 Öğrenciler 2 Sessions
United Arab Emirates
3.00 (1)

Brandt Jacobs

2 Öğrenciler 6 Sessions
United States of America
3.00 (1)

Learn any Subject with the help of professional teachers

Brwse Teacherso Brwse Teacherso  <!doctype html>
<html lang="tr">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width,initial-scale=1" />
  <title>e-kurs AI Deneme</title>
</head>
<body style="font-family:Arial,sans-serif">
  <div style="max-width:720px;margin:24px auto;border:1px solid #ddd;border-radius:12px;padding:16px">
    <h2 style="margin:0 0 10px 0">e-kurs AI Deneme</h2>

    <div id="chat" style="height:320px;overflow:auto;border:1px solid #eee;border-radius:10px;padding:12px;background:#fafafa"></div>

    <div style="display:flex;gap:8px;margin-top:10px">
      <input id="input" type="text" placeholder="Sorunu yaz..." style="flex:1;padding:10px;border:1px solid #ddd;border-radius:10px" />
      <button id="send" style="padding:10px 14px;border:0;border-radius:10px;cursor:pointer">Gönder</button>
    </div>

    <p style="margin:10px 0 0 0;color:#666;font-size:12px">
      Endpoint: <code>/api/ai.php</code>
    </p>
  </div>

<script>
const chat = document.getElementById("chat");
const input = document.getElementById("input");
const sendBtn = document.getElementById("send");

function add(role, text){
  const d = document.createElement("div");
  d.style.margin = "8px 0";
  d.innerHTML = `<b>${role}:</b> ${escapeHtml(text)}`;
  chat.appendChild(d);
  chat.scrollTop = chat.scrollHeight;
}
function escapeHtml(s){
  return String(s).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")
    .replaceAll('"',"&quot;").replaceAll("'","&#039;");
}

async function send(){
  const prompt = input.value.trim();
  if(!prompt) return;
  input.value = "";
  add("Sen", prompt);
  add("AI", "Yazıyor...");

  try{
    const res = await fetch("/api/ai.php", {
      method:"POST",
      headers: {"Content-Type":"application/json"},
      body: JSON.stringify({prompt})
    });
    const data = await res.json();
    chat.removeChild(chat.lastChild);

    if(!res.ok){
      add("AI", "Hata: " + (data.error || "Bilinmeyen hata"));
      return;
    }
    add("AI", data.answer || "Cevap boş geldi.");
  }catch(e){
    chat.removeChild(chat.lastChild);
    add("AI", "Bağlantı hatası: " + e.message);
  }
}

sendBtn.onclick = send;
input.addEventListener("keydown", e => { if(e.key === "Enter") send(); });
</script>
</body>
</html>

  1.  public_html/ai-deneme/index.html

  2.  
  3. <?php
    // public_html/api/ai.php
    header('Content-Type: application/json; charset=utf-8');
    header('Access-Control-Allow-Origin: *');
    header('Access-Control-Allow-Headers: Content-Type');
    header('Access-Control-Allow-Methods: POST, OPTIONS');

    if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { exit; }

    $body = json_decode(file_get_contents('php://input'), true);
    $prompt = trim($body['prompt'] ?? '');

    if ($prompt === '') {
      http_response_code(400);
      echo json_encode(['error' => 'prompt boş']);
      exit;
    }

    // 1) En güvenlisi: API key’i public_html DIŞINDA tutmak
    // cPanel’de home dizinine (public_html dışı) "openai_key.txt" koyacağız.
    $keyFile = dirname(__DIR__) . '/openai_key.txt'; // /home/USER/openai_key.txt gibi

    if (!file_exists($keyFile)) {
      http_response_code(500);
      echo json_encode(['error' => 'openai_key.txt bulunamadı (public_html dışında olmalı)']);
      exit;
    }

    $apiKey = trim(file_get_contents($keyFile));
    if ($apiKey === '') {
      http_response_code(500);
      echo json_encode(['error' => 'API key boş']);
      exit;
    }

    $payload = json_encode([
      'model' => 'gpt-4.1-mini',
      'input' => [
        ['role' => 'system', 'content' => 'Sen e-kurs.com için yardımcı bir eğitim asistanısın. Kısa ve net cevap ver.'],
        ['role' => 'user', 'content' => mb_substr($prompt, 0, 4000)]
      ]
    ]);

    $ch = curl_init('https://api.openai.com/v1/responses');
    curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_POST => true,
      CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json'
      ],
      CURLOPT_POSTFIELDS => $payload
    ]);

    $response = curl_exec($ch);
    $http = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    $err  = curl_error($ch);
    curl_close($ch);

    if ($response === false) {
      http_response_code(500);
      echo json_encode(['error' => 'cURL hata: ' . $err]);
      exit;
    }

    $data = json_decode($response, true);

    if ($http < 200 || $http >= 300) {
      http_response_code(500);
      $msg = $data['error']['message'] ?? ('OpenAI hatası. HTTP: ' . $http);
      echo json_encode(['error' => $msg]);
      exit;
    }

    $answer = $data['output_text'] ?? 'Cevap alınamadı.';
    echo json_encode(['answer' => $answer]);

  4. public_html içine şu klasörleri aç:
    • api

    • ai-deneme (istersen) 

 
 
 
 
 
 
 
 
 

Sonuç:

  • public_html/api/

  • public_html/ai-deneme/

Öğrenmeyi Kolay ve Basit Hale Getiriyoruz

Profesyonel Özel Ders Öğretmenleri

Profesyonel Özel Ders Öğretmenleri

Çok sayıda profesyonel ve deneyimli öğretmen arasından dilediğiniz konuyu seçerek eğitim alabilirsiniz.

Birebir Canlı Seanslar

Birebir Canlı Seanslar

Öğretmenlerinizle bire bir canlı sohbet oturumları aracılığıyla bağlantı kurun ve bir konu hakkındaki anlayışınızı derinleştirin.

Grup Dersleri

Grup Dersleri

Grup dersleri sayesinde motive olun, coşkunuzu artırın ve sosyal etkileşim becerilerinizi geliştirin.<div style="max-width:600px;margin:30px auto;padding:20px;border:1px solid #ddd;border-radius:12px">

<h3>e-kurs AI Test</h3>


<div id="chat" style="height:250px;overflow:auto;border:1px solid #eee;padding:10px;margin-bottom:10px"></div>


<input id="input" type="text" placeholder="Bir şey yaz..." style="width:70%;padding:8px">

<button onclick="send()">Gönder</button>

</div>


<script>

function send(){

  var text = document.getElementById("input").value;

  var chat = document.getElementById("chat");

  chat.innerHTML += "<p><b>Sen:</b> "+text+"</p>";

  chat.innerHTML += "<p><b>AI:</b> Bu sadece test mesajıdır.</p>";

}

</script>


 



Sophia

Yo!coach is perfect for people who have little time, not enough to pay for a private tutor & especially those who like the idea of talking with people from around the world.

Sophia

 export OPENAI_API_KEY="BURAYA_KEY"
node server.js

 
 
 
// sunucu.js (Ekspres örneği)
"express"ten express'i içe aktar;

const app = express();
uygulama.use(express.json());

app.post("/api/ai", async (req, res) => {
  denemek {
    const prompt = String(req.body?.prompt || "").slice(0, 4000);
    Eğer (!prompt) yoksa, res.status(400).json({ error: "prompt boş" }) döndürün.

    const r = await fetch("https://api.openai.com/v1/responses", {
      yöntem: "POST",
      başlıklar: {
        "Yetkilendirme": `Bearer ${process.env.OPENAI_API_KEY}`,
        "Content-Type": "application/json"
      },
      gövde: JSON.stringify({
        model: "gpt-4.1-mini",
        girdi: [
          { role: "system", content: "Sen e-kurs.com için bir eğitim katılımının yardımcı olması. Kısa ve net cevap ver." },
          { rol: "kullanıcı", içerik: istem }
        ]
      })
    });

    const data = await r.json();

    eğer (!r.ok) {
      return res.status(500).json({ error: data?.error?.message || "OpenAI hatası" });
    }

    // Responses API metin çekme (basit yöntemi)
    sabit cevap =
      veri.çıktı_metni ||
      veri?.çıktı?.[0]?.içerik?.[0]?.metin ||
      "Cevap alınamadı.";

    res.json({ cevap });
  } hata yakala {
    res.status(500).json({ error: err.message });
  }
});

app.listen(3000, () => console.log("Sunucu http://localhost:3000 adresinde çalışıyor"));

 
 
 
 <div style="max-width:720px;margin:24px auto;font-family:Arial,sans-serif;border:1px solid #ddd;border-radius:12px;padding:16px">
  <h2 style="margin:0 0 10px 0">e-kurs AI Deneme</h2>

  <div id="ekursChat" style="height:320px;overflow:auto;border:1px solid #eee;border-radius:10px;padding:12px;background:#fafafa"></div>

  <div style="display:flex;gap:8px;margin-top:10px">
    <input id="ekursInput" type="text" placeholder="Sorunu yaz..." style="flex:1;padding:10px;border:1px solid #ddd;border-radius:10px" />
    <button id="ekursSend" style="padding:10px 14px;border:0;border-radius:10px;cursor:pointer">Gönder</button>
  </div>

  <p style="margin:10px 0 0 0;color:#666;font-size:12px">
    Not: Bu demo, /api/ai endpoint'ine istek atar.
  </p>
</div>

<script>
  const chat = document.getElementById("ekursChat");
  const input = document.getElementById("ekursInput");
  const sendBtn = document.getElementById("ekursSend");

  fonksiyon addMsg(rol, metin) {
    const box = document.createElement("div");
    kutu.stil.kenar yaşayanlar = "8px 0";
    box.innerHTML = `<b>${role === "user" ? "Sen" : "AI"}:</b> ${escapeHtml(text)}`;
    chat.appendChild(box);
    chat.scrollTop = chat.scrollHeight;
  }

  fonksiyon escapeHtml(str){
    Dize(str)
      .replaceAll("&","&")
      .replaceAll("<","</")
      .replaceAll(">",">")
      .replaceAll('"',""")
      .replaceAll("'","');
  }

  asenkron fonksiyon gönder() {
    const prompt = input.value.trim();
    Eğer (!prompt) geri dön;
    giriş.değeri = "";
    addMsg("user", prompt);
    addMsg("asistan", "Yazıyor...");

    {
      const res = await fetch("/api/ai", {
        yöntem: "POST",
        başlıklar: {"Content-Type":"application/json"},
        gövde: JSON.stringify({ prompt })
      });

      const data = await res.json();
      // "Yazıyor..." mesajını sil
      chat.removeChild(chat.lastChild);

      eğer (!res.ok) {
        addMsg("asistan", "Hata: " + (data.error || "Bilinmeyen hata"));
        geri dön;
      }

      addMsg("asistan", data.answer || "Cevap boş geldi.");
    } yakala (e) {
      chat.removeChild(chat.lastChild);
      addMsg("asistan", "Bağlantı hatası: " + e.message);
    }
  }

  sendBtn.addEventListener("click", send);
  input.addEventListener("keydown", (e) => {
    if (e.key === "Enter") send();
  });
</script>

 
 
 
 
 
Yo!Coach ile nasıl başlarsınız?
Yüzlerce en iyi öğretmen aralarında arama yapın.

En iyi korumalı öğretmenler arasında arama yapın.

Fiyat, dil, yeterlilik düzeyi, konu ve konum gibi filtreleri kullanarak tercih ettiğiniz öğretmeni arayabilirsiniz.

Size en uygun öğretmenle ders adını verin.

Öğretmenin profilini inceledikten ve ödemeyi belirledikten sonra derslerinizi bildirdiniz.

 

Öğrenmeye başlamak için giriş yapın.

Çevrimiçi gruplara katılın ve birleşmeye başlayın.

Latest Blogs

Tüm Görüntüle
Online Private Coaching Business: Trends, Business Model and Key Features
Health Wellness Coaching

Online Private Coaching Business: Trends, Business Model and Key Features

May 18, 2024
Blog Görüntüle
How to Start an Online Fitness Coaching Platform: A Detailed Guide
Health Wellness Coaching

How to Start an Online Fitness Coaching Platform: A Detailed Guide

May 18, 2024
Blog Görüntüle
How to Start An Online Coaching Business?
Health Wellness Coaching

How to Start An Online Coaching Business?

May 18, 2024
Blog Görüntüle
How to Launch Online Coaching and Mentoring Platform
Health Wellness Coaching

How to Launch Online Coaching and Mentoring Platform

May 18, 2024
Blog Görüntüle