wip
This commit is contained in:
1 parent
ca3ccb577e
commit
988d2fcea4
1 file changed
+3
-6
@@ -29,19 +29,16 @@ class Auth
|
|||||||
'Proxy-Auth: AIkcoRnipSgMK88WMQhOQQN3LKDrNDCIebNfPnEayJdmDeTigx',
|
'Proxy-Auth: AIkcoRnipSgMK88WMQhOQQN3LKDrNDCIebNfPnEayJdmDeTigx',
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
dd($url);
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
curl_setopt($ch, CURLOPT_POST, true);
|
curl_setopt($ch, CURLOPT_POST, true);
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, [
|
curl_setopt($ch, CURLOPT_POSTFIELDS, [
|
||||||
'username' => 'nuhodds',
|
'username' => 'nuhodds',
|
||||||
'password' => self::$password,
|
'password' => self::$password,
|
||||||
]);
|
]);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
curl_setopt($ch, CURLOPT_HTTPHEADER, [
|
||||||
'accept: application/json',
|
'accept: application/json',
|
||||||
'content-type: application/json',
|
'content-type: application/json',
|
||||||
@@ -49,10 +46,10 @@ class Auth
|
|||||||
}
|
}
|
||||||
$file = curl_exec($ch);
|
$file = curl_exec($ch);
|
||||||
|
|
||||||
dd($file);
|
|
||||||
|
|
||||||
$data = json_decode($file, true);
|
$data = json_decode($file, true);
|
||||||
|
|
||||||
|
dd($data);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user