array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => $params->toQueryString(), // Force the peer to validate (not needed in 5.6.0+, but still works 'verify_peer' => true, // Force the peer validation to use www.google.com $peer_key => 'www.google.com', ), ); $context = stream_context_create($options); return file_get_contents(self::SITE_VERIFY_URL, false, $context); } }