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

Pull Requests

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: Thu Dec 26 14:01:30 2024 UTC