473,385 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

HTTP POST problem

Hi friends,

I am using PHP version 4.2 in RHEL4 system.

I am sending multipart binary data using libcurl from client
application and a php script at the server side recieves it. But
unfortunately the data received through $_POST variable is truncated at
the first instance of NULL character.
-> I cannot use base64 encoding as this is performance intensive and
client application is lightweight. We cannot afford this.
-> there seem to be no way access raw http data since client is
sending multipart data.

Is there any way I can be able to access http raw data or correct
binary data..?

Any help in this regards are ihighly appreciated.

Thanks.
~Kuamar

Mar 6 '06 #1
2 1643
I am using PHP version 4.2 in RHEL4 system. I am sending multipart binary data using libcurl from client
application and a php script at the server side recieves it. But
unfortunately the data received through $_POST variable is truncated at
the first instance of NULL character.
-> I cannot use base64 encoding as this is performance intensive and
client application is lightweight. We cannot afford this.
-> there seem to be no way access raw http data since client is
sending multipart data. Is there any way I can be able to access http raw data or correct
binary data..?


Try recoding to use PUT instead of POST:

<http://www.php.net/manual/en/features.file-upload.put-method.php>

---
Steve

Mar 6 '06 #2
Hello,

on 03/06/2006 11:02 AM kumar said the following:
I am sending multipart binary data using libcurl from client
application and a php script at the server side recieves it. But
unfortunately the data received through $_POST variable is truncated at
the first instance of NULL character.
-> I cannot use base64 encoding as this is performance intensive and
client application is lightweight. We cannot afford this.
-> there seem to be no way access raw http data since client is
sending multipart data.

Is there any way I can be able to access http raw data or correct
binary data..?


You may want to try this HTTP client class that supports uploading
binary files.

http://www.phpclasses.org/httpclient
--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Mar 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: SPG | last post by:
Hi, I have a servlet application that I am trying to write a very basic load tester for. There application has several servlets, but all rely on the same session being used (IE: For logged in...
1
by: Erik Johnson | last post by:
Hi, I am trying to spawn a daemon type program to go off on its own and do some work (asynchoronously) from within an HTTPServer, but I am running into a problem where the web browser (actually...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
0
by: Owen | last post by:
Hello everyone, I am using VS.NET 2003(Trandition Chinese) Edition, and httpLook software for checking http requests. I found a problem that the following programs don't really "POST". These...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
0
by: Hitchkas | last post by:
I posted this question in PocketPC newsgroup with no answer. Hopefully somebody in this newsgroup can help me. I have problem with HTTP post in Compact Framework. The code below is a function...
5
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
3
by: JansenH | last post by:
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a webserver. This is working fine if the post rate is one post for every 20 seconds. But if the post rate is increased to...
4
by: CindyH | last post by:
Hi: I have the following code: Dim url As String = "http://xx01xx01:800/some.ashx" Dim myrequest As System.Net.WebRequest = Nothing Dim myresponse As System.Net.WebResponse = Nothing...
6
by: CindyH | last post by:
Hi I'm not sure whether I should send this as a new message or use the one I've been using but... I'm using vb.net 2.0 - My problem is I need to send something like this: 'dim encodedstring =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.