diff --git a/examples/13-http-client-blocking.php b/examples/13-http-client-blocking.php index f0562c90..ae119b5a 100644 --- a/examples/13-http-client-blocking.php +++ b/examples/13-http-client-blocking.php @@ -4,16 +4,16 @@ require __DIR__ . '/../vendor/autoload.php'; -// connect to www.google.com:80 (blocking call!) +// connect to example.com:80 (blocking call!) // for illustration purposes only, should use react/socket instead -$stream = stream_socket_client('tcp://www.google.com:80'); +$stream = stream_socket_client('tcp://example.com:80'); if (!$stream) { exit(1); } stream_set_blocking($stream, false); // send HTTP request -fwrite($stream, "GET / HTTP/1.1\r\nHost: www.google.com\r\nConnection: close\r\n\r\n"); +fwrite($stream, "GET / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n"); // wait for HTTP response Loop::addReadStream($stream, function ($stream) { diff --git a/examples/14-http-client-async.php b/examples/14-http-client-async.php index 074a0eac..93419c02 100644 --- a/examples/14-http-client-async.php +++ b/examples/14-http-client-async.php @@ -7,7 +7,7 @@ // resolve hostname before establishing TCP/IP connection (resolving DNS is still blocking here) // for illustration purposes only, should use react/socket or react/dns instead! -$ip = gethostbyname('www.google.com'); +$ip = gethostbyname('example.com'); if (ip2long($ip) === false) { echo 'Unable to resolve hostname' . PHP_EOL; exit(1); @@ -41,7 +41,7 @@ } // send HTTP request - fwrite($stream, "GET / HTTP/1.1\r\nHost: www.google.com\r\nConnection: close\r\n\r\n"); + fwrite($stream, "GET / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n"); // wait for HTTP response Loop::addReadStream($stream, function ($stream) {