changed domainname in samples

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@77485 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Georg Richter 2002-04-10 07:33:17 +00:00
parent 07188db4ca
commit 65377f9f76

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.60 $ -->
<!-- $Revision: 1.61 $ -->
<reference id="ref.network">
<title>Network Functions</title>
<titleabbrev>Network</titleabbrev>
@ -201,11 +201,11 @@
<programlisting role="php">
<![CDATA[
<?php
$fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30);
$fp = fsockopen ("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs ($fp, "GET / HTTP/1.0\r\nHost: www.php.net\r\n\r\n");
fputs ($fp, "GET / HTTP/1.0\r\nHost: www.example.com\r\n\r\n");
while (!feof($fp)) {
echo fgets ($fp,128);
}
@ -486,9 +486,9 @@ if (!$fp) {
<programlisting role="php">
<![CDATA[
<?php
$ip = gethostbyname("www.php.net");
$ip = gethostbyname("www.example.com");
$out = "The following URLs are equivalent:<br>\n";
$out .= "http://www.php.net/, http://".$ip."/, and http://".sprintf("%u",ip2long($ip))."/<br>\n";
$out .= "http://www.example.com/, http://".$ip."/, and http://".sprintf("%u",ip2long($ip))."/<br>\n";
echo $out;
?>
]]>
@ -509,7 +509,7 @@ echo $out;
<programlisting role="php">
<![CDATA[
<?php
$ip = gethostbyname("www.php.net");
$ip = gethostbyname("www.example.com");
printf("%u\n", ip2long($ip));
echo $out;
?>
@ -826,7 +826,7 @@ echo $out;
<programlisting role="php">
<![CDATA[
<?php
$fp = fsockopen("www.php.net", 80);
$fp = fsockopen("www.example.com", 80);
if(!$fp) {
echo "Unable to open\n";
} else {