didou Mon Dec 15 11:52:21 2003 EDT
Modified files: /phpdoc/en/reference/network/functions dns-get-record.xml fsockopen.xml gethostbyaddr.xml gethostbyname.xml getprotobyname.xml getservbyname.xml ip2long.xml syslog.xml /phpdoc/en/reference/nis/functions yp-master.xml yp-next.xml yp-order.xml Log: Merry XHTML and CS compliant christmas all \!
Index: phpdoc/en/reference/network/functions/dns-get-record.xml diff -u phpdoc/en/reference/network/functions/dns-get-record.xml:1.16 phpdoc/en/reference/network/functions/dns-get-record.xml:1.17 --- phpdoc/en/reference/network/functions/dns-get-record.xml:1.16 Wed Nov 5 18:13:37 2003 +++ phpdoc/en/reference/network/functions/dns-get-record.xml Mon Dec 15 11:52:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <refentry id="function.dns-get-record"> <refnamediv> <refname>dns_get_record</refname> @@ -241,11 +241,13 @@ $result = dns_get_record("php.net"); print_r($result); ?> - -/* -Produces ouput similar to the following: ----------------------------------------- - +]]> + </programlisting> + <para> + Produces ouput similar to the following: + </para> + <screen> +<![CDATA[ Array ( [0] => Array @@ -268,9 +270,8 @@ ) ) -*/ ]]> - </programlisting> + </screen> </example> <simpara> Since it's very common to want the IP address of a mail server @@ -290,19 +291,21 @@ containing list of name servers and any additional records which go with them */ -$result = dns_get_record("php.net",DNS_ANY,$authns,$addtl); -print "Result = "; +$result = dns_get_record("php.net", DNS_ANY, $authns, $addtl); +echo "Result = "; print_r($result); -print "Auth NS = "; +echo "Auth NS = "; print_r($authns); -print "Additional = "; +echo "Additional = "; print_r($addtl); ?> - -/* -Produces output similar to the following: ------------------------------------------ - +]]> + </programlisting> + <para> + Produces output similar to the following: + </para> + <screen> +<![CDATA[ Result = Array ( [0] => Array @@ -412,9 +415,8 @@ ) ) -*/ ]]> - </programlisting> + </screen> </example> <simpara> See also Index: phpdoc/en/reference/network/functions/fsockopen.xml diff -u phpdoc/en/reference/network/functions/fsockopen.xml:1.10 phpdoc/en/reference/network/functions/fsockopen.xml:1.11 --- phpdoc/en/reference/network/functions/fsockopen.xml:1.10 Sat Dec 13 16:21:07 2003 +++ phpdoc/en/reference/network/functions/fsockopen.xml Mon Dec 15 11:52:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <!-- splitted from ./en/functions/network.xml, last change in rev 1.2 --> <refentry id="function.fsockopen"> <refnamediv> @@ -74,19 +74,19 @@ <programlisting role="php"> <![CDATA[ <?php -$fp = fsockopen ("www.example.com", 80, $errno, $errstr, 30); +$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30); if (!$fp) { - echo "$errstr ($errno)<br>\n"; + echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: www.example.com\r\n"; $out .= "Connection: Close\r\n\r\n"; - fputs ($fp, $out); + fputs($fp, $out); while (!feof($fp)) { - echo fgets ($fp,128); + echo fgets($fp,128); } - fclose ($fp); + fclose($fp); } ?> ]]> @@ -101,9 +101,9 @@ <?php $fp = fsockopen("udp://127.0.0.1", 13, $errno, $errstr); if (!$fp) { - echo "ERROR: $errno - $errstr<br>\n"; + echo "ERROR: $errno - $errstr<br />\n"; } else { - fwrite($fp,"\n"); + fwrite($fp, "\n"); echo fread($fp, 26); fclose($fp); } Index: phpdoc/en/reference/network/functions/gethostbyaddr.xml diff -u phpdoc/en/reference/network/functions/gethostbyaddr.xml:1.5 phpdoc/en/reference/network/functions/gethostbyaddr.xml:1.6 --- phpdoc/en/reference/network/functions/gethostbyaddr.xml:1.5 Fri Feb 14 20:05:22 2003 +++ phpdoc/en/reference/network/functions/gethostbyaddr.xml Mon Dec 15 11:52:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/network.xml, last change in rev 1.2 --> <refentry id="function.gethostbyaddr"> <refnamediv> @@ -27,7 +27,7 @@ <?php $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); -print $hostname; +echo $hostname; ?> ]]> </programlisting> Index: phpdoc/en/reference/network/functions/gethostbyname.xml diff -u phpdoc/en/reference/network/functions/gethostbyname.xml:1.8 phpdoc/en/reference/network/functions/gethostbyname.xml:1.9 --- phpdoc/en/reference/network/functions/gethostbyname.xml:1.8 Sat Jun 7 01:48:15 2003 +++ phpdoc/en/reference/network/functions/gethostbyname.xml Mon Dec 15 11:52:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/network.xml, last change in rev 1.2 --> <refentry id="function.gethostbyname"> <refnamediv> @@ -27,7 +27,7 @@ <?php $ip = gethostbyname('www.example.com'); -print $ip; +echo $ip; ?> ]]> </programlisting> Index: phpdoc/en/reference/network/functions/getprotobyname.xml diff -u phpdoc/en/reference/network/functions/getprotobyname.xml:1.3 phpdoc/en/reference/network/functions/getprotobyname.xml:1.4 --- phpdoc/en/reference/network/functions/getprotobyname.xml:1.3 Sat Aug 16 12:25:32 2003 +++ phpdoc/en/reference/network/functions/getprotobyname.xml Mon Dec 15 11:52:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/network.xml, last change in rev 1.2 --> <refentry id="function.getprotobyname"> <refnamediv> @@ -27,11 +27,11 @@ <?php $protocol = 'tcp'; $get_prot = getprotobyname($protocol); -if ( $get_prot == -1 ) { +if ($get_prot == -1) { // if nothing found, returns -1 - print 'Invalid Protocol'; + echo 'Invalid Protocol'; } else { - print 'Protocol #'.$get_prot; + echo 'Protocol #' . $get_prot; } ?> ]]> Index: phpdoc/en/reference/network/functions/getservbyname.xml diff -u phpdoc/en/reference/network/functions/getservbyname.xml:1.3 phpdoc/en/reference/network/functions/getservbyname.xml:1.4 --- phpdoc/en/reference/network/functions/getservbyname.xml:1.3 Sat Aug 16 12:43:53 2003 +++ phpdoc/en/reference/network/functions/getservbyname.xml Mon Dec 15 11:52:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/network.xml, last change in rev 1.2 --> <refentry id="function.getservbyname"> <refnamediv> @@ -32,9 +32,9 @@ $services = array('http', 'ftp', 'ssh', 'telnet', 'imap', 'smtp', 'nicname', 'gopher', 'finger', 'pop3', 'www'); -foreach($services as $service) { +foreach ($services as $service) { $port = getservbyname($service, 'tcp'); - echo $service . ": " . $port . "<br>\n"; + echo $service . ": " . $port . "<br />\n"; } ?> ]]> Index: phpdoc/en/reference/network/functions/ip2long.xml diff -u phpdoc/en/reference/network/functions/ip2long.xml:1.3 phpdoc/en/reference/network/functions/ip2long.xml:1.4 --- phpdoc/en/reference/network/functions/ip2long.xml:1.3 Tue Apr 29 18:57:38 2003 +++ phpdoc/en/reference/network/functions/ip2long.xml Mon Dec 15 11:52:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/network.xml, last change in rev 1.18 --> <refentry id="function.ip2long"> <refnamediv> @@ -27,8 +27,8 @@ <![CDATA[ <?php $ip = gethostbyname("www.example.com"); -$out = "The following URLs are equivalent:<br>\n"; -$out .= "http://www.example.com/, http://".$ip."/, and http://".sprintf("%u",ip2long($ip))."/<br>\n"; +$out = "The following URLs are equivalent:<br />\n"; +$out .= "http://www.example.com/, http://" . $ip . "/, and http://" . sprintf("%u", ip2long($ip)) . "/<br />\n"; echo $out; ?> ]]> @@ -53,10 +53,10 @@ $long = ip2long($ip); if ($long === -1) { - print "Invalid IP, please try again"; + echo "Invalid IP, please try again"; } else { - print $ip . "\n"; // 192.0.34.166 - print $long . "\n"; // -1073732954 + echo $ip . "\n"; // 192.0.34.166 + echo $long . "\n"; // -1073732954 printf("%u\n", ip2long($ip)); // 3221234342 } ?> Index: phpdoc/en/reference/network/functions/syslog.xml diff -u phpdoc/en/reference/network/functions/syslog.xml:1.4 phpdoc/en/reference/network/functions/syslog.xml:1.5 --- phpdoc/en/reference/network/functions/syslog.xml:1.4 Sun Jan 19 14:52:02 2003 +++ phpdoc/en/reference/network/functions/syslog.xml Mon Dec 15 11:52:20 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/network.xml, last change in rev 1.9 --> <refentry id="function.syslog"> <refnamediv> @@ -90,7 +90,7 @@ // unauthorized client! // log the attempt $access = date("Y/m/d H:i:s"); - syslog(LOG_WARNING,"Unauthorized client: $access $REMOTE_ADDR ($HTTP_USER_AGENT)"); + syslog(LOG_WARNING, "Unauthorized client: $access $REMOTE_ADDR ($HTTP_USER_AGENT)"); } closelog(); Index: phpdoc/en/reference/nis/functions/yp-master.xml diff -u phpdoc/en/reference/nis/functions/yp-master.xml:1.3 phpdoc/en/reference/nis/functions/yp-master.xml:1.4 --- phpdoc/en/reference/nis/functions/yp-master.xml:1.3 Tue Nov 18 08:05:34 2003 +++ phpdoc/en/reference/nis/functions/yp-master.xml Mon Dec 15 11:52:21 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 --> <refentry id="function.yp-master"> <refnamediv> @@ -25,7 +25,7 @@ <programlisting role="php"> <![CDATA[ <?php -$number = yp_master ($domain, $mapname); +$number = yp_master($domain, $mapname); echo "Master for this map is: " . $master; ?> ]]> Index: phpdoc/en/reference/nis/functions/yp-next.xml diff -u phpdoc/en/reference/nis/functions/yp-next.xml:1.4 phpdoc/en/reference/nis/functions/yp-next.xml:1.5 --- phpdoc/en/reference/nis/functions/yp-next.xml:1.4 Thu Dec 11 10:42:10 2003 +++ phpdoc/en/reference/nis/functions/yp-next.xml Mon Dec 15 11:52:21 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 --> <refentry id="function.yp-next"> <refnamediv> @@ -25,14 +25,14 @@ <programlisting role="php"> <![CDATA[ <?php -$entry = yp_next ($domain, "passwd.byname", "joe"); +$entry = yp_next($domain, "passwd.byname", "joe"); if (!$entry) { echo "No more entries found\n"; echo "<!--" . yp_errno() . ": " . yp_err_string() . "-->"; } -$key = key ($entry); +$key = key($entry); echo "The next entry after joe has key " . $key . " and value " . $entry[$key]; Index: phpdoc/en/reference/nis/functions/yp-order.xml diff -u phpdoc/en/reference/nis/functions/yp-order.xml:1.3 phpdoc/en/reference/nis/functions/yp-order.xml:1.4 --- phpdoc/en/reference/nis/functions/yp-order.xml:1.3 Tue Nov 18 08:05:34 2003 +++ phpdoc/en/reference/nis/functions/yp-order.xml Mon Dec 15 11:52:21 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/nis.xml, last change in rev 1.2 --> <refentry id="function.yp-order"> <refnamediv> @@ -23,7 +23,7 @@ <programlisting role="php"> <![CDATA[ <?php - $number = yp_order($domain,$mapname); + $number = yp_order($domain, $mapname); echo "Order number for this map is: " . $number; ?> ]]>