There is a ready-made shop script with the possibility of authorization through social. network using ulogin.ru .
When trying to authorize, a warning appears:
Warning: file_get_contents ( http://ulogin.ru/token.php?token=7a6b15688681e0ab6f4f4782c4675923&host=denisencko-nicki.myjino.ru ): failed to open stream: Connection timeout expired in / home / users / d / denisencko-nicki / domains / denisencko-nicki.myjino.ru / index.php on line 148
Here is an excerpt from the index.php file:
147: $token = $_POST['token']; 148: $s = file_get_contents('http://ulogin.ru/token.php?token=' . $token . '&host=' . $_SERVER['HTTP_HOST']); 149: $user = json_decode($s, "true"); 150: $uid = $user["uid"];
What is the problem, and how to solve it?
Link to the site with this problem.
ulogin.ru
? Try runningwget http://ulogin.ru/token.php?token=123
and see the answer. You can not reach it and the problem with the network should be looked for, and not in the code. And try usingCURL
, it is more informative for errors and time will be shortened. In addition, for thefile_get_contents
context
would be nice to pass. - BOPOH