I've opened before a question about name.com API and got helpful answers.
Now, I come again with another question, Question is about listing domain names:
I want to get the info out of multidimensional arrays, What I've done so far is this:
$api = new NameComApi();
$api->username('XXX');
$api->apiToken('XXXXXXXXX');
$response = $api->list_domains();
foreach($response->domains as $Domains){
echo "<ul>"
."<li>Creation date = {$Domains->create_date}"
."<li>Expiring date = {$Domains->expire_date}"
."</ul>";
}
This was successful, But what I wasn't successful in is to get the domain name :(
You can find the array below:
stdClass Object
(
[result] => stdClass Object
(
[code] => 100
[message] => Command Successful
)
[domains] => stdClass Object
(
[XXXXXXX.com] => stdClass Object
(
[tld] => com
[create_date] => 2007-08-21 19:37:59
[expire_date] => 2013-08-22 01:37:59
[addons] => stdClass Object
(
[whois_privacy] => stdClass Object
(
[price] => 3.99
)
[domain/renew] => stdClass Object
(
[price] => 10.99
)
)
)
What I've been tried to far:
$Domains->domains
$Domains->domains[1]
$Domains->domains[]
But no luck, I know that I'm missing something important but I don't know what it is.
Waiting your reply.
Thanks in advance.