473,666 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help please: CURL lib appends '0' (zero) 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.

I always see the output like this: output0

Any help greatly appreciated.

Eagle

(I very much appreciate your contributions.
Please do not reply to my email-address since it is deactivated due to tons of Spam I received.
Thanks a ton)
Jul 17 '05 #1
1 1828
Eagle <ea*********@ly cos.com> writes:
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.

I always see the output like this: output0


Are you doing something like "echo curl_exec($ch); " without setting
the CURLOPT_RETURNT RANSFER option to non-zero value? If so, then
you're printing the return value of curl_exec() after it prints its
own output.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
Jul 17 '05 #2

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

Similar topics

3
6324
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(): http://www.canadiandropshipping.com/hello.php3 Does anyone know why this ssl curl test fails? http://www.canadiandropshipping.com...t/diag_curl.php
0
1742
by: Sjaakie | last post by:
Hi there, I'm trying to get HTML_ToPDF (3.3) running on en dedicated server, safe_mode enabled. Been trying for more than 2 days now, without success. Have similar script running on my own personal server. Safe mode disabled. This is what I did so far: --- I copied html2ps, ps2pdf and curl into /opt/guide/www.domain.invalid/HTML/config/html2pdf/, directory also holds all HTML_ToPDF-files. Did chmod 777 to the specified folder.
6
4260
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 perform actions with php/CURL the output is different than when I use IE and I'm completely stumped as to why. The final output should list files available for retrieval but the CURL output displays an error/empty file message. Here is the curl...
1
3705
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am attach this script files and inq files. I cant understand this error. Please suggest me. You can talk with my yahoo id b_sahoo1@yahoo.com. Now i am online. Plz....Plz..Plz...
0
1513
by: jsaint | last post by:
I'm using php 5.1.2 on apache 2.0.54 and am trying to use curl to connect to an ssl server. Curl works fine using http, and the command-line client works with https. But, in php, I just get error 7 when trying to connect through https. So, the problem would seem to be with php's bundled curl support. I am on WinXP, and everything is installed through binaries. Here's an example of my code: $ch = curl_init("https://login.yahoo.com"); ...
3
2628
by: Chuck Renner | last post by:
Please help! This MIGHT even be a bug in PHP! I'll provide version numbers and site specific information (browser, OS, and kernel versions) if others cannot reproduce this problem. I'm running into some PHP behavior that I do not understand in PHP 5.1.2. I need to parse the HTML from the following carefully constructed URI:
1
1642
by: devranger | last post by:
Hello, I am in the process of learning PHP CURL and in doing some test examples I am having some issues with CURL that I do not fully understand. I am doing a test to use CURL to post and return results from "http://powersports.honda.com/dealer_locator/dealer_locator.asp" However it does not appear to be returning results from the CURL post action. What CURL appears to be doing is finding the page...
9
2021
by: devranger | last post by:
I am using the below CURL Function and can not figure out why it is not retruning the results from the post. Can anyone take a look and tell me what I may be doing wrong? I am just not seeing it. As you can see at the bottom of the script if (strstr($Line, 'HOUSTON YAMAHA MOTORSPORTS')) then it is reading the correct page, otherwise if (strstr($Line, 'Yamaha Dealer Locator')) then it is reading the incorrect page of the initial URL...
3
2621
by: k.rollman | last post by:
I am having a problem using cURL to create an https connection on a non-standard port (440). Using curl_setopt to set the port to 440 has no effect, and I get the following from curl's verbose output. * About to connect() to xxx.xxx.xxx.xxx port 443 * Connected to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 443 If I put ':440' in the url, I get the following and an error code of 7. * About to connect() to xxx.xxx.xxx.xxx port 440
0
8445
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8871
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8640
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.