linux sh 脚本获取命令结果变变量然后post

  

mylog=`v***ray info |grep -E "v****+"`  #  ``是tab上面的那个键,另外还有一种自己百度吧,我喜欢这种。
curl -d "url=$mylog" 'http://www.xxxxx.cn/tijiao.php'

 

tijiao.php 写文件方便查看。

<?php
$myfile = fopen("vrayurl.txt", "a") or die("Unable to open file!");
$txt = $_POST['url'];
fwrite($myfile, $txt."\n");
fclose($myfile);
?>

posted on 2020-09-08 17:21  hackermi  阅读(449)  评论(0编辑  收藏  举报

导航