Examples should not be indented like this, instead,
do this:
<?php
$sh = socket...
Regards,
Philip
> + <programlisting role="php">
> +<![CDATA[
> +<?php
> + $sh = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
> + if (socket_bind($sh, '127.0.0.1', 4242)) {
> + echo "Socket bound correctly";
> + }
> + $buf = 'Test Message';
> + $len = strlen($buf);
> + if (socket_sendto($sh, $buf, $len, 0x100, '192.168.0.2', 4242) !== FALSE) {
> + echo "Message sent correctly";
> + }
> + socket_close($sh);
> +?>
> +]]>
> + </programlisting>
> + </example>
> + <para>
> + See also
> + <function>socket_send</function> and
> + <function>socket_sendmsg</function>.
> </para>
> </refsect1>
> </refentry>
>
>
>
> --
> PHP Documentation Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php