定制 vitorccs/yourls-api-save-by-keyword 二次开发

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

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

vitorccs/yourls-api-save-by-keyword

Composer 安装命令:

composer require vitorccs/yourls-api-save-by-keyword

包简介

YOURLS plugin which updates the long URL of an existing keyword, or creates a new short URL with the supplied keyword

README 文档

README

Adds a new action save_by_keyword to the YOURLS API.

This action either updates the long URL of an existing keyword, or creates a new short URL with the supplied keyword.

This plugin is useful when you prefer to determine your own keywords (e.g: user-id-1, user-id-2, user-joe etc) rather than letting YOURLS generating random ones (e.g: a93al, n9sj8, etc) and you need to keep their long URLs always up to date.

With this action, you may save up to three steps: check if an existing keyword already exists, then delete it, and then generating again under the same keyword.

The request parameters are:

username <api_username>
password <api_password>
action: "save_by_keyword"
format: "json"
url: <required: the long URL to shorten>
keyword: <required: the keyword>
title: <optional: the shorten URL title>

TIP: In case you need to allow multiple short URLs for a same long URL, you need to set the parameter YOURLS_UNIQUE_URLS to false.

# config.php
define( 'YOURLS_UNIQUE_URLS', false );

How to

  • In /user/plugins, create a new folder named yourls-api-save-by-keyword
  • Drop these files in that directory
  • Go to the Plugins administration page and activate the plugin
  • Have fun

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2021-06-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固