Url creato alle 9:40 AM cesserà di esistere tra 23 ore e 33 minuti
queste 3 righe inviano la stringa, la risposta avviene aprendo un altra pagina che visualizzano
l'indirizzo e il dato inviato sulla barra (pessima idea)
<?php
$url='http://sim3608.agni.lindenlab.com:12046/cap/0de21760-fe9a-f69a-553c-82f71d5ba52b';
$message = '1,2,3,4,5';
header ("Location: $url/?$message");
?>
ho provato il seguente, ma non riesco a inserire correttamente l'indirizzo
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>
stessa cosa con questo
<?php
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
...
$output = curl_exec($ch);
$info = curl_getinfo($ch);
if ($output === false || $info['http_code'] != 200) {
$output = "No cURL data returned for $url [". $info['http_code']. "]";
if (curl_error($ch))
$output .= "\n". curl_error($ch);
}
else {
// 'OK' status; format $output data if necessary here:
...
}
// then return or display the single string $output
?>
questo è lo script test che riceve il dato
string my_url;
key http_request_id;
default
{
state_entry()
{
llRequestURL();
}
http_request(key id, string method, string body)
{
if (method == URL_REQUEST_GRANTED)
{
my_url = body;
llOwnerSay("URL : " + my_url);
}
else if (method == URL_REQUEST_DENIED)
{
llOwnerSay("Errore: URL. " + body);
}
else if (method == "GET")
{
string text = llGetHTTPHeader(id, "x-query-string");
llOwnerSay("dato ricevuto: "+(string)text);
llHTTPResponse(id,200,my_url+ " : dato ricevuto "+ (string)text);
}
else
{
llHTTPResponse(id,405,"Unsupported Method");
llOwnerSay("web non trovato");
}
}
http_response(key request_id, integer status, list metadata, string body)
{
if (request_id == http_request_id)
{
llInstantMessage(llGetOwner(), body);
}
}
}

Rispondi quotando