HTTP Request from inside WASM using php-wasm

This example uses php-wasm.

See the output in browser developer console.

Actual code:


$url = 'https://httpbin.org/anything';

$window = new Vrzno();
$window->fetch($url)
->then(function($res) { return $res->text(); })
->then(function($txt) { echo($txt); });

Info