We help IT Professionals succeed at work.
Get Started

cURL execution output to file

nokiamobile asked
Last Modified: 2012-05-05
I'm using curl in a php script.
Whene executed i can see on display details of requests but i can't save the outbut.

./myscript.php > output.txt
./myscript.php | tee output.txt

put in output.txt the standard output of myscript.php and, it doens't save the curl internal output.

The output that i would like to save is like this:

* About to connect() to test.com port 80 (#0)
*   Trying xx.xx.xx.201... * connected
* Connected to test.com (x.x.x.x) port 80 (#0)
> GET /A.html HTTP/1.1
Host: test.com
Accept: */*

< HTTP/1.1 200 OK
< Content-Type: text/html; charset=UTF-8
< Server: "Test"
< Last-Modified: Wed, 12 Nov 2008 10:08:01 GMT
< Expires: Thu, 20 Nov 2008 22:54:55 GMT
< Cache-Control: max-age=0, no-cache, no-store
< Pragma: no-cache
< Date: Thu, 20 Nov 2008 22:54:55 GMT
< Content-Length: 23715
< Connection: keep-alive

Watch Question
Top Expert 2005
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE