php-general Digest 4 Jun 2012 12:22:49 -0000 Issue 7840

Topics (messages 318122 through 318135):

Re: disabled cookies
        318122 by: Ashley Sheridan
        318123 by: Matijn Woudt
        318124 by: Ashley Sheridan
        318125 by: Matijn Woudt
        318126 by: Lester Caine
        318127 by: Ashley Sheridan
        318128 by: Lester Caine
        318129 by: Ashley Sheridan
        318134 by: Lester Caine
        318135 by: Matijn Woudt

help with preg_match
        318130 by: Chris Purves
        318131 by: Robert Williams
        318132 by: admin

Re: Using default argument values in the middle of the argument list
        318133 by: marco.behnke.biz

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---

Al <n...@ridersite.org> wrote:

>Disabled cookies use to be a problem years ago.  What's your experience
>these days.
>
>I need it for my session ID. As I read the docs, the old method of
>appending it
>to the URL is a security issue.
>
>I can obviously save the ID in a temp file which can be read by all the
>pages
>needing it.
>
>Al....
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

There is a new law been passed in the UK that makes non-essential cookies 
opt-in only, so you must get permission in order to use them.

That said, session cookies are a bit of a grey area. If your site relies on 
them to function, then they're ok. If they're used purely for tracking, they 
need to be made opt-in. Everything between is, like I said, grey.

Thanks,
Ash
http://ashleysheridan.co.uk

--- End Message ---
--- Begin Message ---
On Sun, Jun 3, 2012 at 11:21 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
>
>
> Al <n...@ridersite.org> wrote:
>
>>Disabled cookies use to be a problem years ago.  What's your experience
>>these days.
>>
>>I need it for my session ID. As I read the docs, the old method of
>>appending it
>>to the URL is a security issue.
>>
>>I can obviously save the ID in a temp file which can be read by all the
>>pages
>>needing it.
>>
>>Al....
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
> There is a new law been passed in the UK that makes non-essential cookies 
> opt-in only, so you must get permission in order to use them.
>
> That said, session cookies are a bit of a grey area. If your site relies on 
> them to function, then they're ok. If they're used purely for tracking, they 
> need to be made opt-in. Everything between is, like I said, grey.
>
> Thanks,
> Ash
> http://ashleysheridan.co.uk


A little correction on the above: This law applies to the whole EU, not only UK.

- Matijn

--- End Message ---
--- Begin Message ---

Matijn Woudt <tijn...@gmail.com> wrote:

>On Sun, Jun 3, 2012 at 11:21 PM, Ashley Sheridan
><a...@ashleysheridan.co.uk> wrote:
>>
>>
>> Al <n...@ridersite.org> wrote:
>>
>>>Disabled cookies use to be a problem years ago.  What's your
>experience
>>>these days.
>>>
>>>I need it for my session ID. As I read the docs, the old method of
>>>appending it
>>>to the URL is a security issue.
>>>
>>>I can obviously save the ID in a temp file which can be read by all
>the
>>>pages
>>>needing it.
>>>
>>>Al....
>>>
>>>--
>>>PHP General Mailing List (http://www.php.net/)
>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>> There is a new law been passed in the UK that makes non-essential
>cookies opt-in only, so you must get permission in order to use them.
>>
>> That said, session cookies are a bit of a grey area. If your site
>relies on them to function, then they're ok. If they're used purely for
>tracking, they need to be made opt-in. Everything between is, like I
>said, grey.
>>
>> Thanks,
>> Ash
>> http://ashleysheridan.co.uk
>
>
>A little correction on the above: This law applies to the whole EU, not
>only UK.
>
>- Matijn

Oh, my bad!

Thanks,
Ash
http://ashleysheridan.co.uk

--- End Message ---
--- Begin Message ---
On Sun, Jun 3, 2012 at 11:26 PM, Matijn Woudt <tijn...@gmail.com> wrote:
> On Sun, Jun 3, 2012 at 11:21 PM, Ashley Sheridan
> <a...@ashleysheridan.co.uk> wrote:
>>
>>
>> Al <n...@ridersite.org> wrote:
>>
>>>Disabled cookies use to be a problem years ago.  What's your experience
>>>these days.
>>>
>>>I need it for my session ID. As I read the docs, the old method of
>>>appending it
>>>to the URL is a security issue.
>>>
>>>I can obviously save the ID in a temp file which can be read by all the
>>>pages
>>>needing it.
>>>
>>>Al....
>>>
>>>--
>>>PHP General Mailing List (http://www.php.net/)
>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>> There is a new law been passed in the UK that makes non-essential cookies 
>> opt-in only, so you must get permission in order to use them.
>>
>> That said, session cookies are a bit of a grey area. If your site relies on 
>> them to function, then they're ok. If they're used purely for tracking, they 
>> need to be made opt-in. Everything between is, like I said, grey.
>>
>> Thanks,
>> Ash
>> http://ashleysheridan.co.uk
>
>
> A little correction on the above: This law applies to the whole EU, not only 
> UK.
>
> - Matijn

BTW, There's a website [1] that has all the information and even a
tool for checking what your site does with cookies.

- Matijn

[1] http://www.cookielaw.org/

--- End Message ---
--- Begin Message ---
Matijn Woudt wrote:
BTW, There's a website [1] that has all the information and even a
tool for checking what your site does with cookies.

- Matijn

[1]http://www.cookielaw.org/

Which fails at the first security hurdle!
It requires Google Chrome, which is bigger black hole as far as my customers are concerned.

http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx is perhaps the best guidance for UK users ... currently.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---

Lester Caine <les...@lsces.co.uk> wrote:

>Matijn Woudt wrote:
>> BTW, There's a website [1] that has all the information and even a
>> tool for checking what your site does with cookies.
>>
>> - Matijn
>>
>> [1]http://www.cookielaw.org/
>
>Which fails at the first security hurdle!
>It requires Google Chrome, which is bigger black hole as far as my
>customers are
>concerned.
>
>http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx
>
>is perhaps the best guidance for UK users ... currently.
>
>--
>Lester Caine - G8HFL
>-----------------------------
>Contact - http://lsces.co.uk/wiki/?page=contact
>L.S.Caine Electronic Services - http://lsces.co.uk
>EnquirySolve - http://enquirysolve.com/
>Model Engineers Digital Workshop - http://medw.co.uk//
>Firebird - http://www.firebirdsql.org/index.php
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

How is Google Chrome a bigger security risk than the other popular browsers, Fx 
and IE?

I was under the impression it was more secure than either of those.

Thanks,
Ash
http://ashleysheridan.co.uk

--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
How is Google Chrome a bigger security risk than the other popular browsers, Fx 
and IE?

I was under the impression it was more secure than either of those.

License Conditions ... They may have removed the original landgrab section, but there is still a potential for Google to gather private information and this is an unacceptable risk when dealing with customers who deal with sensitive private data.

In addition, intrusive advertising has no place in public service systems anyway ... Google maps and the like are similarly inappropriate since using them allows Google to track material that IS also sensitive. It is THIS tracking that the 'cookie law' was supposed to address, but the problem sites are not even covered by it ... WE are if we link to uncontrolled sites and services.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---

Lester Caine <les...@lsces.co.uk> wrote:

>Ashley Sheridan wrote:
>> How is Google Chrome a bigger security risk than the other popular
>browsers, Fx and IE?
>>
>> I was under the impression it was more secure than either of those.
>
>License Conditions ... They may have removed the original landgrab
>section, but
>there is still a potential for Google to gather private information and
>this is
>an unacceptable risk when dealing with customers who deal with
>sensitive private
>data.
>
>In addition, intrusive advertising has no place in public service
>systems anyway
>... Google maps and the like are similarly inappropriate since using
>them allows
>Google to track material that IS also sensitive. It is THIS tracking
>that the
>'cookie law' was supposed to address, but the problem sites are not
>even covered
>by it ... WE are if we link to uncontrolled sites and services.
>
>--
>Lester Caine - G8HFL
>-----------------------------
>Contact - http://lsces.co.uk/wiki/?page=contact
>L.S.Caine Electronic Services - http://lsces.co.uk
>EnquirySolve - http://enquirysolve.com/
>Model Engineers Digital Workshop - http://medw.co.uk//
>Firebird - http://www.firebirdsql.org/index.php
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

Ok, but don't confuse the browser with the services Google offers. The two are 
very separate, and its confusing to mention the services in an argument about 
the browser.

Thanks,
Ash
http://ashleysheridan.co.uk

--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:

Lester Caine<les...@lsces.co.uk>  wrote:

Ashley Sheridan wrote:
How is Google Chrome a bigger security risk than the other popular
browsers, Fx and IE?

I was under the impression it was more secure than either of those.

License Conditions ... They may have removed the original landgrab
section, but
there is still a potential for Google to gather private information and
this is
an unacceptable risk when dealing with customers who deal with
sensitive private
data.

In addition, intrusive advertising has no place in public service
systems anyway
... Google maps and the like are similarly inappropriate since using
them allows
Google to track material that IS also sensitive. It is THIS tracking
that the
'cookie law' was supposed to address, but the problem sites are not
even covered
by it ... WE are if we link to uncontrolled sites and services.

Ok, but don't confuse the browser with the services Google offers. The two are 
very separate, and its confusing to mention the services in an argument about 
the browser.

I'm just working to rules that are applied to me by the security departments of the customers *I* am dealing with. While you might think that there should be a distinct separation between the two areas, the recent 'rationalisation' of Google privacy notices eroded that separation again ... Google can do what they like and can change the rules again when they see fit.

We are at a point where the 'cookies' laws have become a requirement simply to ensure that we KNOW what is being gathered and why.

The question I asked in an earlier thread has not had an answer ... are there any good open source add-ins for php that allow us to manage this area in Europe?

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---
--- Begin Message ---
On Mon, Jun 4, 2012 at 1:09 AM, Lester Caine <les...@lsces.co.uk> wrote:
> Ashley Sheridan wrote:
>>
>> How is Google Chrome a bigger security risk than the other popular
>> browsers, Fx and IE?
>>
>> I was under the impression it was more secure than either of those.
>
>
> License Conditions ... They may have removed the original landgrab section,
> but there is still a potential for Google to gather private information and
> this is an unacceptable risk when dealing with customers who deal with
> sensitive private data.
>
> In addition, intrusive advertising has no place in public service systems
> anyway ... Google maps and the like are similarly inappropriate since using
> them allows Google to track material that IS also sensitive. It is THIS
> tracking that the 'cookie law' was supposed to address, but the problem
> sites are not even covered by it ... WE are if we link to uncontrolled sites
> and services.
>

I wonder what browser you're using. I just read the IE10 privacy
policy, and it pretty much states the same, Microsoft can collect
private data from you. Opera, Firefox and Safari probably have
something similar.

You're probably better off being worried about the Google services,
though the same applies probably to the Bing en Yahoo search engines.
And you don't think that Bing Maps collects data about you?

Please don't forget that it is the advertising market that brought us
the free (in cash) internet. With the help of cookies giving us better
ads, the free internet has grown. People need to chill down a bit
about their privacy online. In the end, probably the only real danger
of your own privacy is your own facebook, myspace, google+, twitter,
linkedin, ... profile.

And last but not least, your personal information is probably at a lot
more places than the internet, quite a few stores have things like
membership cards, and guess what, they track you there. They know
exactly what you bought etc. And for example, here in the Netherlands,
we have a new public transportation system, called the 'OV-chipkaart',
which is basically a RFID card. There exists 2 types, anonymous and a
personal one. Now they can happily track where we are going with the
public transportation.

Personally, I find those last thing much worse than Google collecting
my search actions.

- Matijn

--- End Message ---
--- Begin Message ---
Hello,

I am trying to use preg_match to match something from an html file. Within the html file is some text that looks like:

<span>Something, something end</span>

I know that the text ends 'end', but I don't know what the Something, something is. I am using preg_match as follows:

preg_match('/[^>]*end/',$curl_response,$matches);

I want to match 'end' and everything before it that is not '>'.

The problem appears to be with the '>'. I have tried escaping (\>), but it didn't make a difference. The php script hangs when it tries to run this function.


--
Chris Purves

"There's a time to think, and a time to act. And this, gentlemen, is no time to think." - Sheriff Bud B. Boomer
--- End Message ---
--- Begin Message ---
On Jun 3, 2012, at 17:28, "Chris Purves" <ch...@northfolk.ca> wrote:

> I know that the text ends 'end', but I don't know what the Something,
> something is.  I am using preg_match as follows:
>
> preg_match('/[^>]*end/',$curl_response,$matches);
>
> I want to match 'end' and everything before it that is not '>'.

You need to match something at the beginning. Try this:

preg_match('/>([^>]*end)/', $curl_response, $matches);

Assuming a match, you can then look to $matches[1] for your content.


--
Bob Williams

Notice: This communication, including attachments, may contain information that 
is confidential. It constitutes non-public information intended to be conveyed 
only to the designated recipient(s). If the reader or recipient of this 
communication is not the intended recipient, an employee or agent of the 
intended recipient who is responsible for delivering it to the intended 
recipient, or if you believe that you have received this communication in 
error, please notify the sender immediately by return e-mail and promptly 
delete this e-mail, including attachments without reading or saving them in any 
manner. The unauthorized use, dissemination, distribution, or reproduction of 
this e-mail, including attachments, is prohibited and may be unlawful. If you 
have received this email in error, please notify us immediately by e-mail or 
telephone and delete the e-mail and the attachments (if any).

--- End Message ---
--- Begin Message ---

-----Original Message-----
From: Chris Purves [mailto:ch...@northfolk.ca] 
Sent: Sunday, June 03, 2012 8:26 PM
To: php-general General
Subject: [PHP] help with preg_match

Hello,

I am trying to use preg_match to match something from an html file. 
Within the html file is some text that looks like:

<span>Something, something end</span>

I know that the text ends 'end', but I don't know what the Something,
something is.  I am using preg_match as follows:

preg_match('/[^>]*end/',$curl_response,$matches);

I want to match 'end' and everything before it that is not '>'.

The problem appears to be with the '>'.  I have tried escaping (\>), but it
didn't make a difference.  The php script hangs when it tries to run this
function.


--
Chris Purves

"There's a time to think, and a time to act. And this, gentlemen, is no time
to think." - Sheriff Bud B. Boomer

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
-------------------------------------------------------------------

You could try this

preg_match_all('/(<span[^<>]*>*)(.*)(</span[^<>]*>)/is',$curl_response,$matc
hes);
print_r($matches);



Rick


--- End Message ---
--- Begin Message ---

324...@mail.muni.cz hat am 1. Juni 2012 um 21:52 geschrieben:

> Hi,
>
> as I accidentally found out that PHP allows default argument values
> to occur not only at the end of parameter list:
>
> function ( Classname $a, Classname $b = null, Classname $c ) ...
>
> Unfortunately, documentation does not state what is supposed to happen in
> such situation.
> It appears $b can be an instance of Classname or a null.


You can find anything on that topic on the type hint section.
If you use type hinting:

Classname $a,

$a can only be instance of Classname, nothing else. But if you want to allow
null as well, you have to write

Classname $a = null,

Don't mistake this as default value! It is _meant_ as "Classname or null" are
allowed.

--- End Message ---

Reply via email to