Welcome Guest, Not a member yet? Register   Sign In
Run another function in controller class - Background process
#2

[eluser]tonanbarbarian[/eluser]
try something like this (totally untested)

you use fsockopen to make a connection to the url, writing the data of the request, then just close the socket without reading the reply

Code:
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
  log_message('error', 'Unable to connect to server');
  return;
}
$request = "GET /SendSMS/index HTTP/1.1\r\n"
  ."Host: www.example.com\r\n"
  ."Connection: Close\r\n\r\n";
fwrite($fp, $request);
// normally now we would get the result like so
//$result = '';
//while (!feof($fp)) {
//  $result .= fgets($fp, 128);
//}

fclose($fp);


Messages In This Thread
Run another function in controller class - Background process - by El Forum - 12-07-2007, 12:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB