2020-02-11, 15:36
Hi, first sorry for the previous twice posting which were not working, may because the forum seem to be a little down at that times.
I'm trying to store some parameters on webserver which I can retrieve later in a script form, but can't get the '+' sign to be send / retrieve.
#!ipxe
set data_1:string some+thing
set data_2:uristring some+thing
params --name mydata
param --params mydata data_1 ${data_1}
param --params mydata data_2 ${data_2}
imgfetch http://webserver/conf.php##params=mydata || echo can't POST
//imgfetch http://webserver/conf.php?data_1=some+thing || echo can't GET
conf.php file from webserver :
<?php
$myfile = fopen("/var/www/html/mydata", "wb") or die("Unable to open file!");
fwrite($myfile, "#!ipxe\n");
//foreach ($_GET as $key => $value){
foreach ($_POST as $key => $value){
$txt = "set " . $key . "\t" . $value . "\n";
fwrite($myfile, $txt);
}
fclose($myfile);
?>
result of mydata file :
#!ipxe
set data_1 some thing
set data_2 some thing
I need this for URL like :
https://cloudfront.debian.net/cdimage/un...onfree.iso
Any ideas ?
I'm trying to store some parameters on webserver which I can retrieve later in a script form, but can't get the '+' sign to be send / retrieve.
#!ipxe
set data_1:string some+thing
set data_2:uristring some+thing
params --name mydata
param --params mydata data_1 ${data_1}
param --params mydata data_2 ${data_2}
imgfetch http://webserver/conf.php##params=mydata || echo can't POST
//imgfetch http://webserver/conf.php?data_1=some+thing || echo can't GET
conf.php file from webserver :
<?php
$myfile = fopen("/var/www/html/mydata", "wb") or die("Unable to open file!");
fwrite($myfile, "#!ipxe\n");
//foreach ($_GET as $key => $value){
foreach ($_POST as $key => $value){
$txt = "set " . $key . "\t" . $value . "\n";
fwrite($myfile, $txt);
}
fclose($myfile);
?>
result of mydata file :
#!ipxe
set data_1 some thing
set data_2 some thing
I need this for URL like :
https://cloudfront.debian.net/cdimage/un...onfree.iso
Any ideas ?