|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16452 using fgets or fread with fsockopen returns strange numbers
Submitted: 2002-04-05 11:11 UTC Modified: 2002-04-09 07:59 UTC
From: paramelle at jobpilot dot fr Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.1.2 OS: linux
Private report: No CVE-ID: None
 [2002-04-05 11:11 UTC] paramelle at jobpilot dot fr
I open an url with fsockopen and when I read socket
with fread or fgets it sometimes return hexadecimal numbers.
(which appears to be the number of characters to the next 'strange number')
The output looks like this (numbers : 19f, 24, 0) : 
<hr size=1 noshade>
<a href="/" target=_top>Home</a> |
<a href="/verschlagwortung/swneu.php3">Categorize</a> |
<a href="/content/docs/categorize_help.html" target=_blank>Categorization Help</a> |
<a href="/verschlagwortung/make_adds/templates.php3">Templates</a> |
<a href="/archiv/kundeninfo.php3">Customer Info</a> |
<a href="/ShowNewAnzeigen.php3">Final Check</a> |
<a href="/ShowTemp.php3">Temp Direc


### end of output ###

when I read the file with fopen it works better but in this case I don't want to use fopen.

Good luck


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-09 07:59 UTC]
Sounds like chunked HTTP output.
Try using telnet to do the same thing that your script
is doing; you should see the same output.
Marking this as bogus, since it is not PHP's fault: it's
a valid HTTP response.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 10:03:44 2023 UTC