Answer the question
In order to leave comments, you need to log in
Why does php require an ssl certificate?
The server is on the computer.
With such a schedule
<?php
file_get_contents('https://vk.com');
?>
Answer the question
In order to leave comments, you need to log in
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$sw=file_get_contents(ЛИНК, false, stream_context_create($arrContextOptions));
function file_get_contents_curl( $url ) {
$ch = curl_init();
curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
curl_setopt( $ch, CURLOPT_HEADER, 0 );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );
$data = curl_exec( $ch );
curl_close( $ch );
return $data;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question