Error in stream_context_get_params() while trying to access ssl information?

while trying to read ssl information of a website using PHP i am getting an error?

Fatal error: Call to undefined function stream_context_get_params() in C:\xampp\htdocs\phishing_Project
ew.php on line 5

My code is

<?php
$get = stream_context_create(array(“ssl” => array(“capture_peer_cert” => TRUE)));
$read = stream_socket_client(“ssl://www.google.com:443”, $errno, $errstr, 30, STREAM_CLIENT_CONNECT,$get);
$cert = stream_context_get_params($read);
var_dump($cert[“options”][“ssl”][“peer_certificate”]);

?>

do anyone know how to solve this problem?

What version of PHP are you running as the function “stream_context_get_params” only exists in PHP 5.3 and higher.

You should be able to use stream_context_get_options() to get the options, this function is available in all PHP 5 versions.

Hi,
I am using php 5.2.Thanks for your help.I will try in php 5.3.