473,396 Members | 1,767 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,396 software developers and data experts.

Please heeeelp - CURL lib appends "0" to all output

Hi All,

I'm using the wonderful CURL lib to handle data between php-scripts in
the background. However, I am experiencing a problem: Whenever the
processed data is returned for output I see a '0' (zero) appended to
it.
I seem to be unable to get rid of it. I don't even know where this
zero comes from and why it is there. Any help greatly appreciated.

A simple example:

1.)
Script 1 handles some data (e.g. some form input) and sends it to
script 2.

2.)
Script 2 then processes the data and generates the output.

Here is a live demo which produces the output "test output". Just
click the following link and note the appended "0":
http://ulices.com/curl_test/script1.php

Script 1 looks like this:
=================

<?php
$url = "http://www.ulices.com/curl_test/script2.php";
$test_value = "test output";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"$url");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "test_value=$test_value");
curl_exec ($ch);
curl_close ($ch);
?>

Script 2 looks like this:
=================

<?php
$test_value = $_POST[test_value];
echo $test_value;
?>
Jul 17 '05 #1
0 1567

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

Similar topics

1
by: Eagle | last post by:
Hi All, I'm using the wonderful CURL lib to handle data between php-scripts in the background. However, I am experiencing a problem: Whenever the processed data is returned for output I see a...
3
by: Chris Fortune | last post by:
# uname -a Linux stargate.mxc-online.net 2.4.20-021stab022.2.777-smp #1 SMP Wed Jul 28 17:12:37 MSD 2004 i686 i686 i386 GNU/Linux I recompiled PHP with mcrypt, openssl, and curl phpinfo():...
0
by: João Santa Bárbara | last post by:
Hi all, i have this error "DataBinding could not find a row in the list that is suitable for all bindings" and this happens when i press my button to cancel using this...
9
by: Conrad F | last post by:
Hi, If any Microsoft people are listening.... Are there any plans for the new web language called "Curl" to be supported in .NET (ASP.NET)? I ask as Curl represents the first step to true OO...
4
by: KHaled | last post by:
Greetings all gurus of this group.. While the comments are appropriate as far as substance is concerned I really think it would be a little bit more helpful if in addition some meaningful...
6
by: Wescotte | last post by:
I'm writing a tiny php app that will log into our bank of america account and retrieve a file containing a list of checks that cleared the previous day. The problem I'm running into is when I...
4
by: stevong | last post by:
Hi everyone, I have a mailing list generated from php and sent out by mail(). But i often have broken graphics due to the fact that it randomly appends %20 to the html output! Anybody has...
5
by: ssprastogi | last post by:
what is server side programming?
5
by: mvmashraf | last post by:
Hi to all.... I have spent some time browsing for a solution to the following error but have unfortunatly not found any solution yet ,Please any help would be much appreciated.......
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.