替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`| <?php | |
| /* | |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| import fcntl | |
| import os | |
| import struct | |
| import subprocess | |
| # Some constants used to ioctl the device file. I got them by a simple C | |
| # program. | |
| TUNSETIFF = 0x400454ca | |
| TUNSETOWNER = TUNSETIFF + 2 |
| if ['2.3.8', '2.3.9', '2.3.10', '2.3.11'].include?(Rails.version) && Gem.available?('mongrel', '~>1.1.5') && self.class.const_defined?(:Mongrel) | |
| # Pulled right from latest rack. Old looked like this in 1.1.0 version. | |
| # | |
| # def [](k) | |
| # super(@names[k] ||= @names[k.downcase]) | |
| # end | |
| # | |
| module Rack | |
| module Utils |
| # Configure colors, if available. | |
| if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
| c_reset='\[\e[0m\]' | |
| c_user='\[\e[0;32m\]' | |
| c_path='\[\e[1;34m\]' | |
| c_git_clean='\[\e[0;37m\]' | |
| c_git_staged='\[\e[0;32m\]' | |
| c_git_unstaged='\[\e[0;31m\]' | |
| else | |
| c_reset= |
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`| /* | |
| * Metadata - jQuery plugin for parsing metadata from elements | |
| * | |
| * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan | |
| * | |
| * Dual licensed under the MIT and GPL licenses: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * http://www.gnu.org/licenses/gpl.html | |
| * | |
| * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $ |
| Why is there no such DataImportHandler thing in ElasticSearch? Uhm, well ... but because: | |
| 1. You should really consider your own scripts | |
| (be it jvm based, perl, ruby, php, nodejs/javascript) | |
| to feed ElasticSearch via bulk indexing: | |
| http://www.elasticsearch.org/guide/reference/java-api/bulk.html | |
| 2. There are two projects doing it already: | |
| * http://code.google.com/p/sql-to-nosql-importer/ | |
| * https://github.com/Aconex/scrutineer (keeps DB in synch with ES or solr!) |
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |
| <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| $config['views_path'] = APPPATH . 'views/blade/'; | |
| $config['cache_path'] = APPPATH . 'cache/blade/'; |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteRule (.*) ./index.php?id=$1 [L] | |
| </IfModule> |