定制 tda/laravel-netcup 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tda/laravel-netcup

最新稳定版本:v0.2.1

Composer 安装命令:

composer require tda/laravel-netcup

包简介

Netcup integration for laravel 8

README 文档

README

Netcup API for Laravel Based on: https://ccp.netcup.net/run/webservice/servers/endpoint.php

Requirements • PHP >= 8.1

• Composer

• Laravel >= 8.0

Installation

composer require tda/laravel-netcup

Usage

Inside Laravel:

use Tda\LaravelNetcup\Netcup;
$clientRequestId = 'your_id'; //optional
$client = new Netcup($clientRequestId);

originally the keys are read from config in 'services.netcup' as:

('services.netcup.api_key'),
('services.netcup.api_password'),
('services.netcup.customer_number')

It is possible to set different location, e.g.:

$netcup->setConfig('apis.netcup'); 

by standard it uses REST, but it can be changed to use SOAP

$netcup->useSoap();

Features

Domain

List all domains

$domains = $netcup->listAllDomains(); //it return as Collection

Get info from a domain from Netcup

$domain = $netcup->infoDomain('mydomain.com');

Search for domain

$domain = $netcup->searchDomain('somedomain.com');

Get the Top level domain price

$price = $netcup->priceTopLevelDomain('de');

Get Auth code from domain name

$authcode = $netcup->getAuthCodeDomain('somedomain.com');
//or from a domain object
$domain = $netcup->infoDomain('mydomain.com');
$authcode = $netcup->getAuthCodeDomain($domain);

Create a domain

(under construction)

$contact = new Tda\LaravelNetcup\Contactentries;
$contact->ownerc = {Id of contact handle}; // obligatory
$contact->adminc = {Id of contact handle}; 
$contact->techc = {Id of contact handle};
$contact->zonec = {Id of contact handle};
$contact->billingc = {Id of contact handle};
$contact->onsitec = {Id of contact handle};
$contact->generalrequest = {Id of contact handle};
$contact->abusecontact = {Id of contact handle};

$domain = $netcup->createDomain('mydomain.com', $contact);

Update a domain

(under construction)

Cancel a domain

(under construction)

Transfer a domain

(under construction)

Change owner of a domain

(under construction)

Handle

List all handles from Netcup

$handles = $netcup->listAllHandle(); //it return as Collection

Get Handle info

$handle = $netcup->infoHandle($handle_id);

Create Handle

$newHandle = new \Tda\LaravelNetcup\NetcupHandle();
$newHandle->type = 'organisation';
$newHandle->name = 'Your Lame';
$newHandle->organisation = 'Your organisation name';
$newHandle->street = 'Street';
$newHandle->type = 'organisation'; //(person|organisation|role|request)
$newHandle->postalcode = "0000";
$newHandle->city = "City";
$newHandle->countrycode = "DE";
$newHandle->telephone = "telefone number";
$newHandle->email = "your@email.com";
$newHandle->assignedtodomain = true;

$response = $netcup->createHandle($newHandle);

Update Handle

$handle = $netcup->infoHandle($handle_id);
$hande->email = "new@email.com";
$response = $netcup->updateHandle($handle);

Delete Handle

$handle = $netcup->infoHandle($handle_id);
$response = $netcup->deleteHandle($handle);

DNS

Zones

accepts only domain registered on Netcup

Get Zone DNS from a domain

$response = $netcup->infoDnsZone('somedomain.com');
//or from the Domain object
$domain = $netcup->infoDomain('mydomain.com');
$response = $netcup->infoDnsZone($domain);

updateDnsZone

(Under construction)

Records

accepts only domain registered on Netcup

Get DNS Records from a domain

$response = $netcup->infoDnsRecords('yourdomain.com');
//or from the Domain object
$domain = $netcup->infoDomain('mydomain.com'); 
$response = $netcup->infoDnsRecords($domain);  

updateDnsRecords

(Under construction)

Poll

List all poll

$messageCount = 10; // optional; standard = 50
$response = $netcup->poll($messageCount); 

Acknowledge a message

$response = $netcup->ackPoll($poll_id); 

License This project is licensed under the MIT License - see the LICENSE file for details.

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-12