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 1059603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:11:55+00:00 2026-05-16T18:11:55+00:00

I am using curl, I am wondering how would I send post/submit data on

  • 0

I am using curl, I am wondering how would I send post/submit data on my page to those websites? The web site has “host, time, port”. My MYSQL database has a list of urls. I was thinking of curl_multi but I am not sure.

Please someone post examples. It has to be a fast method.

Basically feteches the url and post.

while($resultSet = mysql_fetch_array($SQL)){                
    $ch = curl_init($resultSet['url'] . $fullcurl);
    curl_setopt($ch, CURLOPT_TIMEOUT, 2);           
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
}
  • 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-16T18:11:56+00:00Added an answer on May 16, 2026 at 6:11 pm

    Here is an example on how to do it with curl_multi. Although you should break it up so you only have a certain amount of URLs going out at once (i.e. 30). I added the follow location directive, which you usually want.

    $mh = curl_multi_init();
    $ch = array();
    while($resultSet = mysql_fetch_array($SQL)){                
        $ch[$i] = curl_init($resultSet['url'] . $fullcurl);
        curl_setopt($ch[$i], CURLOPT_TIMEOUT, 2);
        curl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch[$i], CURLOPT_FOLLOWLOCATION, true);
        curl_multi_add_handle($mh, $ch[$i]);
    }
    $running = null;
    do {
        curl_multi_exec($mh,$running);
    } while ($running > 0);
    $num = count($ch);
    for ($i=0; $i<$num; $i++ ) {
        curl_multi_remove_handle($mh, $ch[$i]);
    }
    curl_multi_close($mh);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Curl for example, I can "post" data (send an entity-body) in a GET
when using cURL in php to send data in a POST, you use set
I using curl to post data to another server, between each posting I use
passing post data using cURL requires that the name of the input. However, I
Using cURL or this ... $html = file_get_contents('http://stackoverflow.com/questions/ask'); gets the web page, but it
I am using CURL to send large amounts of data between servers , am
Using cURL I can send a GET request with a body. Example: curl -i
I am using curl library which returns data to me through a callback function
I'm using cURL to connect to a SSL server to recive and send XML-files
I'm using cURL to return data from external sites. How can I return 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.