金沙娱场城app

 
 注册大米会员

qq登录

只需一步,快速开始

查看: 805|回复: 0

win-金沙娱场城app

[复制链接]

549

主题

827

帖子

8632

积分

超级版主

rank: 8rank: 8

积分
8632

授权用户商城金牌vip

发表于 2025-6-18 09:19:24 | 显示全部楼层 |
本帖最后由 追影 于 2025-6-18 10:44 编辑

winacme软件的下载地址:

(1)写个php console形式可以调用的 里面主要根据参数有增加和删除的操作 这个是西部数码的演示实例
  1. function add_txt($sub_domain, $value) {
  2.     $curl = curl_init();
  3.     curl_setopt_array($curl, array(
  4.         curlopt_url => 'https://api.west.cn/api/v2/domain/dns/?apidomainkey=密钥',
  5.         curlopt_returntransfer => true,
  6.         curlopt_encoding => '',
  7.         curlopt_maxredirs => 10,
  8.         curlopt_timeout => 0,
  9.                 curlopt_ssl_verifypeer=>false,
  10.                 curlopt_ssl_verifyhost=>false,
  11.         curlopt_followlocation => true,
  12.         curlopt_http_version => curl_http_version_1_1,
  13.         curlopt_customrequest => 'get',
  14.         curlopt_postfields => 'act=dnsrec.add&domain=damicms.com&hostname='.$sub_domain.'&record_value='.$value.'&record_type=txt',
  15.     ));
  16.     $response = curl_exec($curl);
  17.     curl_close($curl);
  18.     echo $response;
  19. }

  20. function del_txt($sub_domain) {
  21.     $curl = curl_init();
  22.     curl_setopt_array($curl, array(
  23.         curlopt_url => 'https://api.west.cn/api/v2/domain/dns/?apidomainkey=密钥',
  24.         curlopt_returntransfer => true,
  25.         curlopt_encoding => '',
  26.         curlopt_maxredirs => 10,
  27.         curlopt_timeout => 0,
  28.                 curlopt_ssl_verifypeer=>false,
  29.                 curlopt_ssl_verifyhost=>false,
  30.         curlopt_followlocation => true,
  31.         curlopt_http_version => curl_http_version_1_1,
  32.         curlopt_customrequest => 'get',
  33.         curlopt_postfields => 'act=dnsrec.remove&domain=damicms.com&hostname='.$sub_domain.'&record_type=txt',
  34.     ));
  35.     $response = curl_exec($curl);
  36.     curl_close($curl);
  37.     echo $response;
  38. }

  39. // 命令行参数处理
  40. if (php_sapi_name() == 'cli') {
  41.     // 移除非中文参数名
  42.     $command = isset($argv[1]) ?$argv[1]: null;

  43.     if ($command === 'add') {
  44.         if (count($argv) < 4) {
  45.             die("错误:添加操作需要子域名和值参数\n用法:php script.php add <子域名> <值>\n");
  46.         }
  47.         add_txt($argv[2], $argv[3]);
  48.     }
  49.     elseif ($command === 'del') {
  50.         if (count($argv) < 3) {
  51.             die("错误:删除操作需要子域名参数\n用法:php script.php del <子域名>\n");
  52.         }
  53.         del_txt($argv[2]);
  54.     }
  55.     else {
  56.         die("无效命令\n可用命令:\n  add - 添加txt记录\n  del - 删除txt记录\n\n示例:\n  php script.php add _acme-challenge '验证值'\n  php script.php del _acme-challenge\n");
  57.     }
  58. } else {
  59.     die("本脚本仅支持命令行模式运行");
  60. }
  61. ?>
复制代码
(2)再编写一个bat,调用php执行api域名txt记录增加或删除:
  1. @echo off

  2. set mode=%1
  3. set host=%3

  4. set php_exe=d:\php\php.exe
  5. set php_script=d:\web\y9527\deal_domain.php

  6. if "%mode%" == "create" goto create
  7. if "%mode%" == "delete" goto delete
  8. echo "deal_dns create|delete subdomain [txt_value]"
  9. exit /b 3

  10. :create
  11. set txt_value=%4
  12. call "%php_exe%" "%php_script%" add "%host%" "%txt_value%"
  13. goto end

  14. :delete
  15. call "%php_exe%" "%php_script%" del "%host%"
  16. goto end

  17. :end
复制代码
winacem指定这个bat的路径即可 参数些都默认即可


您需要登录后才可以回帖 登录 | 注册大米会员

本版积分规则

快速回复 返回列表
网站地图