Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8600711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:40:44+00:00 2026-06-12T01:40:44+00:00

I am trying to receive a cURL POST from another server, process the post

  • 0

I am trying to receive a cURL POST from another server, process the post in a script and give a response back by doing another cURL post to a website, according to a URL contained in the first POST. But I have no idea how to accept a cURL post in a PHP script.

Is it like:

if (isset($_POST['test'])){
  //execute some code
}

So Website 45661 posts to Server 1 and the script on Server 1 see it’s Website 45661 and posts back to it via cURL.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:40:45+00:00Added an answer on June 12, 2026 at 1:40 am

    Welcome to SO!

    Your code is a start. FYI, it doesn’t matter how your script is called, be it through curl, form submission, etc, so long as a post parameter called test is sent.

    You could complete the code like so:

    <?php
        //Simply exiting when the condition is not true is more elegant than
        //putting everything in curly braces
        if(!isset($_POST['test'])) exit;
    
        //Execute some code...
    
        //Give feedback using json, not curl
        $feedback=array(
            'success' => true,
            'message' => 'success message'
        );
        echo json_encode($feedback);
    ?>
    

    It is much easier to deliver data to the one requesting your script with json than posting something back with curl. That way, you don’t need to check who actually called your script, and it is also easier for testing, since the json object feedback will be shown in your browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I'm trying to run test.sh script I've always receive error from curl: curl:
I am trying to receive a json object back from php after sending data
I have a method where i am trying to receive an arraylist from another
I am trying to receive an image from the Android Gallery via an ACTION_SEND
I am trying to receive the url image and post the image into base64
I am trying to develop the XMPP Gateway which can send/receive from standard XMPP
I'm trying to calculate the time it takes to receive all data from a
so i'm currently trying to implement a currency conversion script using Jquery, curl, ajax
I am trying to post to a REST service using PHP cURL but I'm
I'm trying to setup my PayPal IPN Listener with CURL. I'm receiving the POST

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.