Jump to content

Closing socket to client and continuing script execution


Onetoomanysodas

Recommended Posts

I am developing some AJAX apps and I need to close the socket connection with the client so the browser will execute the server response without waiting for the script to complete it's execution.

 

Here's what I want:

<?php
$bar = $_POST['foo'];
echo "alert('You said '".$bar."')";

// close connection with client so browser evaluates server response

someFunctionThatTakesALongTime();
?>

 

Any help would be most appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.