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

  • SEARCH
  • Home
  • 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 4257358
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:28:46+00:00 2026-05-21T05:28:46+00:00

Normally I Post data when I initiate cURL. And I wait for the response,

  • 0

Normally I Post data when I initiate cURL. And I wait for the response, parse it, etc…

I want to simply post data, and not wait for any response.
In other words, can I send data to a Url, via cURL, and close my connection immediately? (not waiting for any response, or even to see if the url exists)

It’s not a normal thing to ask, but I’m asking anyway.

Here’s what I have so far:

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $MyUrl);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_to_send); 
curl_exec($ch);  
curl_close($ch);
  • 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-05-21T05:28:47+00:00Added an answer on May 21, 2026 at 5:28 am

    I believe the only way to not actually receive the whole response from the remote server is by using CURLOPT_WRITEFUNCTION. For example:

    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, $MyUrl);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_to_send); 
    curl_setopt($ch, CURLOPT_WRITEFUNCTION, 'do_nothing');
    curl_exec($ch);  
    curl_close($ch);
    
    function do_nothing($curl, $input) {
        return 0; // aborts transfer with an error
    }
    

    Important notes

    1. Be aware that this will generate a warning, as the transfer will be aborted.
    2. Make sure that you do not set the value of CURLOPT_RETURNTRANSFER, as this will interfere with the write callback.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally, you can use code such as this to validate incoming data: $post =
I am attempting to send POST data using urllib, but the problem is normally
I want to pass label/value pair in Ajax .POST but cannot find any solution.
First post here... I normally develop using PHP and Symfony with Propel and ActionScript
a post has a user (belongsTo) and a user has a profile (hasOne). Normally
Normally when I want to change the connection for a Query Editor Window in
Normally, if I want to start a new activity I can use StartActivity(typeof(foo)); This
Normally the XML files I have to parse are like this: <row id=1> <title>widget<title>
Currently, I create an object and use its setters to set the get/post data
I've hit a wall on POST'ing data to a webform :( Below is the

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.