Answer the question
In order to leave comments, you need to log in
What is wrong with (file_get_contents)?
Gives an error: "file_get_contents(): Unable to get input stream for connection"
$token=$this->edit->text;
$id=$this->textArea->text;
STR_replace('http://vk.com/', '', $id);
$this->textArea->text=$id;
$this->textArea3->text.='Очистили список ссылок от: "http://vk.com/"';
STR_replace('public', '', $id);
$this->textArea3->text.='Очистили список ссылок от: "public"';
STR_replace('club', '', $id);
$this->textArea->text=$id;
$this->textArea3->text.='Очистили список ссылок от: "club"';
$array = json_decode($h,true);
$links = array($this->textArea->text);
foreach ( $links as $links ) {
$h = file_get_contents("https://api.vk.com/method=utils.resolveScreenName&screen_name=$links&acces_token=$token&v=5.62");
$array = json_decode($h,true);
$p.=$array['response']['object_id'];
Answer the question
In order to leave comments, you need to log in
Try to run this code
$w = stream_get_wrappers();
echo 'openssl: ', extension_loaded ('openssl') ? 'yes':'no', "\n";
echo 'http wrapper: ', in_array('http', $w) ? 'yes':'no', "\n";
echo 'https wrapper: ', in_array('https', $w) ? 'yes':'no', "\n";
echo 'wrappers: ', var_export($w);
openssl: yes
http wrapper: yes
https wrapper: yes
wrappers: array(11) {
[...]
}
So you will know what exactly it lacks to process this request. is wrong here:
necessary
$request_params = array(
'screen_name'=> $links,
'access_token' => $token
);
$get_params = http_build_query($request_params);
$h = json_decode(file_get_contents('https://api.vk.com/method/utils.resolveScreenName?' . $get_params ));
m/method = utils.resolv
m/method ? utils.resolv
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question