What does this curl command do?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm really new to Unix and I can't figure out what this command does. From what I understand, it sends an HTTP POST request to a website. I don't know exactly what each line is supposed to do. What is the function of each line?



Here's the command:



curl http://www.example.com/xmlrpc.php -d 
'
pingback.ping
http://destination.site.com/

http://www.example.com/
'









share|improve this question
























  • What it does entirely depends on xmlrpc.php. You are sending data as part of the POST request, but it's up to xmlrpc.php to interpret that data as grounds for action.

    – Chris Down
    Jan 27 '14 at 3:28












  • @ChrisDown Okay, I see. What exactly do the ' ' do? I'm guessing they're equivalent to brackets in programming?

    – Sedulous
    Jan 27 '14 at 3:36


















0















I'm really new to Unix and I can't figure out what this command does. From what I understand, it sends an HTTP POST request to a website. I don't know exactly what each line is supposed to do. What is the function of each line?



Here's the command:



curl http://www.example.com/xmlrpc.php -d 
'
pingback.ping
http://destination.site.com/

http://www.example.com/
'









share|improve this question
























  • What it does entirely depends on xmlrpc.php. You are sending data as part of the POST request, but it's up to xmlrpc.php to interpret that data as grounds for action.

    – Chris Down
    Jan 27 '14 at 3:28












  • @ChrisDown Okay, I see. What exactly do the ' ' do? I'm guessing they're equivalent to brackets in programming?

    – Sedulous
    Jan 27 '14 at 3:36














0












0








0








I'm really new to Unix and I can't figure out what this command does. From what I understand, it sends an HTTP POST request to a website. I don't know exactly what each line is supposed to do. What is the function of each line?



Here's the command:



curl http://www.example.com/xmlrpc.php -d 
'
pingback.ping
http://destination.site.com/

http://www.example.com/
'









share|improve this question
















I'm really new to Unix and I can't figure out what this command does. From what I understand, it sends an HTTP POST request to a website. I don't know exactly what each line is supposed to do. What is the function of each line?



Here's the command:



curl http://www.example.com/xmlrpc.php -d 
'
pingback.ping
http://destination.site.com/

http://www.example.com/
'






curl






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 9 at 13:25









Rui F Ribeiro

41.9k1483142




41.9k1483142










asked Jan 27 '14 at 3:27









SedulousSedulous

6113




6113












  • What it does entirely depends on xmlrpc.php. You are sending data as part of the POST request, but it's up to xmlrpc.php to interpret that data as grounds for action.

    – Chris Down
    Jan 27 '14 at 3:28












  • @ChrisDown Okay, I see. What exactly do the ' ' do? I'm guessing they're equivalent to brackets in programming?

    – Sedulous
    Jan 27 '14 at 3:36


















  • What it does entirely depends on xmlrpc.php. You are sending data as part of the POST request, but it's up to xmlrpc.php to interpret that data as grounds for action.

    – Chris Down
    Jan 27 '14 at 3:28












  • @ChrisDown Okay, I see. What exactly do the ' ' do? I'm guessing they're equivalent to brackets in programming?

    – Sedulous
    Jan 27 '14 at 3:36

















What it does entirely depends on xmlrpc.php. You are sending data as part of the POST request, but it's up to xmlrpc.php to interpret that data as grounds for action.

– Chris Down
Jan 27 '14 at 3:28






What it does entirely depends on xmlrpc.php. You are sending data as part of the POST request, but it's up to xmlrpc.php to interpret that data as grounds for action.

– Chris Down
Jan 27 '14 at 3:28














@ChrisDown Okay, I see. What exactly do the ' ' do? I'm guessing they're equivalent to brackets in programming?

– Sedulous
Jan 27 '14 at 3:36






@ChrisDown Okay, I see. What exactly do the ' ' do? I'm guessing they're equivalent to brackets in programming?

– Sedulous
Jan 27 '14 at 3:36











1 Answer
1






active

oldest

votes


















1














This is most likely a Wordpress website. The xmlrpc.php script is a PHP script that provides remote procedure calls (hence the rpc in the name) which allow you to run things on the server. These are just like methods in a Class.



Examples



<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param>
<value><string>http://.source./</string></value>
</param>
<param>
<value><string>http://.target./</string></value>
</param>
</params>
</methodCall>


When you call the URL in your example, you're calling the pingback.ping method and providing the URLs after the call as arguments to this method. The 1st URL is the source URL of the pingback while the 2nd is the target URL.



curl's -d switch



From curl's man page:



-d/--data <data>
(HTTP) Sends the specified data in a POST request to the HTTP server,
in a way that can emulate as if a user has filled in a HTML form and
pressed the submit button. Note that the data is sent exactly
as specified with no extra processing (with all newlines cut off).
The data is expected to be "url-encoded". This will cause curl to pass
the data to the server using the content-type
application/x-www-form-urlencoded. Compare to -F/--form. If this
option is used more than once on the same command line, the data
pieces specified will be merged together with a separating &-letter.
Thus, using ’-d name=daniel -d skill=lousy’ would generate a post
chunk that looks like ’name=daniel&skill=lousy’.

If you start the data with the letter @, the rest should be a
file name to read the data from, or - if you want curl to read the
data from stdin. The contents of the file must already be
url-encoded. Multiple files can also be specified. Posting data from a
file named ’foobar’ would thus be done with --data @foobar".

To post data purely binary, you should instead use the --data-binary
option.

-d/--data is the same as --data-ascii.

If this option is used several times, the ones following the first
will append data.





share|improve this answer























  • @Sedulous - glad to of helped. Thanks for the Q.

    – slm
    Jan 27 '14 at 4:34











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f111076%2fwhat-does-this-curl-command-do%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














This is most likely a Wordpress website. The xmlrpc.php script is a PHP script that provides remote procedure calls (hence the rpc in the name) which allow you to run things on the server. These are just like methods in a Class.



Examples



<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param>
<value><string>http://.source./</string></value>
</param>
<param>
<value><string>http://.target./</string></value>
</param>
</params>
</methodCall>


When you call the URL in your example, you're calling the pingback.ping method and providing the URLs after the call as arguments to this method. The 1st URL is the source URL of the pingback while the 2nd is the target URL.



curl's -d switch



From curl's man page:



-d/--data <data>
(HTTP) Sends the specified data in a POST request to the HTTP server,
in a way that can emulate as if a user has filled in a HTML form and
pressed the submit button. Note that the data is sent exactly
as specified with no extra processing (with all newlines cut off).
The data is expected to be "url-encoded". This will cause curl to pass
the data to the server using the content-type
application/x-www-form-urlencoded. Compare to -F/--form. If this
option is used more than once on the same command line, the data
pieces specified will be merged together with a separating &-letter.
Thus, using ’-d name=daniel -d skill=lousy’ would generate a post
chunk that looks like ’name=daniel&skill=lousy’.

If you start the data with the letter @, the rest should be a
file name to read the data from, or - if you want curl to read the
data from stdin. The contents of the file must already be
url-encoded. Multiple files can also be specified. Posting data from a
file named ’foobar’ would thus be done with --data @foobar".

To post data purely binary, you should instead use the --data-binary
option.

-d/--data is the same as --data-ascii.

If this option is used several times, the ones following the first
will append data.





share|improve this answer























  • @Sedulous - glad to of helped. Thanks for the Q.

    – slm
    Jan 27 '14 at 4:34















1














This is most likely a Wordpress website. The xmlrpc.php script is a PHP script that provides remote procedure calls (hence the rpc in the name) which allow you to run things on the server. These are just like methods in a Class.



Examples



<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param>
<value><string>http://.source./</string></value>
</param>
<param>
<value><string>http://.target./</string></value>
</param>
</params>
</methodCall>


When you call the URL in your example, you're calling the pingback.ping method and providing the URLs after the call as arguments to this method. The 1st URL is the source URL of the pingback while the 2nd is the target URL.



curl's -d switch



From curl's man page:



-d/--data <data>
(HTTP) Sends the specified data in a POST request to the HTTP server,
in a way that can emulate as if a user has filled in a HTML form and
pressed the submit button. Note that the data is sent exactly
as specified with no extra processing (with all newlines cut off).
The data is expected to be "url-encoded". This will cause curl to pass
the data to the server using the content-type
application/x-www-form-urlencoded. Compare to -F/--form. If this
option is used more than once on the same command line, the data
pieces specified will be merged together with a separating &-letter.
Thus, using ’-d name=daniel -d skill=lousy’ would generate a post
chunk that looks like ’name=daniel&skill=lousy’.

If you start the data with the letter @, the rest should be a
file name to read the data from, or - if you want curl to read the
data from stdin. The contents of the file must already be
url-encoded. Multiple files can also be specified. Posting data from a
file named ’foobar’ would thus be done with --data @foobar".

To post data purely binary, you should instead use the --data-binary
option.

-d/--data is the same as --data-ascii.

If this option is used several times, the ones following the first
will append data.





share|improve this answer























  • @Sedulous - glad to of helped. Thanks for the Q.

    – slm
    Jan 27 '14 at 4:34













1












1








1







This is most likely a Wordpress website. The xmlrpc.php script is a PHP script that provides remote procedure calls (hence the rpc in the name) which allow you to run things on the server. These are just like methods in a Class.



Examples



<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param>
<value><string>http://.source./</string></value>
</param>
<param>
<value><string>http://.target./</string></value>
</param>
</params>
</methodCall>


When you call the URL in your example, you're calling the pingback.ping method and providing the URLs after the call as arguments to this method. The 1st URL is the source URL of the pingback while the 2nd is the target URL.



curl's -d switch



From curl's man page:



-d/--data <data>
(HTTP) Sends the specified data in a POST request to the HTTP server,
in a way that can emulate as if a user has filled in a HTML form and
pressed the submit button. Note that the data is sent exactly
as specified with no extra processing (with all newlines cut off).
The data is expected to be "url-encoded". This will cause curl to pass
the data to the server using the content-type
application/x-www-form-urlencoded. Compare to -F/--form. If this
option is used more than once on the same command line, the data
pieces specified will be merged together with a separating &-letter.
Thus, using ’-d name=daniel -d skill=lousy’ would generate a post
chunk that looks like ’name=daniel&skill=lousy’.

If you start the data with the letter @, the rest should be a
file name to read the data from, or - if you want curl to read the
data from stdin. The contents of the file must already be
url-encoded. Multiple files can also be specified. Posting data from a
file named ’foobar’ would thus be done with --data @foobar".

To post data purely binary, you should instead use the --data-binary
option.

-d/--data is the same as --data-ascii.

If this option is used several times, the ones following the first
will append data.





share|improve this answer













This is most likely a Wordpress website. The xmlrpc.php script is a PHP script that provides remote procedure calls (hence the rpc in the name) which allow you to run things on the server. These are just like methods in a Class.



Examples



<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param>
<value><string>http://.source./</string></value>
</param>
<param>
<value><string>http://.target./</string></value>
</param>
</params>
</methodCall>


When you call the URL in your example, you're calling the pingback.ping method and providing the URLs after the call as arguments to this method. The 1st URL is the source URL of the pingback while the 2nd is the target URL.



curl's -d switch



From curl's man page:



-d/--data <data>
(HTTP) Sends the specified data in a POST request to the HTTP server,
in a way that can emulate as if a user has filled in a HTML form and
pressed the submit button. Note that the data is sent exactly
as specified with no extra processing (with all newlines cut off).
The data is expected to be "url-encoded". This will cause curl to pass
the data to the server using the content-type
application/x-www-form-urlencoded. Compare to -F/--form. If this
option is used more than once on the same command line, the data
pieces specified will be merged together with a separating &-letter.
Thus, using ’-d name=daniel -d skill=lousy’ would generate a post
chunk that looks like ’name=daniel&skill=lousy’.

If you start the data with the letter @, the rest should be a
file name to read the data from, or - if you want curl to read the
data from stdin. The contents of the file must already be
url-encoded. Multiple files can also be specified. Posting data from a
file named ’foobar’ would thus be done with --data @foobar".

To post data purely binary, you should instead use the --data-binary
option.

-d/--data is the same as --data-ascii.

If this option is used several times, the ones following the first
will append data.






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 27 '14 at 4:02









slmslm

255k71541687




255k71541687












  • @Sedulous - glad to of helped. Thanks for the Q.

    – slm
    Jan 27 '14 at 4:34

















  • @Sedulous - glad to of helped. Thanks for the Q.

    – slm
    Jan 27 '14 at 4:34
















@Sedulous - glad to of helped. Thanks for the Q.

– slm
Jan 27 '14 at 4:34





@Sedulous - glad to of helped. Thanks for the Q.

– slm
Jan 27 '14 at 4:34

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f111076%2fwhat-does-this-curl-command-do%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay