martinmulder/internetnl-batchapi-php

Internet.nl 批量API PHP

v0.11 2019-05-14 08:20 UTC

This package is auto-updated.

Last update: 2024-09-28 00:06:09 UTC


README

这是一个用于与Internet.NL批量API通信的PHP客户端。

用法

<?php
use \Doctrine\Common\Annotations\AnnotationRegistry;

$loader = require_once 'vendor/autoload.php';
AnnotationRegistry::registerLoader(array($loader, "loadClass"));

$api = new \MartinMulder\InternetNL\Api();

try {
  $web = $api->web("<name>", array('<domains>'));
  echo $web->getData()->getResults();
} catch (\MartinMulder\InternetNL\Exception\ApiException $e) {
  echo $e->getMessage() . ' @ ' . $e->getCall();
}