Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-20-2014, 02:06 PM   #1
Registered: Aug 2012
Posts: 709

Rep: Reputation: Disabled
How does curl send a file to another program?

Please help me understand the following. My understanding is silently download the file at that URL, and pipe it to PHP? Does this make any sense? Thanks

curl -s | php
Old 09-20-2014, 02:52 PM   #2
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 493
Blog Entries: 2

Rep: Reputation: 156Reputation: 156
Piped commands take the input from stdout. Basically it takes the output that would usually be printed to the terminal, but sends it to the piped command as stdin.

This might explain it better:
Old 09-20-2014, 02:58 PM   #3
Registered: Aug 2012
Posts: 709

Original Poster
Rep: Reputation: Disabled
Thanks coralfang,

The part that confused me was why pass something to PHP? After thinking more about it, does this just download some PHP script, and then have PHP execute it? Same thing as downloading the file, putting it in my HTML directory, and pointing the browser at it?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't send file attachment with curl patapout Linux - Newbie 0 08-10-2012 05:34 PM
How to send sms using wget or curl ? bobbera Linux - General 5 01-15-2012 12:14 PM
cURL: Server has many IPs, how would I make a cURL script use those IPs to send data? guest Programming 0 04-11-2009 12:42 PM
Is there a way to send files to a friend, similar to MSN send file protocol? pablom Linux - Networking 1 05-07-2007 11:16 PM
in Pascal: how to exec a program, discard text output or send to text file Valkyrie_of_valhalla Programming 6 05-02-2007 10:50 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration