On Fri, 2 Jul 2004, Dimitris Karathanasis wrote:

> could someone help me to write a drl-url script in order to make dlr option
> to work?

When a new sms is created, I insert it into smslog.  The DLR url is:

$url = "http://host.com/dlr.php?smsid=".$smsid."&type=%d&to=%P&time=%t";;
$mask = 31;

In PHP, dlr.php:

<?php

require_once("adodb/adodb.inc.php");
$my = NewAdoConnection("mysql");
$my->Pconnect("localhost","888888","888888","kannel");
$my->execute("update smslog set dlr=".$_REQUEST['type']." where 
smsid=".$_REQUEST['smsid']);
$sql = "update smslog set dlr=".$_REQUEST['type']." where smsid=".$_REQUEST['smsid'];
#mail("[EMAIL PROTECTED]", "DLR Report", 
$_SERVER['REQUEST_URI']."\n".$sql."\n".print_r($_REQUEST,1), "From: [EMAIL 
PROTECTED]");

If you want the DLR to be mailed, uncomment the mail line.
If you want the DLR to update a DB, use the above.

Beckman
---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
[EMAIL PROTECTED]                             http://www.purplecow.com/
---------------------------------------------------------------------------

Reply via email to