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()
|
||||
{
|
||||
|
||||
$enviorment = config('env.app_env');
|
||||
|
||||
$base_url = BaseUrl::get();
|
||||
|
||||
$url = $base_url.'/v1/authentication/token';
|
||||
|
||||
if ($enviorment == 'local') {
|
||||
dd($url);
|
||||
|
||||
if (config('env.app_env') == 'local') {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://proxydb1.nuhodds.com/proxy.php');
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
@@ -33,9 +33,10 @@ class Auth
|
||||
} else {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
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_POSTFIELDS, [
|
||||
'username' => 'nuhodds',
|
||||
@@ -47,7 +48,6 @@ class Auth
|
||||
'content-type: application/json',
|
||||
]);
|
||||
}
|
||||
|
||||
$file = curl_exec($ch);
|
||||
|
||||
dd($file);
|
||||
|
||||
Reference in new issue
Block a user