php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: paramelle at jobpilot dot fr
New email:
PHP Version: OS:

 

 [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) : 
...
</table></center>
19f
<hr size=1 noshade>
<center>
[
<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
24 
tory</a>
]
</center>
</body></html>

0

### 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-09 07:59 UTC] wez@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC