vendredi 21 juillet 2017

API response in Laravel decode issue

i have the following route:

Route::get('/verifica-dominio', function() {
$dom = Input::get('dominio');
$dominio = explode('.', Input::get('dominio'));
$name= $dominio[0];
$tld = $dominio[1];
$url =  'http://ift.tt/2gQ7KpV' . $name . '&tld[]=' . $tld;
$json = file_get_contents($url, true, stream_context_create(['socket' => ['bindto' => '0:0']]));
$j = json_decode($json);
return var_dump($j);

});

it return this object

object(stdClass)#1023 (1) { ["provola.com"]=> object(stdClass)#1024 (1) { ["status"]=> int(0) } }

how i can got status=1 in my code?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire