buonzz/noip 问题修复 & 功能扩展

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

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

buonzz/noip

Composer 安装命令:

composer require buonzz/noip

包简介

PHP Client for Integrating to NoIP.com

README 文档

README

Client to update the DDNS hostname to a specific IP.

see http://www.noip.com/integrate/request

Installation

Install as globally executable script

wget https://github.com/buonzz-systems/noip/raw/master/dist/noip_php.phar
sudo mv noip_php.phar  /usr/local/bin/noip_php
chmod +x /usr/local/bin/noip_php
noip_php -V

Place a configuration file named ".env" on home folder with the following contents:

NOIP_HOST=yourhost.ddns.net
NOIP_USERNAME=yourusername
NOIP_PASSWORD=yourpassword

Running as cron job every 4 hours

0 */4 * * * cd ~;/usr/local/bin/noip_php client:update

Install via Composer in a Project

composer require buonzz/noip

Create the configuration file with filename .env

vi .env

The config file should contain this variables that you need to set

  • NOIP_HOST - is your NoIP Hostname, (e.g. myhostname.ddns.net )
  • NOIP_USERNAME - your account username
  • NOIP_PASSWORD - your password

Remember to not commit the .env file to your git repository! These variables is automatically loaded by app as environment variable. This is a security feature so that your credentials is not hardcoded in your application source codes.

Instantiate Client and set IP

use Buonzz\NoIP\Client;

$client = new Buonzz\NoIP\Client();

$result = $client->update("1.1.1.1");

if($result == 'OK')
  // the ddns host is successfully updated

Install it as CLI script

You can install it globally in your machine:

composer global require buonzz/noip

Simply add this directory to your PATH in your ~/.bash_profile (and/or ~/.bashrc) like this:

export PATH=~/.composer/vendor/bin:$PATH

load the current config

source ~/.bash_profile

Set the .env file in

~/.env folder

vi ~/.env

(look at the above section for configuring projects to know what vars is required )

Now you are ready to run the script

noip_php client:update

Phar Build

https://gist.github.com/buonzz/07193b92ee10e9eaac19 first box in your Homestead.

box build

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固