previousNet_Socket::writeLine() (Previous) (Next) Net_Traceroutenext

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

例 – Net_Socket の使用法

Example

データの送受信

<?php
$socket 
= new Net_Socket() ;

// 接続を確立する
$socket->connect("http://www.example.com"80true30);

// 改行を含むデータを送信する
$socket->writeLine("String with data");

// 改行が現れるまでデータを受信する
$result $socket->readLine();

// 指定したサイズのデータを受信する
$result $socket->read(512);

// 接続を切断する
$socket->disconnect();
?>
previousNet_Socket::writeLine() (Previous) (Next) Net_Traceroutenext

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.