Hi Jarlco,

With HTTP post try using _POST not _GET array varsx. You might also want
to look at HTTP_RAW_DATA_POST (phpinfo() may also be useful).  
Cheers,
Alan

On Tue, 2003-11-18 at 11:54, Jarlco wrote:
> How does kannel use post-url ?
> 
> My earlier post might have been long for a short problem... in shorter:
> I know get-url works like this:
> get-url = http://localhost/kannel/jarl.php?from=%p&to=%P
> now how does post-url work? can't seem to get that to work with just:
> post-url = http://localhost/kannel/jarl.php
> 
> php script is:
> <?
> $data=print_r($_GET, true); // Prints the array to the variable $data
> ('true' puts it in the variable)
> $filea = fopen("newmsg.txt","a"); // Open file in append mode (don't
> overwrite)
> fwrite($filea, $data); // Write data
> fclose($filea); // Close file
> ?>
> 
> now with GET it works and with POST I'm confused as I get nothing in my
> newmsg.txt file
> 
> Cheers for any help on how kannel posts stuff,
> Jarl
> 
> "Jarlco" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > Thank you all for your eariler replies, finally understood most of it and
> > managed to get a bit further on my kannel project.
> >
> > However I've now run into a problem with sending information from kannel
> to
> > a php script. My script simply takes anything posted to php and saves the
> > output to a file...
> > this is using: print_r($_POST);
> > Now, the problem is that it doesn't seem to work using post but using
> > print_r($_GET); works fine (but then I have to include &from=% etc in the
> > url.
> >
> > The way I've done this is like the following:
> > group = sms-service
> > keyword = default
> > get-url =
> >
> "http://localhost/jarl.php?from=%p&to=%P&keyword=%k&body=%r&mccmnc=%B&smscid
> > =%i&fullbody=%a"
> >
> >
> > (have tried with catch-all = true as well, doesn't seem to make a
> > difference)
> >
> > What I would like to do is:
> >
> > group = sms-service
> > keyword = default
> > post-url = http://localhost/jarl.php
> > catch-all = true
> >
> > However this outputs nothing in my file compared to:
> > (when I use the get-url option)
> >
> >     [from] => 123
> >     [to] => 345
> >     [keyword] => default
> >     [body] =>
> >     [mccmnc] =>
> >     [smscid] => FAKE
> >     [fullbody] => default
> >
> > Now, of course I could go on using get-url, however I would like to
> > understand how the post function works and I prefer using post if
> possible.
> >
> > Cheers,
> > Jarl
> >
> >
> >
> >
> >
> 
> 
> 
> 


Reply via email to