OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
php-general Digest 8 Oct 2008 22:45:18 -0000 Issue 5725

php-general-digest-helplists.php.net
Date: Wed Oct 08 2008 - 17:45:18 CDT


php-general Digest 8 Oct 2008 22:45:18 -0000 Issue 5725

Topics (messages 281579 through 281627):

Re: The 'at' sign () variable prefix
        281579 by: ANR Daemon
        281598 by: mike
        281600 by: Ashley Sheridan

strtotime problem
        281580 by: Thodoris
        281581 by: Jason Pruim
        281582 by: Thodoris
        281583 by: Jason Pruim
        281584 by: Nathan Rixham
        281585 by: Stut
        281586 by: Thodoris
        281587 by: Stut
        281589 by: Jason Pruim
        281590 by: Maciek Sokolewicz
        281591 by: Thodoris

Re: Prefered Method for User authetification on VHosts
        281588 by: Michelle Konzack
        281593 by: Per Jessen

Re: Missing Env. Variables when called by AT Scheduler
        281592 by: Thodoris

Re: Selecting all records between a date range
        281594 by: Andrew Ballard
        281595 by: Eric Butera

Re: Login
        281596 by: Bernhard Kohl
        281597 by: Ashley Sheridan
        281599 by: Stut
        281601 by: Ashley Sheridan
        281609 by: Richard Heyes
        281610 by: Wolf
        281613 by: Ashley Sheridan
        281615 by: Stut
        281618 by: Ashley Sheridan
        281621 by: Stut
        281622 by: Ashley Sheridan
        281626 by: Stut

Re: Manipulating strings
        281602 by: Yeti
        281604 by: Ashley Sheridan

sms interfaces?
        281603 by: Rene Veerman
        281605 by: Stut
        281606 by: Rene Veerman
        281607 by: Boyd, Todd M.
        281608 by: Jignesh Thummar

Re: Plotting Tool
        281611 by: Richard Heyes
        281614 by: Ashley Sheridan
        281617 by: Daniel Brown
        281619 by: Ashley Sheridan
        281620 by: Daniel Brown
        281623 by: Ashley Sheridan
        281624 by: Daniel Brown
        281625 by: Ashley Sheridan

magic_quotes
        281612 by: Bryan
        281616 by: Stut

Flow chart tool
        281627 by: Haig Dedeyan

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


Greetings, ""Crash" Dummy".
In reply to Your message dated Tuesday, October 7, 2008, 15:54:14,

>>> mike schreef:

>>>> Mon, Oct 6, 2008 at 12:17 PM, Daniel Brown <parasanegmail.com
>>>> wrote:

>>>>>> I will get an error, but if I prefix the value with '',

>>>>>> $query=$_GET["q"];

>>>>> The is an error control operator, used to buffer the output
>>>>> and store it in a variable - $php_errormsg. It's better to
>>>>> write clean, secure code, of course.... but sometimes error
>>>>> control is a good thing, too. why not just use:
>>>> $query = isset($_GET['q']) ? $_GET['q'] : '';

>>>> that way it's always set.

>>>> or even better (what I recommend):
>>>> $query = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING);

>>>> and get an empty string or a sanitized string, depending on if
>>>> something exists.

>>> Mike's ways are both better than suppressing the error not only
>>> because error suppression in general sucks but because it's
>>> actually less performant to trigger this kind of error.

>> I second that. The symbol actually does this:

>> action();

>> Becomes:

>> $old = ini_set("error_reporting", 0);
>> action();
>> ini_set("error_reporting", $old);

>> So, if you put that a hundred times all over your code, the errors
>> might be suppressed but your app is slow too.

> Thank you all. As I said, I learned this by osmosis, applying other
> people's code. I am not fluent in PHP. That is why I wanted a
> reference in the documents. I do not sprinkle the symbol through my
> code to avoid careful construction, I used it in a specific instance
> to deal with an empty query string, over which I had no control. I
> will study the alternatives offered here and do some recoding.

If you're using it to deal with possible empty input data, you'd better do it
explicitly enstead.

Something like this:

  if(!array_key_exists('from_year', $_POST)
    || !array_key_exists('from_month', $_POST)
    || !array_key_exists('from_day', $_POST)
    )
  {
    throw new Exception('No start date given', 100);
  }

--
Sincerely Yours, ANR Daemon <anrdaemonfreemail.ru>

attached mail follows:


On Wed, Oct 8, 2008 at 4:06 AM, ANR Daemon <anrdaemonfreemail.ru> wrote:

> If you're using it to deal with possible empty input data, you'd better do it
> explicitly enstead.
>
> Something like this:
>
> if(!array_key_exists('from_year', $_POST)
> || !array_key_exists('from_month', $_POST)
> || !array_key_exists('from_day', $_POST)
> )
> {
> throw new Exception('No start date given', 100);
> }

*cough*

filter_input does this elegantly too ;) as does an isset() on the array index

attached mail follows:


On Wed, 2008-10-08 at 12:01 -0700, mike wrote:
> On Wed, Oct 8, 2008 at 4:06 AM, ANR Daemon <anrdaemonfreemail.ru> wrote:
>
> > If you're using it to deal with possible empty input data, you'd better do it
> > explicitly enstead.
> >
> > Something like this:
> >
> > if(!array_key_exists('from_year', $_POST)
> > || !array_key_exists('from_month', $_POST)
> > || !array_key_exists('from_day', $_POST)
> > )
> > {
> > throw new Exception('No start date given', 100);
> > }
>
> *cough*
>
> filter_input does this elegantly too ;) as does an isset() on the array index
>
I'm a fan of the isset() method for POST and GET variables, as usually
I'll still want to put something in the variables I'm assigning those
values to, rather than the NULL which gets returned by the prefix.

Ash
www.ashleysheridan.co.uk

attached mail follows:


I know that *strtotime*() only recognises the formats mm/dd/yyyy, yyyy-mm-dd and yyyymmdd

****for numeric months but I need do something like that:

function dateWebToMysql($webdate){

        $format = 'Y-m-d';
        $timestamp = strtotime($webdate);
        
return date($format,$timestamp);
        
}

print dateWebToMysql('01/03/2008');

Where 01/03/2008 is in dd/mm/yyyy format (not the American format). What is the best way of doing this?

Any ideas?

--
Thodoris

attached mail follows:


On Oct 8, 2008, at 7:08 AM, Thodoris wrote:

> I know that *strtotime*() only recognises the formats mm/dd/yyyy,
> yyyy-mm-dd and yyyymmdd
> ****for numeric months but I need do something like that:
>
> function dateWebToMysql($webdate){
>
> $format = 'Y-m-d';
> $timestamp = strtotime($webdate);
>
> return date($format,$timestamp);
>
> }
>
> print dateWebToMysql('01/03/2008');
>
> Where 01/03/2008 is in dd/mm/yyyy format (not the American format).
> What is the best way of doing this?
>
> Any ideas?

Actually strtotime accepts all kinds of things... "Last week Thursday
midnight" for example works perfectly.

You could do an explode on the field and then reorder the array anyway
that you want...

<?PHP

$date = "13/01/2008";

$datearray = explode("/", $date);

echo $datearray[1] ."/". $datearray[0] . "/" . $datearray[2];

?>

Or something like that :)

That wasn't tested but should give you an idea...

php.net/explode for more info.

>
>
> --
> Thodoris
>

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruimraoset.com

attached mail follows:


>
> On Oct 8, 2008, at 7:08 AM, Thodoris wrote:
>
>> I know that *strtotime*() only recognises the formats mm/dd/yyyy,
>> yyyy-mm-dd and yyyymmdd
>> ****for numeric months but I need do something like that:
>>
>> function dateWebToMysql($webdate){
>>
>> $format = 'Y-m-d';
>> $timestamp = strtotime($webdate);
>>
>> return date($format,$timestamp);
>>
>> }
>>
>> print dateWebToMysql('01/03/2008');
>>
>> Where 01/03/2008 is in dd/mm/yyyy format (not the American format).
>> What is the best way of doing this?
>>
>> Any ideas?
>
> Actually strtotime accepts all kinds of things... "Last week Thursday
> midnight" for example works perfectly.
>
> You could do an explode on the field and then reorder the array anyway
> that you want...
>
> <?PHP
>
> $date = "13/01/2008";
>
> $datearray = explode("/", $date);
>
> echo $datearray[1] ."/". $datearray[0] . "/" . $datearray[2];
>
> ?>
>
> Or something like that :)
>
> That wasn't tested but should give you an idea...
>
> php.net/explode for more info.
>
>
>
>

This is what I was doing before (which is a bit lame) so I am looking
for a more elegant way using timestamps.

--
Thodoris

attached mail follows:


On Oct 8, 2008, at 7:24 AM, Thodoris wrote:

>
>>
>> On Oct 8, 2008, at 7:08 AM, Thodoris wrote:
>>
>>> I know that *strtotime*() only recognises the formats mm/dd/yyyy,
>>> yyyy-mm-dd and yyyymmdd
>>> ****for numeric months but I need do something like that:
>>>
>>> function dateWebToMysql($webdate){
>>>
>>> $format = 'Y-m-d';
>>> $timestamp = strtotime($webdate);
>>> return date($format,$timestamp);
>>> }
>>>
>>> print dateWebToMysql('01/03/2008');
>>>
>>> Where 01/03/2008 is in dd/mm/yyyy format (not the American
>>> format). What is the best way of doing this?
>>>
>>> Any ideas?
>>
>> Actually strtotime accepts all kinds of things... "Last week
>> Thursday midnight" for example works perfectly.
>>
>> You could do an explode on the field and then reorder the array
>> anyway that you want...
>>
>> <?PHP
>>
>> $date = "13/01/2008";
>>
>> $datearray = explode("/", $date);
>>
>> echo $datearray[1] ."/". $datearray[0] . "/" . $datearray[2];
>>
>> ?>
>>
>> Or something like that :)
>>
>> That wasn't tested but should give you an idea...
>>
>> php.net/explode for more info.
>>
>>
>>
>>
>
> This is what I was doing before (which is a bit lame) so I am
> looking for a more elegant way using timestamps.

Well, If it's not already a timestamp, you can use mktime() to make it
one, once it is then you should just be able to:

<?PHP

$timestamp ="1222354037";

echo date("d/m/y h:i:s", $timestamp);

?>

to format and display it. I'm using that on a time card application
right now and it's working great.

Is that more what you are looking for?

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruimraoset.com

attached mail follows:


Thodoris wrote:
> I know that *strtotime*() only recognises the formats mm/dd/yyyy,
> yyyy-mm-dd and yyyymmdd
> ****for numeric months but I need do something like that:
>
> function dateWebToMysql($webdate){
>
> $format = 'Y-m-d';
> $timestamp = strtotime($webdate);
>
> return date($format,$timestamp);
>
> }
>
> print dateWebToMysql('01/03/2008');
>
> Where 01/03/2008 is in dd/mm/yyyy format (not the American format). What
> is the best way of doing this?
>
> Any ideas?
>

completely random and never used myself [ie just made it up]

function dateWebToMysql( $webdate ){
  return strtotime(strrev( str_replace('/','', $webdate) ));
}

--
nathan ( nathankraya.co.uk )
{
   Senior Web Developer
   php + java + flex + xmpp + xml + ecmascript
   web development edinburgh | http://kraya.co.uk/
}

attached mail follows:


On 8 Oct 2008, at 12:42, Nathan Rixham wrote:
> Thodoris wrote:
>> I know that *strtotime*() only recognises the formats mm/dd/yyyy,
>> yyyy-mm-dd and yyyymmdd
>> ****for numeric months but I need do something like that:
>> function dateWebToMysql($webdate){
>> $format = 'Y-m-d';
>> $timestamp = strtotime($webdate);
>> return date($format,$timestamp);
>> }
>> print dateWebToMysql('01/03/2008');
>> Where 01/03/2008 is in dd/mm/yyyy format (not the American format).
>> What is the best way of doing this?
>> Any ideas?
>
> completely random and never used myself [ie just made it up]
>
> function dateWebToMysql( $webdate ){
> return strtotime(strrev( str_replace('/','', $webdate) ));
> }

What exactly do you expect strtotime('80023010') to return?

I tend to always normalise dates to Y-m-d before pushing them into
strtotime, but in your case you don't need to do that. If you *know*
the date always comes in as that format you can simply do this...

function dateWebToMysql($webdate)
{
     list($day, $month, $year) = explode('/', $webdate);
     return $year.'-'.$month.'-'.$day;
}

-Stut

--
http://stut.net/

attached mail follows:


>>>
>>> Actually strtotime accepts all kinds of things... "Last week
>>> Thursday midnight" for example works perfectly.
>>>
>>> You could do an explode on the field and then reorder the array
>>> anyway that you want...
>>>
>>> <?PHP
>>>
>>> $date = "13/01/2008";
>>>
>>> $datearray = explode("/", $date);
>>>
>>> echo $datearray[1] ."/". $datearray[0] . "/" . $datearray[2];
>>>
>>> ?>
>>>
>>> Or something like that :)
>>>
>>> That wasn't tested but should give you an idea...
>>>
>>> php.net/explode for more info.
>>>
>>>
>>>
>>>
>>
>> This is what I was doing before (which is a bit lame) so I am looking
>> for a more elegant way using timestamps.
>
> Well, If it's not already a timestamp, you can use mktime() to make it
> one, once it is then you should just be able to:
>

Of course this means that I will explode the date anyway so I will not
need the intermediate transformation into timestamp.
> <?PHP
>
> $timestamp ="1222354037";
>
> echo date("d/m/y h:i:s", $timestamp);
>
> ?>
>
> to format and display it. I'm using that on a time card application
> right now and it's working great.
>
> Is that more what you are looking for?
>
>

Actually this means that strtotime() was made with Americans *only* in
mind... :-) .

--
Thodoris

attached mail follows:


On 8 Oct 2008, at 12:58, Thodoris wrote:
> Actually this means that strtotime() was made with Americans *only*
> in mind... :-) .

As far as I know it uses the configured timezone to decide between
ambiguous formats.

-Stut

--
http://stut.net/

attached mail follows:


On Oct 8, 2008, at 7:58 AM, Thodoris wrote:

>
>>>>
>>>> Actually strtotime accepts all kinds of things... "Last week
>>>> Thursday midnight" for example works perfectly.
>>>>
>>>> You could do an explode on the field and then reorder the array
>>>> anyway that you want...
>>>>
>>>> <?PHP
>>>>
>>>> $date = "13/01/2008";
>>>>
>>>> $datearray = explode("/", $date);
>>>>
>>>> echo $datearray[1] ."/". $datearray[0] . "/" . $datearray[2];
>>>>
>>>> ?>
>>>>
>>>> Or something like that :)
>>>>
>>>> That wasn't tested but should give you an idea...
>>>>
>>>> php.net/explode for more info.
>>>>
>>>>
>>>>
>>>>
>>>
>>> This is what I was doing before (which is a bit lame) so I am
>>> looking for a more elegant way using timestamps.
>>
>> Well, If it's not already a timestamp, you can use mktime() to make
>> it one, once it is then you should just be able to:
>>
>
> Of course this means that I will explode the date anyway so I will
> not need the intermediate transformation into timestamp.

I was just giving that as an option incase it's not already a
timestamp :)

I usually convert to timestamps as soon as the dates are given to the
application and store them in the database.
>
>> <?PHP
>>
>> $timestamp ="1222354037";
>>
>> echo date("d/m/y h:i:s", $timestamp);
>>
>> ?>
>>
>> to format and display it. I'm using that on a time card application
>> right now and it's working great.
>>
>> Is that more what you are looking for?
>>
>>
>
> Actually this means that strtotime() was made with Americans only in
> mind... :-) .

As an American, I don't see a big issue with that :P But what Stut
said is more then likely true... :)

>

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruimraoset.com

attached mail follows:


Thodoris wrote:
>
>>>>
>>>> Actually strtotime accepts all kinds of things... "Last week
>>>> Thursday midnight" for example works perfectly.
>>>>
>>>> You could do an explode on the field and then reorder the array
>>>> anyway that you want...
>>>>
>>>> <?PHP
>>>>
>>>> $date = "13/01/2008";
>>>>
>>>> $datearray = explode("/", $date);
>>>>
>>>> echo $datearray[1] ."/". $datearray[0] . "/" . $datearray[2];
>>>>
>>>> ?>
>>>>
>>>> Or something like that :)
>>>>
>>>> That wasn't tested but should give you an idea...
>>>>
>>>> php.net/explode for more info.
>>>>
>>>>
>>>>
>>>>
>>>
>>> This is what I was doing before (which is a bit lame) so I am looking
>>> for a more elegant way using timestamps.
>>
>> Well, If it's not already a timestamp, you can use mktime() to make it
>> one, once it is then you should just be able to:
>>
>
> Of course this means that I will explode the date anyway so I will not
> need the intermediate transformation into timestamp.
>> <?PHP
>>
>> $timestamp ="1222354037";
>>
>> echo date("d/m/y h:i:s", $timestamp);
>>
>> ?>
>>
>> to format and display it. I'm using that on a time card application
>> right now and it's working great.
>>
>> Is that more what you are looking for?
>>
>>
>
> Actually this means that strtotime() was made with Americans *only* in
> mind... :-) .
>

 From your function name I assume you want to use it in MySQL. In that
case, why don't you have MySQL do all the magic for you?
eg. INSERT INTO table (col) VALUES (FROM_UNIXTIME($timestamp));
(using FROM_UNIXTIME($timestamp) will give you the date-time in "mysql
format" (YYYY-MM-DD HH:MM:SS) or any other format (if given via the 2nd
parameter)

attached mail follows:


>
> From your function name I assume you want to use it in MySQL. In that
> case, why don't you have MySQL do all the magic for you?
> eg. INSERT INTO table (col) VALUES (FROM_UNIXTIME($timestamp));
> (using FROM_UNIXTIME($timestamp) will give you the date-time in "mysql
> format" (YYYY-MM-DD HH:MM:SS) or any other format (if given via the
> 2nd parameter)
>

Well I have made these two functions to solve this:

function dateMysqlToWeb($mysqldate){

    $format = 'd/m/Y';
    $timestamp = strtotime($mysqldate);

    return date($format,$timestamp);

}

function dateWebToMysql($webdate){
   
    $format = 'Y-m-d';
    $date_part = explode("/",$webdate);
    $timestamp = mktime(0,0,0,$date_part[1],$date_part[0],$date_part[2]);

    return date($format,$timestamp);

}

My basic problem was how to make the user input from a form into a
timestamp not how to use it with mysql. Since the format used here is
dd/mm/yyyy I can't use the strtotime directly bacause as far as I know
from the documentation I don't think that it changes with the timezone
(as Stut suggested). So since strtotime understands all these variations
like:

mm/dd/yyyy, m/d/yy, mm/d/yy etc

I can't use this flexible behavior to get the input if it is not in the
American format (and correct me if I am wrong). If I explode I will have
to use the fixed format dd/mm/yyyy and I can't use other input formats
beside this so I lose this flexible approach.

It does work for me now but I was wondering if there was a way to avoid
this.

--
Thodoris

attached mail follows:


Am 2008-10-07 08:34:42, schrieb Per Jessen:
> > I like to know, whether this is good enough or is there a
> > better solution?
>
> Good enough depends entirely on your security requirements, i.e. how
> safe do you need the authenticated access to be? Are you protecting
> something that is valuable to others? Etc etc.

It is the admistrations interface to my web-site and for some users
parts of it. It is NOT about steeling valuable data but modifing web-
content and such things..

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant

--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFI7BI+C0FPBMSS+BIRApSYAJ9rZF7HbBdOfV9LChM0M3RydpobAQCfaO3K
rCZbvi/iLxAdvsJ2myiUMYQ=
=QVJE
-----END PGP SIGNATURE-----

attached mail follows:


Michelle Konzack wrote:

> Am 2008-10-07 08:34:42, schrieb Per Jessen:
>> > I like to know, whether this is good enough or is there a
>> > better solution?
>>
>> Good enough depends entirely on your security requirements, i.e. how
>> safe do you need the authenticated access to be? Are you protecting
>> something that is valuable to others? Etc etc.
>
> It is the admistrations interface to my web-site and for some
> users parts of it. It is NOT about steeling valuable data but
> modifing web- content and such things..

Then I think your method is perfectly adequate. I'd probably use a
database myself, but yours is just as good security-wise.

/Per Jessen, Zürich

attached mail follows:


> JJB wrote:
>> We regularly send out massive mail blasts to our customers. Recently
>> several mail blasts failed to transmit. After a serious amount of
>> research we found the snippet of code below to be the place where it
>> was breaking down. The issue it seems is that the Environment
>> Variables HOST and SERVER_NAME are sometimes not returning true when
>> executed from the Linux AT scheduler. (using atq commands). doing a
>> php -i from the command line returns the correct values, as does
>> putting in a php info command at the top of the script and opening it
>> from a browser.
>
> I doubt php -i does that at all.
>
> $ php -i | grep 'SERVER_NAME'
> $
>
>
> $_SERVER['SERVER_NAME'] and $_SERVER['HOST'] are set by web servers,
> they are not available through php-cli.
>

It makes sense doesn't it? Since you don't have a server when calling a
script using cli and you don't make a request the $_SERVER and $_REQUEST
arrays are not available.

--
Thodoris

attached mail follows:


On Tue, Oct 7, 2008 at 9:16 PM, Chris <dmagickgmail.com> wrote:
> Dan Joseph wrote:
>>
>> On Thu, Oct 2, 2008 at 12:35 PM, Jason Pruim <japruimraoset.com> wrote:
>>
>>> SQLTEST: SELECT * FROM `timeStore` WHERE `timein` BETWEEN
>>> 1222315200 AND 1222920000
>>> Could not perform query: Query was empty
>>>
>>> <japruimraoset.com>
>>
>>
>> Put a ' around your timestamp numbers. I think that should fix that
>> query.
>> Although I'll admitt, I have no way to test that on mysql, but that is how
>> MS SQL works...
>
> Int's don't need quoting in mysql (or postgres, or oracle).. not sure why
> ms-sql would need that.
>

MS SQL doesn't need them for integer values either. I'm not sure why
you would want to do that.

Andrew

attached mail follows:


On Thu, Oct 2, 2008 at 12:35 PM, Jason Pruim <japruimraoset.com> wrote:
> Hi Everyone,
>
> I am working on a app where I need to be able to select all the values from
> a database where the 'timein' field is between a certain date range...
> Essentially the last 7 days...
>
> here is the code that I am working with:
>
> $rangeBegin = strtotime("Last week thursday midnight");
> $rangeEnd = strtotime("Today now");
>
>
> $SQLTEST = "SELECT * FROM `timeStore` WHERE `timein` BETWEEN
> {$rangeBegin} AND {$rangeEnd}";
> echo "SQLTEST: " . $SQLTEST . "<br>";
> SQLTEST: SELECT * FROM `timeStore` WHERE `timein` BETWEEN
> 1222315200 AND 1222920000
> Could not perform query: Query was empty
>
> All of my times are stored as unix timestamps in the database, such as:
>
> +------------------------------------------+
> | timein | timeout | empID | record |
> +------------+------------+-------+--------+
> | 1222354037 | 1222382837 | 1 | 107 |
> | 1222440437 | 1222469237 | 1 | 108 |
> | 1222526837 | 1222555637 | 1 | 109 |
> | 1222613237 | 1222642037 | 1 | 110 |
> | 1222699637 | 1222728437 | 1 | 111 |
> | 1222359217 | 1222359220 | 2 | 115 |
> | 1222359214 | 1222359220 | 2 | 114 |
> | 1222359219 | 1222359220 | 2 | 116 |
> | 1222359231 | 1222359566 | 2 | 117 |
> +------------------------------------------+
>
> Anyone has any ideas? Or maybe a better way? :)
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 11287 James St
> Holland, MI 49424
> www.raoset.com
> japruimraoset.com
>
>
>
>
>

You can do this:

$startTS = time() or mktime for today at midnight
strtotime("-1 week", $startTs)

and make your query use these params.

attached mail follows:


<?php
# I would recommend using the include method. Redirects should always
be second choice, because they are just evil.
# Example code below
$password = md5('swordfish');
$user = 'Trucker Joe';
if ($_POST['user'] == $user && md5($_POST['password']) == $password) {
include_once('login_successful.php');
} else {
include_once('login_failed.php');
}
# Some may also hash the user to prevent injection
# http://us.php.net/manual/en/function.include.php
# http://en.wikipedia.org/wiki/Code_injection#PHP_Injection
?>

attached mail follows:


On Wed, 2008-10-08 at 11:52 -0700, Bernhard Kohl wrote:
> <?php
> # I would recommend using the include method. Redirects should always
> be second choice, because they are just evil.
> # Example code below
> $password = md5('swordfish');
> $user = 'Trucker Joe';
> if ($_POST['user'] == $user && md5($_POST['password']) == $password) {
> include_once('login_successful.php');
> } else {
> include_once('login_failed.php');
> }
> # Some may also hash the user to prevent injection
> # http://us.php.net/manual/en/function.include.php
> # http://en.wikipedia.org/wiki/Code_injection#PHP_Injection
> ?>
>
Also, generally speaking, it is a good idea to verify a user against
their $_SESSION on every page to verify that they have gone through the
login procedure and not just gone directly to an URL in the site.

Ash
www.ashleysheridan.co.uk

attached mail follows:


On 8 Oct 2008, at 19:52, Bernhard Kohl wrote:
> <?php
> # I would recommend using the include method. Redirects should always
> be second choice, because they are just evil.

In this case I would disagree. On successful login it's normal to
redirect to a useful page rather than just display a page that says
"congratulations, you're a real user". In the case of an unsuccessful
login why would you need to include another file? Surely the logic
that follows is part of the login script.

It's all a personal preference tho. I used to think that redirects
should not be used unless absolutely necessary but the reasons people
give are generally religious rather than logical.

> # Example code below
> $password = md5('swordfish');
> $user = 'Trucker Joe';
> if ($_POST['user'] == $user && md5($_POST['password']) == $password) {
> include_once('login_successful.php');
> } else {
> include_once('login_failed.php');
> }
> # Some may also hash the user to prevent injection
> # http://us.php.net/manual/en/function.include.php
> # http://en.wikipedia.org/wiki/Code_injection#PHP_Injection

I see nothing in that code that would be open to code injection.

-Stut

--
http://stut.net/

attached mail follows:


On Wed, 2008-10-08 at 20:02 +0100, Stut wrote:
> On 8 Oct 2008, at 19:52, Bernhard Kohl wrote:
> > <?php
> > # I would recommend using the include method. Redirects should always
> > be second choice, because they are just evil.
>
> In this case I would disagree. On successful login it's normal to
> redirect to a useful page rather than just display a page that says
> "congratulations, you're a real user". In the case of an unsuccessful
> login why would you need to include another file? Surely the logic
> that follows is part of the login script.
>
> It's all a personal preference tho. I used to think that redirects
> should not be used unless absolutely necessary but the reasons people
> give are generally religious rather than logical.
>
> > # Example code below
> > $password = md5('swordfish');
> > $user = 'Trucker Joe';
> > if ($_POST['user'] == $user && md5($_POST['password']) == $password) {
> > include_once('login_successful.php');
> > } else {
> > include_once('login_failed.php');
> > }
> > # Some may also hash the user to prevent injection
> > # http://us.php.net/manual/en/function.include.php
> > # http://en.wikipedia.org/wiki/Code_injection#PHP_Injection
>
> I see nothing in that code that would be open to code injection.
>
> -Stut
>
> --
> http://stut.net/
>
I usually include verification on each page, so I'll redirect if they
are not logged in, but process them as normal throughout that script if
they are. I guess like all things PHP, there's 101 ways to do something,
and it's just down to preference and those little details...

Ash
www.ashleysheridan.co.uk

attached mail follows:


> I would recommend using the include method. Redirects should always
>> be second choice, because they are just evil.
>
> In this case I would disagree. On successful login it's normal to redirect
> to a useful page rather than just display a page that says "congratulations,
> you're a real user". In the case of an unsuccessful login why would you need
> to include another file? Surely the logic that follows is part of the login
> script.

Agreed. Flow could be described as this:

Not logged in --> Login page --> Logged in

Redirects make sense IMO. IIRC the Yahoo guidelines say not to
redirect after a form POST, but unless you have a ka-jillion page
views a second (or, "a lot"), then I don't think it's a concern.

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

attached mail follows:


<!-- SNIP -->
> Redirects make sense IMO. IIRC the Yahoo guidelines say not to
> redirect after a form POST, but unless you have a ka-jillion page
> views a second (or, "a lot"), then I don't think it's a concern.

Wait, Yahell has guidelines?!?!?

You always have to look at the User Experience. You don't want to annoy or p!ss off your users or they will find a site like yours that doesn't p!ss them off. If it makes sense to re-direct the user after a successful login, then go ahead and do it.

Of course, I don't care if I p!ss off someone who is trying to run malicious code on my site or find a hidden piece. Then a redirect to ratemypoo seems like a good idea to me!

Wolf

attached mail follows:


On Wed, 2008-10-08 at 16:33 -0400, Wolf wrote:
> <!-- SNIP -->
> > Redirects make sense IMO. IIRC the Yahoo guidelines say not to
> > redirect after a form POST, but unless you have a ka-jillion page
> > views a second (or, "a lot"), then I don't think it's a concern.
>
> Wait, Yahell has guidelines?!?!?
>
> You always have to look at the User Experience. You don't want to annoy or p!ss off your users or they will find a site like yours that doesn't p!ss them off. If it makes sense to re-direct the user after a successful login, then go ahead and do it.
>
> Of course, I don't care if I p!ss off someone who is trying to run malicious code on my site or find a hidden piece. Then a redirect to ratemypoo seems like a good idea to me!
>
> Wolf
>
The only redirects that have p!ssed me off before are those ones that
big sites put in to make room for their adverts. On more than one
occassion I've decided to look elsewhere for whatever it was I was
looking for, although it tends only to be game and (legal) download
sites that do this.

Ash
www.ashleysheridan.co.uk

attached mail follows:


On 8 Oct 2008, at 21:44, Ashley Sheridan wrote:
> On Wed, 2008-10-08 at 16:33 -0400, Wolf wrote:
>> <!-- SNIP -->
>>> Redirects make sense IMO. IIRC the Yahoo guidelines say not to
>>> redirect after a form POST, but unless you have a ka-jillion page
>>> views a second (or, "a lot"), then I don't think it's a concern.
>>
>> Wait, Yahell has guidelines?!?!?
>>
>> You always have to look at the User Experience. You don't want to
>> annoy or p!ss off your users or they will find a site like yours
>> that doesn't p!ss them off. If it makes sense to re-direct the
>> user after a successful login, then go ahead and do it.
>>
>> Of course, I don't care if I p!ss off someone who is trying to run
>> malicious code on my site or find a hidden piece. Then a redirect
>> to ratemypoo seems like a good idea to me!
>>
>> Wolf
>>
> The only redirects that have p!ssed me off before are those ones that
> big sites put in to make room for their adverts. On more than one
> occassion I've decided to look elsewhere for whatever it was I was
> looking for, although it tends only to be game and (legal) download
> sites that do this.

Yeah, I hate it when companies try to make a profit. Don't they know
everything on the Internet is supposed to be free?!?!?!?

Find your stuff elsewhere by all means, but don't slate sites for
using advertising to pay for your FREE usage of their service.

-Stut

PS. For those sarcasm-detector-challenged out there the first
paragraph was full of sarcasm.

--
http://stut.net/

attached mail follows:


On Wed, 2008-10-08 at 21:45 +0100, Stut wrote:
> On 8 Oct 2008, at 21:44, Ashley Sheridan wrote:
> > On Wed, 2008-10-08 at 16:33 -0400, Wolf wrote:
> >> <!-- SNIP -->
> >>> Redirects make sense IMO. IIRC the Yahoo guidelines say not to
> >>> redirect after a form POST, but unless you have a ka-jillion page
> >>> views a second (or, "a lot"), then I don't think it's a concern.
> >>
> >> Wait, Yahell has guidelines?!?!?
> >>
> >> You always have to look at the User Experience. You don't want to
> >> annoy or p!ss off your users or they will find a site like yours
> >> that doesn't p!ss them off. If it makes sense to re-direct the
> >> user after a successful login, then go ahead and do it.
> >>
> >> Of course, I don't care if I p!ss off someone who is trying to run
> >> malicious code on my site or find a hidden piece. Then a redirect
> >> to ratemypoo seems like a good idea to me!
> >>
> >> Wolf
> >>
> > The only redirects that have p!ssed me off before are those ones that
> > big sites put in to make room for their adverts. On more than one
> > occassion I've decided to look elsewhere for whatever it was I was
> > looking for, although it tends only to be game and (legal) download
> > sites that do this.
>
> Yeah, I hate it when companies try to make a profit. Don't they know
> everything on the Internet is supposed to be free?!?!?!?
>
> Find your stuff elsewhere by all means, but don't slate sites for
> using advertising to pay for your FREE usage of their service.
>
> -Stut
>
> PS. For those sarcasm-detector-challenged out there the first
> paragraph was full of sarcasm.
>
I'm not against advertising, just this kind. It makes you sit through a
30 second long advert before you get to the sweet stuff. Now, I don't
have a bandwidth limit, but what about those users who do? Inline
adverts are better, and Google has them worked to a tee. If the model
doesn't work for the big companies then, it's time to find a new model,
but I think one in which the visitors to a site are treated like TV
viewers is not the way to go.

Ash
www.ashleysheridan.co.uk

attached mail follows:


On 8 Oct 2008, at 22:05, Ashley Sheridan wrote:
> On Wed, 2008-10-08 at 21:45 +0100, Stut wrote:
>> On 8 Oct 2008, at 21:44, Ashley Sheridan wrote:
>>> The only redirects that have p!ssed me off before are those ones
>>> that
>>> big sites put in to make room for their adverts. On more than one
>>> occassion I've decided to look elsewhere for whatever it was I was
>>> looking for, although it tends only to be game and (legal) download
>>> sites that do this.
>>
>> Yeah, I hate it when companies try to make a profit. Don't they know
>> everything on the Internet is supposed to be free?!?!?!?
>>
>> Find your stuff elsewhere by all means, but don't slate sites for
>> using advertising to pay for your FREE usage of their service.
>>
>> -Stut
>>
>> PS. For those sarcasm-detector-challenged out there the first
>> paragraph was full of sarcasm.
>>
> I'm not against advertising, just this kind. It makes you sit
> through a
> 30 second long advert before you get to the sweet stuff. Now, I don't
> have a bandwidth limit, but what about those users who do? Inline
> adverts are better, and Google has them worked to a tee. If the model
> doesn't work for the big companies then, it's time to find a new
> model,
> but I think one in which the visitors to a site are treated like TV
> viewers is not the way to go.

I don't disagree that it's not the best model, but it is the best
paying. Why? For precisely the reason you've stated - it interrupts
what you're doing and forces you to pay attention to it. The reason
game and download sites use them is because they pay enough to cover
your usage of their site, whereas I'd bet standard banners would not.

To make a reasonable amount of money from Google adwords you need a
fairly sizable amount of traffic, and even then you won't pay for the
scenario where every user downloads files 100's of meg in size.

If you don't like it and you think it can be done less intrusively I
urge you to go ahead and build a competitor. But don't expect to break
even anytime soon. In the meantime if it really bothers you that much
I would recommend finding a site that lets you pay a monthly fee for
ad-free access.

-Stut

--
http://stut.net/

attached mail follows:


On Wed, 2008-10-08 at 22:15 +0100, Stut wrote:
> I don't disagree that it's not the best model, but it is the best
> paying
I have to disagree. Each and every time I've come across this, I've gone
elsewhere. The model doesn't work as far as I can tell. I think the
problem is the people who create the schemes aren't really aware of what
the Internet can do; something similar to that guy in marketing asking
why it's not possible to duplicate his A4 page, exactly as he set it
out, as a web page. I don't have a better model, but something like that
that's used on Experts Exchange doesn't go too badly with me. Targeted
ads that don't get in my way. I'm more inclined to look at something
that isn't shoved in my face.

Obviously, I'm a programmer, so I probably don't fall into the 'normal'
category for advertising ;)

Ash
www.ashleysheridan.co.uk

attached mail follows:


On 8 Oct 2008, at 22:32, Ashley Sheridan wrote:
> On Wed, 2008-10-08 at 22:15 +0100, Stut wrote:
>> I don't disagree that it's not the best model, but it is the best
>> paying
> I have to disagree. Each and every time I've come across this, I've
> gone
> elsewhere. The model doesn't work as far as I can tell.

It's not the best model but I can assure you it *does* work otherwise
advertisers would not pay the rates such campaigns demand.

> I think the
> problem is the people who create the schemes aren't really aware of
> what
> the Internet can do; something similar to that guy in marketing asking
> why it's not possible to duplicate his A4 page, exactly as he set it
> out, as a web page. I don't have a better model, but something like
> that
> that's used on Experts Exchange doesn't go too badly with me. Targeted
> ads that don't get in my way. I'm more inclined to look at something
> that isn't shoved in my face.

Like I said, I don't disagree, but you have to accept that ads that
interrupt the user pay the best so for sites that are expensive to
run, like download sites, they're economically sound.

I find it interesting that you feel you have the right to criticise
the "people who create the schemes" for not knowing any better, but
you with all your knowledge "of what the internet can do" admit that
you can't come up with a better model.

> Obviously, I'm a programmer, so I probably don't fall into the
> 'normal'
> category for advertising ;)

You may think that but I've never come across any statistics that
suggest that programmers or even technical people in general have a
lower response rate to any form of advertising. I'm sure they are
differences, but as a percentage of internet users we're insignificant
for most websites these days, even when it comes to games.

-Stut

--
http://stut.net/

attached mail follows:


<?php
#let's say we got following string:
$some_string = '<br />blah blah<br />blah blah<br />';
var_dump(explode('<br />', $some_string));
/* OUTPUT:
array(4) {
  [0]=>
  string(0) ""
  [1]=>
  string(9) "blah blah"
  [2]=>
  string(9) "blah blah"
  [3]=>
  string(0) ""
}
*/
#So as you see index 0 and index 3 are empty strings. Keep that in mind
?>

attached mail follows:


On Wed, 2008-10-08 at 11:37 -0700, Yeti wrote:
> <?php
> #let's say we got following string:
> $some_string = '<br />blah blah<br />blah blah<br />';
> var_dump(explode('<br />', $some_string));
> /* OUTPUT:
> array(4) {
> [0]=>
> string(0) ""
> [1]=>
> string(9) "blah blah"
> [2]=>
> string(9) "blah blah"
> [3]=>
> string(0) ""
> }
> */
> #So as you see index 0 and index 3 are empty strings. Keep that in mind
> ?>
>
You could use trim() on it first. I believe that lets you take out the
delimiters at the ends of the string.

Ash
www.ashleysheridan.co.uk

attached mail follows:


hi, i'd like my app to send sms warnings of some events.

if you know of a free / cheap sms service that can be called from php,
please let me/us know.

u earn extra points if it can send to dutch phones / any phone in the
world ;)

attached mail follows:


On 8 Oct 2008, at 20:33, Rene Veerman wrote:
> hi, i'd like my app to send sms warnings of some events.
>
> if you know of a free / cheap sms service that can be called from
> php, please let me/us know.
>
> u earn extra points if it can send to dutch phones / any phone in
> the world ;)

Best I've found is Clickatell (www.clickatell.com) but I've not really
looked too hard.

-Stut

--
http://stut.net/

attached mail follows:


thanks!

Stut wrote:
> On 8 Oct 2008, at 20:33, Rene Veerman wrote:
>> hi, i'd like my app to send sms warnings of some events.
>>
>> if you know of a free / cheap sms service that can be called from
>> php, please let me/us know.
>>
>> u earn extra points if it can send to dutch phones / any phone in the
>> world ;)
>
> Best I've found is Clickatell (www.clickatell.com) but I've not really
> looked too hard.
>
> -Stut
>

attached mail follows:


> -----Original Message-----
> From: Rene Veerman [mailto:rene7705gmail.com]
> Sent: Wednesday, October 08, 2008 2:33 PM
> To: php-generallists.php.net
> Subject: [PHP] sms interfaces?
>
> hi, i'd like my app to send sms warnings of some events.
>
> if you know of a free / cheap sms service that can be called from php,
> please let me/us know.
>
> u earn extra points if it can send to dutch phones / any phone in the
> world ;)

AIM accounts can be used to send messages to SMS by using the full phone
number (i.e., +15735551212) as the contact destination. There's probably
APIs for the service already, be it WSDL or PHP, etc.

Todd Boyd
Web Programmer

attached mail follows:


www.frengo.com provides SMS alert service.

- Jignesh

On Thu, Oct 9, 2008 at 1:25 AM, Boyd, Todd M. <tmboyd1ccis.edu> wrote:

> > -----Original Message-----
> > From: Rene Veerman [mailto:rene7705gmail.com]
> > Sent: Wednesday, October 08, 2008 2:33 PM
> > To: php-generallists.php.net
> > Subject: [PHP] sms interfaces?
> >
> > hi, i'd like my app to send sms warnings of some events.
> >
> > if you know of a free / cheap sms service that can be called from php,
> > please let me/us know.
> >
> > u earn extra points if it can send to dutch phones / any phone in the
> > world ;)
>
> AIM accounts can be used to send messages to SMS by using the full phone
> number (i.e., +15735551212) as the contact destination. There's probably
> APIs for the service already, be it WSDL or PHP, etc.
>
>
> Todd Boyd
> Web Programmer
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


> I think Richard Heyes was working on some of these, actually. Not
> positive if it was plotting or just display, though. If you check the
> archives, you might find something. I'm CC'ing him personally, too.
>
> Here's one link of his I have from memory:
>
> http://www.phpguru.org/RGraph_dev/examples/bar.html

Working on it yes, but until MSIE supports the canvas tag (part of
HTML5) it's not really usable for providing graphs to the public.

When it does though, it'll be a great way of reducing the strain on
your server... :-)

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.phpguru.org/RGraph

attached mail follows:


On Wed, 2008-10-08 at 21:35 +0100, Richard Heyes wrote:
> > I think Richard Heyes was working on some of these, actually. Not
> > positive if it was plotting or just display, though. If you check the
> > archives, you might find something. I'm CC'ing him personally, too.
> >
> > Here's one link of his I have from memory:
> >
> > http://www.phpguru.org/RGraph_dev/examples/bar.html
>
> Working on it yes, but until MSIE supports the canvas tag (part of
> HTML5) it's not really usable for providing graphs to the public.
>
> When it does though, it'll be a great way of reducing the strain on
> your server... :-)
>
> --
> Richard Heyes
>
> HTML5 Graphing for FF, Chrome, Opera and Safari:
> http://www.phpguru.org/RGraph
>
What about splitting the output between using the canvas tag and VML
which only IE supports. From my only foray into VML, the syntax is
pretty simple, and similar to SVG, and is supported by IE5.5+.
Obviously, I'm only advocating this as a last ditch alternative for a
browser that can't get even the basics right yet ;)

Ash
www.ashleysheridan.co.uk

attached mail follows:


On Wed, Oct 8, 2008 at 4:47 PM, Ashley Sheridan
<ashashleysheridan.co.uk> wrote:
>>
> Obviously, I'm only advocating this as a last ditch alternative for a
> browser that can't get even the basics right yet ;)

    What do you mean, "basics"? When you're Microsoft, you don't
invent software to match the standards, you invent standards to match
the software.

--
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

attached mail follows:


On Wed, 2008-10-08 at 16:51 -0400, Daniel Brown wrote:

> On Wed, Oct 8, 2008 at 4:47 PM, Ashley Sheridan
> <ashashleysheridan.co.uk> wrote:
> >>
> > Obviously, I'm only advocating this as a last ditch alternative for a
> > browser that can't get even the basics right yet ;)
>
> What do you mean, "basics"? When you're Microsoft, you don't
> invent software to match the standards, you invent standards to match
> the software.
>
> --
> </Daniel P. Brown>
> More full-root dedicated server packages:
> Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
> Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
> Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
> Dedicated servers, VPS, and hosting from $2.50/mo.
>

I really meant standards when I said basics. IMHO, standards are the
baseline upon which browsers should build. That's how innovation gets
in. I'm not a fan of the M$ model, by which they define their own
standards. I think they are reconsidering their model though, as other
browsers eat more and more of their market share. I mean, IE8 is
actually a little bit closer to meeting the CSS2 requirements now,
surely we should applaud them that effort, or maybe send them a cake ;)

ps, for those that don't know, I'm referring to the cake M$ sent Firefox
congratulating them on shipping Fx3!

Ash
www.ashleysheridan.co.uk

attached mail follows:


On Wed, Oct 8, 2008 at 5:09 PM, Ashley Sheridan
<ashashleysheridan.co.uk> wrote:
>
> I really meant standards when I said basics. IMHO, standards are the
[snip!]

    None of the list-newbies get smiley-less jokes here anymore. What
is this world coming to?!?

> ps, for those that don't know, I'm referring to the cake M$ sent Firefox
> congratulating them on shipping Fx3!

    Just this week I went on hiatus from the FF/TB development teams
and the Mozilla project in general. I didn't get any cake!

--
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

attached mail follows:


On Wed, 2008-10-08 at 17:13 -0400, Daniel Brown wrote:
> On Wed, Oct 8, 2008 at 5:09 PM, Ashley Sheridan
> <ashashleysheridan.co.uk> wrote:
> >
> > I really meant standards when I said basics. IMHO, standards are the
> [snip!]
>
> None of the list-newbies get smiley-less jokes here anymore. What
> is this world coming to?!?
>
> > ps, for those that don't know, I'm referring to the cake M$ sent Firefox
> > congratulating them on shipping Fx3!
>
> Just this week I went on hiatus from the FF/TB development teams
> and the Mozilla project in general. I didn't get any cake!
>
> --
> </Daniel P. Brown>
> More full-root dedicated server packages:
> Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
> Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
> Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
> Dedicated servers, VPS, and hosting from $2.50/mo.
>
You probably wouldn't have wanted any cake, it was most likely spiked
with laxatives to induce the obvious and cause a decline in programming
time ;)

Ash
www.ashleysheridan.co.uk

attached mail follows:


On Wed, Oct 8, 2008 at 5:34 PM, Ashley Sheridan
<ashashleysheridan.co.uk> wrote:
>>
> You probably wouldn't have wanted any cake, it was most likely spiked
> with laxatives to induce the obvious and cause a decline in programming
> time ;)

    Precisely one of the reasons I'm not the only one to take a break! ;-P

    (The latter part of the above statement.)

--
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

attached mail follows:


On Wed, 2008-10-08 at 17:37 -0400, Daniel Brown wrote:
> On Wed, Oct 8, 2008 at 5:34 PM, Ashley Sheridan
> <ashashleysheridan.co.uk> wrote:
> >>
> > You probably wouldn't have wanted any cake, it was most likely spiked
> > with laxatives to induce the obvious and cause a decline in programming
> > time ;)
>
> Precisely one of the reasons I'm not the only one to take a break! ;-P
>
> (The latter part of the above statement.)
>
Whichever way I read that my mind is filled with images I'd rather it
not be... :(

Ash
www.ashleysheridan.co.uk

attached mail follows:


My web site consists of some hard-coded html but on the main, data is
stored in MySQL and through the use of PHP I generate pages of html.

Everything went well this year until around June/July time when I
started noticing quotes (') were escaped in the generated html, so
"it's" would appear as "it\'s". I use Dreamweaver 8 to develop my
site.

Hard-coded html is fine, it also obeys any CSS within it, PHP
generated html however doesn't obey CSS or URL's.

Looking at my computer server setup everything runs properly on the PC
but not on my webspace, it ran OK for 18 months on both. Looking at
php.ini on my PC I note magic_quotes_gpc is set to on and
magic_quotes_runtime is set to off. On my webspace I note
magic_quotes_gpc is set to on as is magic_quotes_runtime, I assume
this is what's screwing up the PHP generated html.

Is there a way to avoid this?

Bryan

--
Using an Iyonix Aria Cube running Risc OS 5.13 and Virtual RPC
AdjustSA running RO 6.10 on a PC.

attached mail follows:


On 8 Oct 2008, at 21:38, Bryan wrote:
> My web site consists of some hard-coded html but on the main, data is
> stored in MySQL and through the use of PHP I generate pages of html.
>
> Everything went well this year until around June/July time when I
> started noticing quotes (') were escaped in the generated html, so
> "it's" would appear as "it\'s". I use Dreamweaver 8 to develop my
> site.
>
> Hard-coded html is fine, it also obeys any CSS within it, PHP
> generated html however doesn't obey CSS or URL's.
>
> Looking at my computer server setup everything runs properly on the PC
> but not on my webspace, it ran OK for 18 months on both. Looking at
> php.ini on my PC I note magic_quotes_gpc is set to on and
> magic_quotes_runtime is set to off. On my webspace I note
> magic_quotes_gpc is set to on as is magic_quotes_runtime, I assume
> this is what's screwing up the PHP generated html.
>
> Is there a way to avoid this?

http://stut.net/blog/2008/06/08/where-are-these-backslashes-coming-from/

-Stut

--
http://stut.net/

attached mail follows:


Hi everyone,

is there a software that will create a flow chart indicating what php
pages are using what tables in a MySql dbase?

Haig