wip
This commit is contained in:
1 parent
bee1d73712
commit
f49de96df5
1 file changed
+6
-6
@@ -9,13 +9,13 @@ class Auth
|
|||||||
public static function exe()
|
public static function exe()
|
||||||
{
|
{
|
||||||
|
|
||||||
$enviorment = config('env.app_env');
|
|
||||||
|
|
||||||
$base_url = BaseUrl::get();
|
$base_url = BaseUrl::get();
|
||||||
|
|
||||||
$url = $base_url.'/v1/authentication/token';
|
$url = $base_url.'/v1/authentication/token';
|
||||||
|
|
||||||
if ($enviorment == 'local') {
|
dd($url);
|
||||||
|
|
||||||
|
if (config('env.app_env') == 'local') {
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, 'https://proxydb1.nuhodds.com/proxy.php');
|
curl_setopt($ch, CURLOPT_URL, 'https://proxydb1.nuhodds.com/proxy.php');
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||||
@@ -33,9 +33,10 @@ class Auth
|
|||||||
} else {
|
} else {
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
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',
|
||||||
@@ -47,7 +48,6 @@ class Auth
|
|||||||
'content-type: application/json',
|
'content-type: application/json',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = curl_exec($ch);
|
$file = curl_exec($ch);
|
||||||
|
|
||||||
dd($file);
|
dd($file);
|
||||||
|
|||||||
Reference in new issue
Block a user