PHP 在 Windows 运行 exec() 方法报错 The command line is too long.

Php 2021-10-21 阅读 0 评论 0

问题描述

在 Windows 中,执行以下代码:

<?php
$command = 'curl --create-dirs -o "D:\downloads\kyoshin\kik\20170628210700.tar" -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102Safari/537.36" -H "Authorization: Basic V1NZMTkyNzp3c3k5OTA2MDE=" -H "Content-Type: application/x-www-form-urlencoded" --data-raw "w_date=on&depth_1=0&depth_2=1000&lat_s=30.0&lat_n=50.0&sitenum_1=1&sitenum_2=500&lon_w=120.0&lon_e=150.0&sitecode=&formattype=A&sum1=acmap&sum2=puwave3ch&datanames=20170628210700%3BNMRH021706282107.tar.gz%3BNMRH031706282107.tar.gz%3BNMRH041706282107.tar.gz%3BKSRH061706282107.tar.gz%3BNMRH051706282107.tar.gz%3BKSRH071706282107.tar.gz%3BIWTH021706282107.tar.gz%3BKSRH031706282107.tar.gz%3BKSRH041706282107.tar.gz%3BKSRH051706282107.tar.gz%3BAOMH161706282107.tar.gz%3BKSRH021706282107.tar.gz%3BNMRH011706282107.tar.gz%3BIWTH011706282107.tar.gz%3BIWTH121706282107.tar.gz%3BKSRH091706282107.tar.gz%3BAOMH171706282107.tar.gz%3BAOMH121706282107.tar.gz%3BKKWH081706282107.tar.gz%3BAOMH061706282107.tar.gz%3BAOMH111706282107.tar.gz%3BMYGH131706282107.tar.gz%3BABSH091706282107.tar.gz%3BTKCH051706282107.tar.gz%3BABSH121706282107.tar.gz%3BAOMH131706282107.tar.gz%3BABSH111706282107.tar.gz%3BTKCH111706282107.tar.gz%3BIWTH221706282107.tar.gz%3BIBUH061706282107.tar.gz%3BIWTH041706282107.tar.gz%3BKSRH081706282107.tar.gz%3BIWTH081706282107.tar.gz%3BAOMH011706282107.tar.gz%3BIWTH271706282107.tar.gz%3BIWTH211706282107.tar.gz%3BAOMH181706282107.tar.gz%3BIWTH031706282107.tar.gz%3BIWTH151706282107.tar.gz%3BHDKH061706282107.tar.gz%3BHDKH071706282107.tar.gz%3BIWTH111706282107.tar.gz%3BKSRH011706282107.tar.gz%3BIWTH181706282107.tar.gz%3BAKTH041706282107.tar.gz%3BTKCH041706282107.tar.gz%3BTKCH031706282107.tar.gz%3BHDKH041706282107.tar.gz%3BIWTH201706282107.tar.gz%3BIWTH191706282107.tar.gz%3BIBUH011706282107.tar.gz%3BMYGH071706282107.tar.gz%3BIWTH231706282107.tar.gz%3BIWTH091706282107.tar.gz%3BIWTH171706282107.tar.gz%3BHDKH031706282107.tar.gz%3BIWTH131706282107.tar.gz%3BIWTH261706282107.tar.gz%3BABSH071706282107.tar.gz%3BFKSH121706282107.tar.gz%3BIWTH161706282107.tar.gz%3BIWTH071706282107.tar.gz%3BTKCH011706282107.tar.gz%3BIWTH101706282107.tar.gz%3BMYGH041706282107.tar.gz%3BMYGH111706282107.tar.gz%3BIWTH241706282107.tar.gz%3BAKTH171706282107.tar.gz%3BHDKH051706282107.tar.gz%3BAOMH031706282107.tar.gz%3BOSMH021706282107.tar.gz%3BIBUH051706282107.tar.gz%3BABSH151706282107.tar.gz%3BSRCH091706282107.tar.gz%3BFKSH201706282107.tar.gz%3BHDKH011706282107.tar.gz%3BABSH061706282107.tar.gz%3BIKRH031706282107.tar.gz%3BKKWH141706282107.tar.gz%3BMYGH081706282107.tar.gz%3BMYGH061706282107.tar.gz%3BYMTH021706282107.tar.gz%3BIBUH021706282107.tar.gz%3BMYGH091706282107.tar.gz%3BAKTH091706282107.tar.gz%3BAOMH101706282107.tar.gz%3B&searchfile=SRCH1634542076edlize.com&listlength=4&datakind=kik&mag_1=0&mag_2=10&month_from=06&year_from=2017&month_to=06&year_to=2017&down_list%5B0%5D=NMRH02%40170628210806%40NMRH021706282107%40kik&down_list%5B1%5D=NMRH03%40170628210806%40NMRH031706282107%40kik&down_list%5B2%5D=NMRH04%40170628210805%40NMRH041706282107%40kik&down_list%5B3%5D=KSRH06%40170628210813%40KSRH061706282107%40kik&down_list%5B4%5D=NMRH05%40170628210809%40NMRH051706282107%40kik&down_list%5B5%5D=KSRH07%40170628210814%40KSRH071706282107%40kik&down_list%5B6%5D=IWTH02%40170628211006%40IWTH021706282107%40kik&down_list%5B7%5D=KSRH03%40170628210823%40KSRH031706282107%40kik&down_list%5B8%5D=KSRH04%40170628210810%40KSRH041706282107%40kik&down_list%5B9%5D=KSRH05%40170628210815%40KSRH051706282107%40kik&down_list%5B10%5D=AOMH16%40170628211001%40AOMH161706282107%40kik&down_list%5B11%5D=KSRH02%40170628210816%40KSRH021706282107%40kik&down_list%5B12%5D=NMRH01%40170628210806%40NMRH011706282107%40kik&down_list%5B13%5D=IWTH01%40170628211001%40IWTH011706282107%40kik&down_list%5B14%5D=IWTH12%40170628211001%40IWTH121706282107%40kik&down_list%5B15%5D=KSRH09%40170628210818%40KSRH091706282107%40kik&down_list%5B16%5D=AOMH17%40170628210957%40AOMH171706282107%40kik&down_list%5B17%5D=AOMH12%40170628210959%40AOMH121706282107%40kik&down_list%5B18%5D=KKWH08%40170628210831%40KKWH081706282107%40kik&down_list%5B19%5D=AOMH06%40170628210950%40AOMH061706282107%40kik&down_list%5B20%5D=AOMH11%40170628211001%40AOMH111706282107%40kik&down_list%5B21%5D=MYGH13%40170628211026%40MYGH131706282107%40kik&down_list%5B22%5D=ABSH09%40170628210808%40ABSH091706282107%40kik&down_list%5B23%5D=TKCH05%40170628210856%40TKCH051706282107%40kik&down_list%5B24%5D=ABSH12%40170628210812%40ABSH121706282107%40kik&down_list%5B25%5D=AOMH13%40170628210955%40AOMH131706282107%40kik&down_list%5B26%5D=ABSH11%40170628210815%40ABSH111706282107%40kik&down_list%5B27%5D=TKCH11%40170628210910%40TKCH111706282107%40kik&down_list%5B28%5D=IWTH22%40170628211016%40IWTH221706282107%40kik&down_list%5B29%5D=IBUH06%40170628210947%40IBUH061706282107%40kik&down_list%5B30%5D=IWTH04%40170628211017%40IWTH041706282107%40kik&down_list%5B31%5D=KSRH08%40170628210818%40KSRH081706282107%40kik&down_list%5B32%5D=IWTH08%40170628210953%40IWTH081706282107%40kik&down_list%5B33%5D=AOMH01%40170628210953%40AOMH011706282107%40kik&down_list%5B34%5D=IWTH27%40170628211018%40IWTH271706282107%40kik&down_list%5B35%5D=IWTH21%40170628211005%40IWTH211706282107%40kik&down_list%5B36%5D=AOMH18%40170628211006%40AOMH181706282107%40kik&down_list%5B37%5D=IWTH03%40170628211002%40IWTH031706282107%40kik&down_list%5B38%5D=IWTH15%40170628211015%40IWTH151706282107%40kik&down_list%5B39%5D=HDKH06%40170628210930%40HDKH061706282107%40kik&down_list%5B40%5D=HDKH07%40170628210914%40HDKH071706282107%40kik&down_list%5B41%5D=IWTH11%40170628211006%40IWTH111706282107%40kik&down_list%5B42%5D=KSRH01%40170628210818%40KSRH011706282107%40kik&down_list%5B43%5D=IWTH18%40170628211009%40IWTH181706282107%40kik&down_list%5B44%5D=AKTH04%40170628211029%40AKTH041706282107%40kik&down_list%5B45%5D=TKCH04%40170628210909%40TKCH041706282107%40kik&down_list%5B46%5D=TKCH03%40170628210823%40TKCH031706282107%40kik&down_list%5B47%5D=HDKH04%40170628210930%40HDKH041706282107%40kik&down_list%5B48%5D=IWTH20%40170628211026%40IWTH201706282107%40kik&down_list%5B49%5D=IWTH19%40170628211019%40IWTH191706282107%40kik&down_list%5B50%5D=IBUH01%40170628210933%40IBUH011706282107%40kik&down_list%5B51%5D=MYGH07%40170628211046%40MYGH071706282107%40kik&down_list%5B52%5D=IWTH23%40170628211009%40IWTH231706282107%40kik&down_list%5B53%5D=IWTH09%40170628210956%40IWTH091706282107%40kik&down_list%5B54%5D=IWTH17%40170628211005%40IWTH171706282107%40kik&down_list%5B55%5D=HDKH03%40170628210922%40HDKH031706282107%40kik&down_list%5B56%5D=IWTH13%40170628211002%40IWTH131706282107%40kik&down_list%5B57%5D=IWTH26%40170628211027%40IWTH261706282107%40kik&down_list%5B58%5D=ABSH07%40170628210910%40ABSH071706282107%40kik&down_list%5B59%5D=FKSH12%40170628211103%40FKSH121706282107%40kik&down_list%5B60%5D=IWTH16%40170628211016%40IWTH161706282107%40kik&down_list%5B61%5D=IWTH07%40170628210957%40IWTH071706282107%40kik&down_list%5B62%5D=TKCH01%40170628210820%40TKCH011706282107%40kik&down_list%5B63%5D=IWTH10%40170628211008%40IWTH101706282107%40kik&down_list%5B64%5D=MYGH04%40170628211026%40MYGH041706282107%40kik&down_list%5B65%5D=MYGH11%40170628211032%40MYGH111706282107%40kik&down_list%5B66%5D=IWTH24%40170628211024%40IWTH241706282107%40kik&down_list%5B67%5D=AKTH17%40170628211025%40AKTH171706282107%40kik&down_list%5B68%5D=HDKH05%40170628210918%40HDKH051706282107%40kik&down_list%5B69%5D=AOMH03%40170628210954%40AOMH031706282107%40kik&down_list%5B70%5D=OSMH02%40170628210957%40OSMH021706282107%40kik&down_list%5B71%5D=IBUH05%40170628210941%40IBUH051706282107%40kik&down_list%5B72%5D=ABSH15%40170628210830%40ABSH151706282107%40kik&down_list%5B73%5D=SRCH09%40170628210937%40SRCH091706282107%40kik&down_list%5B74%5D=FKSH20%40170628211056%40FKSH201706282107%40kik&down_list%5B75%5D=HDKH01%40170628210929%40HDKH011706282107%40kik&down_list%5B76%5D=ABSH06%40170628210821%40ABSH061706282107%40kik&down_list%5B77%5D=IKRH03%40170628210936%40IKRH031706282107%40kik&down_list%5B78%5D=KKWH14%40170628210929%40KKWH141706282107%40kik&down_list%5B79%5D=MYGH08%40170628211044%40MYGH081706282107%40kik&down_list%5B80%5D=MYGH06%40170628211032%40MYGH061706282107%40kik&down_list%5B81%5D=YMTH02%40170628211053%40YMTH021706282107%40kik&down_list%5B82%5D=IBUH02%40170628210932%40IBUH021706282107%40kik&down_list%5B83%5D=MYGH09%40170628211052%40MYGH091706282107%40kik&down_list%5B84%5D=AKTH09%40170628211019%40AKTH091706282107%40kik&down_list%5B85%5D=AOMH10%40170628211013%40AOMH101706282107%40kik&up_list=20170628210700%2C20170628210744%2C20170628000526%2C1%2CHPRL" "https://www.kyoshin.bosai.go.jp/cgi-bin/kyoshin/auth/makearc"';
exec($command);

但是出现了错误:

The command line is too long.

同样的代码,在 MacOS 和 Linux 运行都没问题。

解决方法

尝试减少命令行的长度。结合 curl 命令的选项,可以将请求头和 Post 的数据分别放在不同的文件里。

-H, --header <header/@file>
              Starting in 7.55.0, this option can take an argument in @filename style, which then adds a header for each line in the input file. Using  @-
              will make curl read the header file from stdin.

-d, --data <data>
              If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the  data  from
              stdin.  Multiple  files  can  also be specified. Posting data from a file named from a file like that, carriage returns and newlines will be
              stripped out. If you don't want the @ character to have a special interpretation use --data-raw instead.

使用 @ 符号,将请求头和请求数据的文件连接到命令行。

header.txt 文件

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102Safari/537.36
Authorization: Basic V1NZMTkyNzp3c3k5OTA2MDE=
Content-Type: application/x-www-form-urlencoded

data.txt 文件

w_date=on&depth_1=0&depth_2=1000&lat_s=30.0&lat_n=50.0&sitenum_1=1&sitenum_2=500&lon_w=120.0&lon_e=150.0&sitecode=&formattype=A&sum1=acmap&sum2=puwave3ch&datanames=20170628210700%3BNMRH021706282107.tar.gz%3BNMRH031706282107.tar.gz%3BNMRH041706282107.tar.gz%3BKSRH061706282107.tar.gz%3BNMRH051706282107.tar.gz%3BKSRH071706282107.tar.gz%3BIWTH021706282107.tar.gz%3BKSRH031706282107.tar.gz%3BKSRH041706282107.tar.gz%3BKSRH051706282107.tar.gz%3BAOMH161706282107.tar.gz%3BKSRH021706282107.tar.gz%3BNMRH011706282107.tar.gz%3BIWTH011706282107.tar.gz%3BIWTH121706282107.tar.gz%3BKSRH091706282107.tar.gz%3BAOMH171706282107.tar.gz%3BAOMH121706282107.tar.gz%3BKKWH081706282107.tar.gz%3BAOMH061706282107.tar.gz%3BAOMH111706282107.tar.gz%3BMYGH131706282107.tar.gz%3BABSH091706282107.tar.gz%3BTKCH051706282107.tar.gz%3BABSH121706282107.tar.gz%3BAOMH131706282107.tar.gz%3BABSH111706282107.tar.gz%3BTKCH111706282107.tar.gz%3BIWTH221706282107.tar.gz%3BIBUH061706282107.tar.gz%3BIWTH041706282107.tar.gz%3BKSRH081706282107.tar.gz%3BIWTH081706282107.tar.gz%3BAOMH011706282107.tar.gz%3BIWTH271706282107.tar.gz%3BIWTH211706282107.tar.gz%3BAOMH181706282107.tar.gz%3BIWTH031706282107.tar.gz%3BIWTH151706282107.tar.gz%3BHDKH061706282107.tar.gz%3BHDKH071706282107.tar.gz%3BIWTH111706282107.tar.gz%3BKSRH011706282107.tar.gz%3BIWTH181706282107.tar.gz%3BAKTH041706282107.tar.gz%3BTKCH041706282107.tar.gz%3BTKCH031706282107.tar.gz%3BHDKH041706282107.tar.gz%3BIWTH201706282107.tar.gz%3BIWTH191706282107.tar.gz%3BIBUH011706282107.tar.gz%3BMYGH071706282107.tar.gz%3BIWTH231706282107.tar.gz%3BIWTH091706282107.tar.gz%3BIWTH171706282107.tar.gz%3BHDKH031706282107.tar.gz%3BIWTH131706282107.tar.gz%3BIWTH261706282107.tar.gz%3BABSH071706282107.tar.gz%3BFKSH121706282107.tar.gz%3BIWTH161706282107.tar.gz%3BIWTH071706282107.tar.gz%3BTKCH011706282107.tar.gz%3BIWTH101706282107.tar.gz%3BMYGH041706282107.tar.gz%3BMYGH111706282107.tar.gz%3BIWTH241706282107.tar.gz%3BAKTH171706282107.tar.gz%3BHDKH051706282107.tar.gz%3BAOMH031706282107.tar.gz%3BOSMH021706282107.tar.gz%3BIBUH051706282107.tar.gz%3BABSH151706282107.tar.gz%3BSRCH091706282107.tar.gz%3BFKSH201706282107.tar.gz%3BHDKH011706282107.tar.gz%3BABSH061706282107.tar.gz%3BIKRH031706282107.tar.gz%3BKKWH141706282107.tar.gz%3BMYGH081706282107.tar.gz%3BMYGH061706282107.tar.gz%3BYMTH021706282107.tar.gz%3BIBUH021706282107.tar.gz%3BMYGH091706282107.tar.gz%3BAKTH091706282107.tar.gz%3BAOMH101706282107.tar.gz%3B&searchfile=SRCH1634542076edlize.com&listlength=4&datakind=kik&mag_1=0&mag_2=10&month_from=06&year_from=2017&month_to=06&year_to=2017&down_list%5B0%5D=NMRH02%40170628210806%40NMRH021706282107%40kik&down_list%5B1%5D=NMRH03%40170628210806%40NMRH031706282107%40kik&down_list%5B2%5D=NMRH04%40170628210805%40NMRH041706282107%40kik&down_list%5B3%5D=KSRH06%40170628210813%40KSRH061706282107%40kik&down_list%5B4%5D=NMRH05%40170628210809%40NMRH051706282107%40kik&down_list%5B5%5D=KSRH07%40170628210814%40KSRH071706282107%40kik&down_list%5B6%5D=IWTH02%40170628211006%40IWTH021706282107%40kik&down_list%5B7%5D=KSRH03%40170628210823%40KSRH031706282107%40kik&down_list%5B8%5D=KSRH04%40170628210810%40KSRH041706282107%40kik&down_list%5B9%5D=KSRH05%40170628210815%40KSRH051706282107%40kik&down_list%5B10%5D=AOMH16%40170628211001%40AOMH161706282107%40kik&down_list%5B11%5D=KSRH02%40170628210816%40KSRH021706282107%40kik&down_list%5B12%5D=NMRH01%40170628210806%40NMRH011706282107%40kik&down_list%5B13%5D=IWTH01%40170628211001%40IWTH011706282107%40kik&down_list%5B14%5D=IWTH12%40170628211001%40IWTH121706282107%40kik&down_list%5B15%5D=KSRH09%40170628210818%40KSRH091706282107%40kik&down_list%5B16%5D=AOMH17%40170628210957%40AOMH171706282107%40kik&down_list%5B17%5D=AOMH12%40170628210959%40AOMH121706282107%40kik&down_list%5B18%5D=KKWH08%40170628210831%40KKWH081706282107%40kik&down_list%5B19%5D=AOMH06%40170628210950%40AOMH061706282107%40kik&down_list%5B20%5D=AOMH11%40170628211001%40AOMH111706282107%40kik&down_list%5B21%5D=MYGH13%40170628211026%40MYGH131706282107%40kik&down_list%5B22%5D=ABSH09%40170628210808%40ABSH091706282107%40kik&down_list%5B23%5D=TKCH05%40170628210856%40TKCH051706282107%40kik&down_list%5B24%5D=ABSH12%40170628210812%40ABSH121706282107%40kik&down_list%5B25%5D=AOMH13%40170628210955%40AOMH131706282107%40kik&down_list%5B26%5D=ABSH11%40170628210815%40ABSH111706282107%40kik&down_list%5B27%5D=TKCH11%40170628210910%40TKCH111706282107%40kik&down_list%5B28%5D=IWTH22%40170628211016%40IWTH221706282107%40kik&down_list%5B29%5D=IBUH06%40170628210947%40IBUH061706282107%40kik&down_list%5B30%5D=IWTH04%40170628211017%40IWTH041706282107%40kik&down_list%5B31%5D=KSRH08%40170628210818%40KSRH081706282107%40kik&down_list%5B32%5D=IWTH08%40170628210953%40IWTH081706282107%40kik&down_list%5B33%5D=AOMH01%40170628210953%40AOMH011706282107%40kik&down_list%5B34%5D=IWTH27%40170628211018%40IWTH271706282107%40kik&down_list%5B35%5D=IWTH21%40170628211005%40IWTH211706282107%40kik&down_list%5B36%5D=AOMH18%40170628211006%40AOMH181706282107%40kik&down_list%5B37%5D=IWTH03%40170628211002%40IWTH031706282107%40kik&down_list%5B38%5D=IWTH15%40170628211015%40IWTH151706282107%40kik&down_list%5B39%5D=HDKH06%40170628210930%40HDKH061706282107%40kik&down_list%5B40%5D=HDKH07%40170628210914%40HDKH071706282107%40kik&down_list%5B41%5D=IWTH11%40170628211006%40IWTH111706282107%40kik&down_list%5B42%5D=KSRH01%40170628210818%40KSRH011706282107%40kik&down_list%5B43%5D=IWTH18%40170628211009%40IWTH181706282107%40kik&down_list%5B44%5D=AKTH04%40170628211029%40AKTH041706282107%40kik&down_list%5B45%5D=TKCH04%40170628210909%40TKCH041706282107%40kik&down_list%5B46%5D=TKCH03%40170628210823%40TKCH031706282107%40kik&down_list%5B47%5D=HDKH04%40170628210930%40HDKH041706282107%40kik&down_list%5B48%5D=IWTH20%40170628211026%40IWTH201706282107%40kik&down_list%5B49%5D=IWTH19%40170628211019%40IWTH191706282107%40kik&down_list%5B50%5D=IBUH01%40170628210933%40IBUH011706282107%40kik&down_list%5B51%5D=MYGH07%40170628211046%40MYGH071706282107%40kik&down_list%5B52%5D=IWTH23%40170628211009%40IWTH231706282107%40kik&down_list%5B53%5D=IWTH09%40170628210956%40IWTH091706282107%40kik&down_list%5B54%5D=IWTH17%40170628211005%40IWTH171706282107%40kik&down_list%5B55%5D=HDKH03%40170628210922%40HDKH031706282107%40kik&down_list%5B56%5D=IWTH13%40170628211002%40IWTH131706282107%40kik&down_list%5B57%5D=IWTH26%40170628211027%40IWTH261706282107%40kik&down_list%5B58%5D=ABSH07%40170628210910%40ABSH071706282107%40kik&down_list%5B59%5D=FKSH12%40170628211103%40FKSH121706282107%40kik&down_list%5B60%5D=IWTH16%40170628211016%40IWTH161706282107%40kik&down_list%5B61%5D=IWTH07%40170628210957%40IWTH071706282107%40kik&down_list%5B62%5D=TKCH01%40170628210820%40TKCH011706282107%40kik&down_list%5B63%5D=IWTH10%40170628211008%40IWTH101706282107%40kik&down_list%5B64%5D=MYGH04%40170628211026%40MYGH041706282107%40kik&down_list%5B65%5D=MYGH11%40170628211032%40MYGH111706282107%40kik&down_list%5B66%5D=IWTH24%40170628211024%40IWTH241706282107%40kik&down_list%5B67%5D=AKTH17%40170628211025%40AKTH171706282107%40kik&down_list%5B68%5D=HDKH05%40170628210918%40HDKH051706282107%40kik&down_list%5B69%5D=AOMH03%40170628210954%40AOMH031706282107%40kik&down_list%5B70%5D=OSMH02%40170628210957%40OSMH021706282107%40kik&down_list%5B71%5D=IBUH05%40170628210941%40IBUH051706282107%40kik&down_list%5B72%5D=ABSH15%40170628210830%40ABSH151706282107%40kik&down_list%5B73%5D=SRCH09%40170628210937%40SRCH091706282107%40kik&down_list%5B74%5D=FKSH20%40170628211056%40FKSH201706282107%40kik&down_list%5B75%5D=HDKH01%40170628210929%40HDKH011706282107%40kik&down_list%5B76%5D=ABSH06%40170628210821%40ABSH061706282107%40kik&down_list%5B77%5D=IKRH03%40170628210936%40IKRH031706282107%40kik&down_list%5B78%5D=KKWH14%40170628210929%40KKWH141706282107%40kik&down_list%5B79%5D=MYGH08%40170628211044%40MYGH081706282107%40kik&down_list%5B80%5D=MYGH06%40170628211032%40MYGH061706282107%40kik&down_list%5B81%5D=YMTH02%40170628211053%40YMTH021706282107%40kik&down_list%5B82%5D=IBUH02%40170628210932%40IBUH021706282107%40kik&down_list%5B83%5D=MYGH09%40170628211052%40MYGH091706282107%40kik&down_list%5B84%5D=AKTH09%40170628211019%40AKTH091706282107%40kik&down_list%5B85%5D=AOMH10%40170628211013%40AOMH101706282107%40kik&up_list=20170628210700%2C20170628210744%2C20170628000526%2C1%2CHPRL

修改 PHP 代码如下:

<?php
$command = 'curl --create-dirs -o "D:\downloads\kyoshin\kik\20170628210700.tar" -H "@header.txt" -d "@data.txt" "https://www.kyoshin.bosai.go.jp/cgi-bin/kyoshin/auth/makearc"';
exec($command);
最后更新 2021-10-21