fork download
  1. <?php
  2. // بيانات تسجيل الدخول
  3. $username = 'your_username';
  4. $password = 'your_password';
  5. $login_url = 'https://e...content-available-to-author-only...e.com/login';
  6.  
  7. // تهيئة cURL
  8. $ch = curl_init();
  9.  
  10. // تعيين خيارات cURL
  11. curl_setopt($ch, CURLOPT_URL, $login_url);
  12. curl_setopt($ch, CURLOPT_POST, true);
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  14. 'username' => $username,
  15. 'password' => $password
  16. ]));
  17. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  18. curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); // لحفظ الكوكيز
  19. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  20.  
  21. // تنفيذ الطلب
  22. $response = curl_exec($ch);
  23.  
  24. // التحقق من وجود أخطاء
  25. if (curl_errno($ch)) {
  26. echo 'Error:' . curl_error($ch);
  27. } else {
  28. // يمكنك هنا معالجة الاستجابة
  29. echo $response;
  30.  
  31. // إذا كنت تريد الوصول إلى صفحة بعد تسجيل الدخول
  32. curl_setopt($ch, CURLOPT_URL, 'https://e...content-available-to-author-only...e.com/dashboard');
  33. curl_setopt($ch, CURLOPT_POST, false);
  34. $dashboard_response = curl_exec($ch);
  35. echo $dashboard_response;
  36. }
  37.  
  38. // إغلاق الجلسة
  39. ?>
Success #stdin #stdout 0.04s 26340KB
stdin
Standard input is empty
stdout
Error:Could not resolve host: example.com