php-general Digest 29 May 2006 11:02:44 -0000 Issue 4154

Topics (messages 237019 through 237020):

Re: Best way to save reports, comments and suggestions welcome
        237019 by: Robert Cummings

MMS Gateway + PHP
        237020 by: kartikay malhotra

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
On Sun, 2006-05-28 at 18:49, Ryan A wrote:
> Hi,
> I have to write a kind of logging script which will
> keep records of how long a person used the site and
> its functions, so far this is what I have come up
> with:
> 
> login_username varchar(50)
> as_guide <- You can ignore this,its for a special func
> 
> login_time timestamp
> logout_time timestamp
> this_session_inlogged_time float
> this_month timestamp
> this_year timestamp
> sum_total_time_inlogged varchar or float
> 
> Any suggestions on changing any of the above, adding
> fields or changing types?
> I am not 100% sure of the timestamp type for most of
> the fields.

Presuming you know when they logged out or can calculate it:

    user_id
    login_time timestamp
    logout_time timestamp

Your username values are probably nice and unique but a great big waste
of space as a criteria by which to relate data. You should associate a
unique integer value for each username.

Regardless of how you determine the end of the logged in time, you
shouldn't track all the different sums in every entry since that's
redundant. You don't even need the extra data since the database will
happily allow you to perform the SUMs via queries.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Hi All,

I've a typical problem. I'm using Mbuni MMS gateway. This gateaway provides
a method of forwarding an incoming MMS file to a HTTP Server, where it could
be uploaded.

I run a PHP script on the server, to dump the MMS into a database.

Now I do not have a typical HTML form to upload the MMS. Only 2 fields in
the configuration file :

post-url = http://localhost/one.php/
http-post-parameters = userfile=%z

where %z signifies all parts of the MM.

I'm used to seeing PHP code for uploading files which resembles:

if($_FILES['userfile']['size'] > 0 )
{
 $fileName = $_FILES['userfile']['name'];

}

Unfortunately, the condition $_FILES['userfile']['size'] is never satisfied.
Can anyone help me determine that my file is properly reaching the HTTP
server in the first place?


If the problem statement isn't clear, all fault is mine :)

Thanx
KM

--- End Message ---

Reply via email to