Php echo length problem
Moderator: General Moderators
Php echo length problem
Hi,
I have a problem with echo in PHP. When i am trying to print some status its printing length of that string before printing actual text.
I am using
echo "&P=1&Z=Description"
and its printing
12
&P=1&Z=Description
Here 12 is in hexa (18 Decimal) representing 18 chars printing.
I am using PHP version 4.3.2 .
I am using raw TCP socket connection with PHP on port 80 with web server. (Not using HTTP parsers/library)
For disabling this length printing is there any settings I need to change?
Pls Help me.
Thanks & Regards,
Sheshu Kumar Inguva.
I have a problem with echo in PHP. When i am trying to print some status its printing length of that string before printing actual text.
I am using
echo "&P=1&Z=Description"
and its printing
12
&P=1&Z=Description
Here 12 is in hexa (18 Decimal) representing 18 chars printing.
I am using PHP version 4.3.2 .
I am using raw TCP socket connection with PHP on port 80 with web server. (Not using HTTP parsers/library)
For disabling this length printing is there any settings I need to change?
Pls Help me.
Thanks & Regards,
Sheshu Kumar Inguva.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
I tried with single quotes, but its still printing number of chars . Its comming for every echo. we can clearly see in ethereal but not on browser. Is there any setting in php to stop this? or is there any functions to print only chars required without length of chars?
Thanks & Regards,
Sheshu Kumar Inguva.
Thanks & Regards,
Sheshu Kumar Inguva.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
These are three echos I am using
echo "<Z>R=" . $userStatus . "&E=" . date("mdy", $AppTableRow[0]);
echo "&P=" . CURRENT_APP_VERSION . "&Z=" . CURRENT_APP_DESC;
echo "</Z>";
output of these three echos in ethereal stream dump
f
<Z>R=6&E=081106
12
&P=1&Z=Description
4
</Z>
Before printing Echo text, it’s printing length of text. And I want to eliminate this length printing.
Thanks & Regards,
Sheshu Kumar Inguva.
echo "<Z>R=" . $userStatus . "&E=" . date("mdy", $AppTableRow[0]);
echo "&P=" . CURRENT_APP_VERSION . "&Z=" . CURRENT_APP_DESC;
echo "</Z>";
output of these three echos in ethereal stream dump
f
<Z>R=6&E=081106
12
&P=1&Z=Description
4
</Z>
Before printing Echo text, it’s printing length of text. And I want to eliminate this length printing.
Thanks & Regards,
Sheshu Kumar Inguva.
This is not ethereal decoding, Its stream view of all tcp packets(Right click-> Follow tcp stream). where ethereal will not write its material. And i am getting this in reading stream with my client. This is generated by php only.
With telnet also i am getting this length before string!
Thanks & Regards,
Sheshu Kumar Inguva.
With telnet also i am getting this length before string!
Thanks & Regards,
Sheshu Kumar Inguva.