কম্পিউটার

পিএইচপি https://


পরিচয়

https:// এবং https:// wrappers HTTP প্রোকলের মাধ্যমে সম্পদ এবং ফাইলগুলিতে শুধুমাত্র পঠন অ্যাক্সেস সক্ষম করে। ভার্চুয়াল নাম-ভিত্তিক হোস্ট পরিচালনা করার সময়,হোস্ট: হেডারও user_agent-এর সাথে পাঠানো হয় (যদি php.ini এ কনফিগার করা থাকে)

http শিরোনাম তথ্য $http_response_header এ সংরক্ষণ করা হয় পরিবর্তনশীল এই শিরোনামগুলিকে সম্পদের URL জানার জন্য প্রক্রিয়া করতে হবে যেখান থেকে নথিটি আসেথেকে: হেডার।

HTTPS শুধুমাত্র যদি openssl সমর্থিত হয় php.ini সেটিংসে এক্সটেনশন সক্রিয় করা আছে। এইচটিটিপি এবং এইচটিটিপিএস উভয় সংযোগই কেবল পঠিত হয় এবং ফাইল লেখা বা অনুলিপি করা সমর্থন করে না।

ব্যবহার

বিভিন্ন সম্ভাব্য উপায়ে ফাইলের নামের প্রতিনিধিত্ব নিম্নরূপ -

https://localhost
https://example.com
https://localhost?name='Ram'&age=20
https://example.com
https://username:password@abc.com

উদাহরণ

<?php
$url = 'https://www.tutorialspoint.com/php7/php7_closure_call.htm';
if (!$fp = fopen($url, 'r')) {
   trigger_error("Unable to open URL ($url)", E_USER_ERROR);
}
$meta = stream_get_meta_data($fp);
print_r($meta);
?>

উপরের স্ক্রিপ্টটি http URL

থেকে হেডার মেটাডেটা পড়ে
Array(
   [crypto] => Array(
      [protocol] => TLSv1.2
      [cipher_name] => ECDHE-RSA-AES128-GCM-SHA256
      [cipher_bits] => 128
      [cipher_version] => TLSv1/SSLv3
   )

   [timed_out] =>
   [blocked] => 1
   [eof] =>
   [wrapper_data] => Array(
      [0] => HTTP/1.0 200 OK
      [1] => Age: 1310067
      [2] => Cache-Control: max-age=2592000
      [3] => Content-Type: text/html; charset=UTF-8
      [4] => Date: Mon, 14 Sep 2020 17:15:36 GMT
      [5] => Expires: Wed, 14 Oct 2020 17:15:36 GMT
      [6] => Last-Modified: Sun, 30 Aug 2020 13:21:09 GMT
      [7] => Server: ECS (nag/99AA)
      [8] => Strict-Transport-Security: max-age=63072000; includeSubdomains
      [9] => Vary: Accept-Encoding
      [10] => X-Cache: HIT
      [11] => X-Content-Type-Options: nosniff
      [12] => X-Frame-Options: SAMEORIGIN
      [13] => X-XSS-Protection: 1; mode=block
      [14] => Content-Length: 24102
      [15] => Connection: close
   )
   [wrapper_type] => http
   [stream_type] => tcp_socket/ssl
   [mode] => r
   [unread_bytes] => 0
   [seekable] =>
   [uri] => https://www.tutorialspoint.com/php7/php7_closure_call.htm
)

  1. পিএইচপি HTTP প্রসঙ্গ বিকল্প

  2. পিএইচপি ট্যাগ

  3. পিএইচপি পাই() ফাংশন

  4. কিভাবে PHP এ XML ফাইল ইকো করবেন