guti/dhl-tracker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

guti/dhl-tracker

Composer 安装命令:

composer require guti/dhl-tracker

包简介

The DHLTracker PHP package provides an easy-to-use, object-oriented interface for tracking shipments using the DHL API.

README 文档

README

Description

The DHLTracker PHP package provides an easy-to-use, object-oriented interface for tracking shipments using the DHL API. It simplifies the process of sending requests to DHL and parsing the responses. This package is particularly useful for developers working on logistics, e-commerce, and any application where tracking DHL shipments is required.

Features

  • Simple Tracking: Track DHL shipments using just the tracking number.
  • API Key Integration: Securely integrates with your DHL API key for authenticated requests.
  • Error Handling: Implements error handling for robust application development.
  • Flexible Responses: Retrieve tracking information in a structured format, making it easy to use within your application.
  • PSR-4 Autoloading: Conforms to PSR-4 standards for compatibility with modern PHP applications.

Installation

The DHLTracker PHP package can be installed using Composer. Run this command:

composer require dhltracker/dhltracker

Usage

Tracking Shipments

To track a shipment, you will need to create a DHLTracker object and pass in your DHL API key and the tracking number. You can then call the trackShipment() method and this will return a DHLTrackerResponse object, which contains the tracking information.

<?php

require_once __DIR__ . '/vendor/autoload.php';

use DHLTracker\DHLTracker;

// Instantiate the DHLTracker class with your DHL tracking number and API key:

$tracker = new DHLTracker("YOUR_TRACKING_NUMBER", "YOUR_DHL_API_KEY");

// Then, use the trackShipment method to get the tracking information:

$response = $tracker->trackShipment();
echo $response;

?>

Requirements

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for more details.

License

This package is licensed under the MIT License

统计信息

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

GitHub 信息

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

其他信息

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