php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5849 fsockopen() buffers outgoing data
Submitted: 2000-07-29 02:31 UTC Modified: 2000-07-29 12:44 UTC
From: sean at dsnet dot net Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Redhat 6.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sean at dsnet dot net
New email:
PHP Version: OS:

 

 [2000-07-29 02:31 UTC] sean at dsnet dot net
I'm creating a IRC bot in PHP using fsockopen() but when I try to send data out like private messages and such, it only sends a few lines at a time then buffers. Once it finds more incoming data then it sends out another portion of what's in the buffer, so on and so forth. If I were to do fputs($socket,"msg\n") 10 times in a row, it wouldn't only actually output say 2,3 lines then stop and when more data came in it'd send a few more lines of it. I'm not sure what the problem is, I've tried to set_socket_block() to off, I've tried on as well and still no success.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-29 12:44 UTC] stas@php.net
Use fflush to flush the output.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 15:01:35 2025 UTC