On Sun, 20 Aug 2006, Yaswanth Narvaneni wrote:

Hi!

I am facing a strange problem. I have kannel installed to work as AT
SMSC. Its working fine. But my application requires kannel to contact
a HTTP page and the page in return gives a Redirect request. Kannel is
able to call the page, but its not being redirected. The message in
log is as follows:

SMS HTTP-request sender:<my number> request: 'Could not fetch content,
sorry.' url: '' reply: -1 ''

Now, the strange part is, its working fine if the script is on LAN but
not on the Internet. If its on internet, it gives the above error. The
PHP code for redirect script is as follows:

<?php

$fp_handle = fopen("/tmp/recieve.txt", "a");

foreach ($_GET as $key=> $value)
{
  fwrite($fp_handle, "$key :: $value; ");
}

fwrite($fp_handle, "\n");

fclose($fp_handle);

$message = urlencode($_GET['fullsms']);

header("Location: http://localhost/recieve2.php?message=$message";);

header outputs a header to the client which in this case is kannel

The script notes down the content in GET and sends a redirect request.

Can anyone tell me why this is happening (pls dont quote alternative
solutions of doing the same).

you got it :)

cheers

iain

Regards,
Yaswanth

--
"In theory there is no difference between theory and practice.
In practice there is." -- Fortune Cookie



Reply via email to