What does this curl command do?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom: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/
'
curl
add a comment |
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
What it does entirely depends onxmlrpc.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
add a comment |
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
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
curl
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 onxmlrpc.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
add a comment |
What it does entirely depends onxmlrpc.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
add a comment |
1 Answer
1
active
oldest
votes
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.
@Sedulous - glad to of helped. Thanks for the Q.
– slm♦
Jan 27 '14 at 4:34
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
@Sedulous - glad to of helped. Thanks for the Q.
– slm♦
Jan 27 '14 at 4:34
add a comment |
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.
@Sedulous - glad to of helped. Thanks for the Q.
– slm♦
Jan 27 '14 at 4:34
add a comment |
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.
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.
answered Jan 27 '14 at 4:02
slm♦slm
255k71541687
255k71541687
@Sedulous - glad to of helped. Thanks for the Q.
– slm♦
Jan 27 '14 at 4:34
add a comment |
@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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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