Does the Fetch tool allow HTTP post?
or is it FTP only?
Would like to update some stats from behind a massive firewall.
Nevermind, I’ve already tested, It doesn’t work.
Can we have a look at adding this as a feature request, Being able to HTTP Post from the routerboard would be good, All sorts of things, Upload of Scans saved to files (Pending Feature), Config uploads, Stats monitoring
it work for me:
/tool fetch keep-result=no url=“http://192.168.39.19//links/statins.php?status=industr11;down”
statins.php [----] 2 L:[ 1+ 1 2/ 17] *(8 / 561b) 0115 0x073 UTF-8
<?php
$lstat=$_GET['status'];
//$lstat="equant;down";
if (isset($lstat)){
$linfo=split (";", $lstat, 2);
// print $linfo[0]."\n";
// print $linfo[1]."\n";
$db = mysql_connect('localhost', 'user', 'passwork') or die ("Ups!");
mysql_select_db("linkstat",$db) or die ("Ups!");
$result = mysql_query("INSERT INTO `linkstat`.`links` (`name` ,`dtime` ,`status`)VALUES ( '$linfo[0]' , NOW( ) , '$linfo[1]') ") or die( mysql_error()
// print $result."\n";
print "<p>Accept</p>";
}else{
print "<p>Not accepted!</p>";
}
?>
That’s an HTTP GET. The question was about an HTTP POST. And the answer appears to be, no, it can GET but not POST.