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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:32:52+00:00 2026-05-28T21:32:52+00:00

Maybe this is a simple question, but I didn’t find answer in web. I

  • 0

Maybe this is a simple question, but I didn’t find answer in web.

I have remote script that works when I’m opening

http://www.example.com/do_it.php

I can’t include it, cause this page can give fatal errors, can take too long to load.

I need to load that page from php in the fastest and the easyest way.

Now I’m doing

$ch = curl_init($url);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,$withReturn);
$execute = curl_exec($ch);

But this script get response, so consequently it will take more time than script that returns only headers, or not returns anything.

That is the better way to do it?

If it will help do_it.php is in same server from where I need to call it.

  • 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-28T21:32:53+00:00Added an answer on May 28, 2026 at 9:32 pm

    I think the possible solutions for executing the request and not waiting for a response would be to use php.net/curl_multi_exec and then avoid parsing the response. Another approach would be to use sockets, open a connection to the script, write the request then close the connection without readying the response.

    A example curl script:
    https://github.com/vrana/php-async/blob/master/CurlAsync.php

    An example usage of the socket method:

    $fp = fsockopen('example.com', 80, $errno, $errstr, 30);
    
    $out = "GET /do_it.php HTTP/1.1\r\n";
    $out.= "Host: example.com\r\n";
    $out.= "Content-Type: application/x-www-form-urlencoded\r\n";
    $out.= "Connection: Close\r\n\r\n";
    
    fwrite($fp, $out);
    fclose($fp);
    

    Above example is untested and is provided as a starting point.

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

Sidebar

Related Questions

maybe this is a very simple question, but forgot the answer about it because
Maybe this is a simple question but I have this method: public int getMaxColumnData()
Ok so this maybe a simple/silly question but I don't know so here goes:
Okay this may be a simple question but I have yet to come with
may be too simple groovy question but....please help i have a list like this:
I'm rather new to WPF, so maybe this is a simple question. I have
This is one of those things, that maybe so simple I'll never find it
This maybe a really simple question but for some reason my code isn't working.
Maybe, it's very simple question but I couldn't get the answer. I've been searching
Maybe it's a simple question but I didn't succeed to solve it. DNSperf is

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.