dotzero/googl 问题修复 & 功能扩展

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

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

dotzero/googl

最新稳定版本:0.2.0

Composer 安装命令:

composer require dotzero/googl

包简介

A PHP5 library to generate shortened URL through The Google URL Shortener API

README 文档

README

Build Status Latest Stable Version License

A PHP5 library to generate shortened URL through The Google URL Shortener API.

Usage

Using an Google API key is highly recommended. To acquire an API key follow the instructions.

Shorten URL

Shorten a long URL using The Google URL Shortener API

try { $googl = new \dotzero\Googl('YOUR_GOOGLE_API'); echo $googl->shorten('http://github.com'); } catch (\dotzero\GooglException $e) { printf('Error (%d): %s', $e->getCode(), $e->getMessage()); }

Expand URL

Expand a short URL using The Google URL Shortener API

try { $googl = new \dotzero\Googl('YOUR_GOOGLE_API'); echo $googl->expand('http://goo.gl/KkZ8'); } catch (\dotzero\GooglException $e) { printf('Error (%d): %s', $e->getCode(), $e->getMessage()); }

Install

Via composer:

$ composer require dotzero/googl

Without composer

Clone the project using git clone https://github.com/dotzero/googl-php/ and include the source file with require_once("googl-php/src/Googl.php");

Test

First install the dependencies, and after you can run:

GOOGLE_API=YOUR_GOOGLE_API vendor/bin/phpunit

License

Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php

统计信息

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

GitHub 信息

  • Stars: 8
  • Watchers: 3
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固