{"id":19993603,"url":"https://github.com/uuk020/logistics","last_synced_at":"2026-01-12T15:31:23.346Z","repository":{"id":45563742,"uuid":"163085695","full_name":"uuk020/logistics","owner":"uuk020","description":"PHP 多接口获取快递物流信息包","archived":false,"fork":false,"pushed_at":"2023-03-17T13:23:27.000Z","size":102,"stargazers_count":301,"open_issues_count":0,"forks_count":32,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-04T12:38:02.634Z","etag":null,"topics":["composer","logistics","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uuk020.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-25T13:36:13.000Z","updated_at":"2024-10-31T06:41:32.000Z","dependencies_parsed_at":"2024-06-19T17:37:06.904Z","dependency_job_id":"9870f0f6-b65c-4fac-9d24-7a28ac53976d","html_url":"https://github.com/uuk020/logistics","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/uuk020/logistics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uuk020%2Flogistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uuk020%2Flogistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uuk020%2Flogistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uuk020%2Flogistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uuk020","download_url":"https://codeload.github.com/uuk020/logistics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uuk020%2Flogistics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","logistics","php"],"created_at":"2024-11-13T04:52:50.538Z","updated_at":"2026-01-12T15:31:23.329Z","avatar_url":"https://github.com/uuk020.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e Logistics \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e简单便捷查询运单快递信息\u003c/p\u003e\n\n\n[![Build Status](https://travis-ci.org/uuk020/logistics.svg?branch=master)](https://travis-ci.org/uuk020/logistics)\n![StyleCI build status](https://github.styleci.io/repos/163085695/shield)\n[![Latest Stable Version](https://poser.pugx.org/wythe/logistics/v/stable)](https://packagist.org/packages/wythe/logistics)\n[![Total Downloads](https://poser.pugx.org/wythe/logistics/downloads)](https://packagist.org/packages/wythe/logistics)\n[![Latest Unstable Version](https://poser.pugx.org/wythe/logistics/v/unstable)](https://packagist.org/packages/wythe/logistics)\n[![License](https://poser.pugx.org/wythe/logistics/license)](https://packagist.org/packages/wythe/logistics)\n\n\n### 支持查询接口平台\n\n| 平台 | 次数 | 是否需要快递公司编码 | 免费版支持的快递公司 |\n| :-----: | :----: | :----: | :----: |\n| [快递100](https://www.kuaidi100.com/openapi/applyapi.shtml) | 100次(首次申请) | Y | |\n| [快递鸟](http://www.kdniao.com/api-all) | 500单/天(免费) | Y | 支持申通、圆通、百世、天天，其他快递公司可自行尝试，不支持顺丰 |\n| [聚合数据](https://www.juhe.cn/docs/api/id/43) | 100次(首次申请) | Y | |\n| [极速数据](https://www.jisuapi.com/api/express) | 1000次(免费) | N | |\n| [数据智汇](http://www.shujuzhihui.cn/apiDetails?id=1867) | 100次(免费) | N | |\n\n### 配置须知\n* 只有快递鸟申请后会有两个,一个是用户ID, 填入到app_secret,另外一个则是api_key, 填入app_key, 其他则把申请的key填入到app_key \n\n### 环境需求\n* PHP \u003e= 7.0\n\n### 安装\n\n```shell\n$ composer require wythe/logistics -vvv\n```\n\n### 使用\n```php\nuse Wythe\\Logistics\\Logistics;\n$config = [\n    'juhe' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'shujuzhihui' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'jisu' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'kuaidibird' =\u003e ['app_key' =\u003e 'app_key', 'app_secret' =\u003e  'app_secret', 'vip' =\u003e\n            false],\n    'kuaidi100' =\u003e ['app_key' =\u003e '']\n];\n$logistics = new Logistics($config);\n```\n\n### 参数说明\n```\narray query(string $code, $channels = ['kuaidi100'], string $company = '')\narray queryByProxy(array $proxy, string $code, $channels = ['kuaidi100'], string $company = '')\n```\n\n* query 与 queryByProxy 返回数组结构是一样, 只是多了一个参数代理IP\n* $proxy - 代理地址 结构: ['proxy' =\u003e '代理IP:代理端口']\n* $code - 运单号\n* $channel - 渠道名称, 可选参数,默认快递鸟.\n* $company - 快递公司 具体看 SupportLogistics 文件\n\n### 快递 100 接口获取物流信息 所有接口返回格式是统一\n```php\nuse Wythe\\Logistics\\Logistics;\n$config = [\n    'juhe' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'shujuzhihui' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'jisu' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'kuaidibird' =\u003e ['app_key' =\u003e 'app_key', 'app_secret' =\u003e  'app_secret', 'vip' =\u003e\n            false],\n    'kuaidi100' =\u003e ['app_key' =\u003e '']\n];\n$logistics = new Logistics($config);\n$logistics-\u003equery('12313131231', ''); // 第二参数选填,可以为字符串或数组, 默认快递鸟\n$logistics-\u003equery('12313131231', 'kuaidi100');\n$logistics-\u003equery('12313131231', ['kuaidi100']);\n```\n示例:\n\n```php \n[\n   'kuaidi100' =\u003e [\n       'channel' =\u003e 'kuaidi100',\n       'status' =\u003e 'success',\n       'result' =\u003e [\n           [\n               'status' =\u003e 200,\n               'message'  =\u003e 'OK',\n               'error_code' =\u003e 0,\n               'data' =\u003e [\n                   ['time' =\u003e '2019-01-09 12:11', 'description' =\u003e '仓库-已签收'],\n                   ['time' =\u003e '2019-01-07 12:11', 'description' =\u003e '广东XX服务点'],\n                   ['time' =\u003e '2019-01-06 12:11', 'description' =\u003e '广东XX转运中心']\n               ],\n               'logistics_company' =\u003e '申通快递',\n               'logistics_bill_no' =\u003e '12312211'\n           ],\n           [\n               'status' =\u003e 201,\n               'message' =\u003e '快递公司参数异常：单号不存在或者已经过期',\n               'error_code' =\u003e 0,\n               'data' =\u003e '',\n               'logistics_company' =\u003e '',\n               'logistics_bill_no' =\u003e ''\n           ]\n       ]\n   ]\n]\n```\n\n### 多接口获取物流信息\n```php\nuse Wythe\\Logistics\\Logistics;\n$config = [\n    'juhe' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'shujuzhihui' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'jisu' =\u003e ['app_key' =\u003e 'app_key', 'vip' =\u003e false],\n    'kuaidibird' =\u003e ['app_key' =\u003e 'app_key', 'app_secret' =\u003e  'app_secret', 'vip' =\u003e\n            false],\n    'kuaidi100' =\u003e ['app_key' =\u003e '']\n];\n$logistics = new Logistics($config);\n$logistics-\u003equery('12313131231');\n$logistics-\u003equery('12313131231', ['kuaidi100', 'ickd']);\n```\n示例:\n\n```php \n[\n   'kuaidi100' =\u003e [\n       'channel' =\u003e 'kuaidi100',\n       'status' =\u003e 'success',\n       'result' =\u003e [\n           [\n               'status' =\u003e 200,\n               'message'  =\u003e 'OK',\n               'error_code' =\u003e 0,\n               'data' =\u003e [\n                   ['time' =\u003e '2019-01-09 12:11', 'description' =\u003e '仓库-已签收'],\n                   ['time' =\u003e '2019-01-07 12:11', 'description' =\u003e '广东XX服务点'],\n                   ['time' =\u003e '2019-01-06 12:11', 'description' =\u003e '广东XX转运中心']\n               ],\n               'logistics_company' =\u003e '申通快递',\n               'logistics_bill_no' =\u003e '12312211'\n           ],\n           [\n               'status' =\u003e 201,\n               'message' =\u003e '快递公司参数异常：单号不存在或者已经过期',\n               'error_code' =\u003e 0,\n               'data' =\u003e '',\n               'logistics_company' =\u003e '',\n               'logistics_bill_no' =\u003e ''\n           ]\n       ]\n   ],\n   'ickd' =\u003e [\n       'channel' =\u003e 'ickd',\n       'status' =\u003e 'success',\n       'result' =\u003e [\n           [\n               'status' =\u003e 200,\n               'message'  =\u003e 'OK',\n               'error_code' =\u003e 0,\n                'data' =\u003e [\n                    ['time' =\u003e '2019-01-09 12:11', 'description' =\u003e '仓库-已签收'],\n                    ['time' =\u003e '2019-01-07 12:11', 'description' =\u003e '广东XX服务点'],\n                    ['time' =\u003e '2019-01-06 12:11', 'description' =\u003e '广东XX转运中心']\n                ],\n                'logistics_company' =\u003e '申通快递',\n                'logistics_bill_no' =\u003e '12312211'\n           ]\n       ]\n   ]\n]\n```\n\n## 参考\n* [PHP 扩展包实战教程 - 从入门到发布](https://laravel-china.org/courses/creating-package)\n* [高德开放平台接口的 PHP 天气信息组件(weather)](https://github.com/overtrue/weather)\n* [满足你的多种发送需求的短信发送组件(easy-sms)](https://github.com/overtrue/easy-sms)\n\n## 最后\n欢迎提出 issue 和 pull request\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuuk020%2Flogistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuuk020%2Flogistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuuk020%2Flogistics/lists"}