php-general Digest 23 May 2010 20:28:19 -0000 Issue 6760

2010-05-23 Thread php-general-digest-help
php-general Digest 23 May 2010 20:28:19 - Issue 6760 Topics (messages 305447 through 305460): Re: Multiple Login in a single PC should not be possible 305447 by: Karl DeSaulniers 305448 by: Karl DeSaulniers 305453 by: Robert Cummings 305454 by: Robert

Re: [PHP] securing a custom app

2010-05-23 Thread Adam Richardson
On Sun, May 23, 2010 at 12:40 AM, David Mehler dave.meh...@gmail.comwrote: Hello, I've got a custom app that interacts with a database. I want to use something stronger than .htaccess to protect it and ssl is not available as this is a shared host. There will be several user's accessing this

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Karl DeSaulniers
What about creating a java or ajax proxy that verifies the system mixed with PHP login security and cookies? Maybe mix it with some SSL?? Karl On May 22, 2010, at 10:37 PM, Karl DeSaulniers wrote: I am going to ask my flash guru buddies. Let me see if I can find anything out. Karl On

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Karl DeSaulniers
Also, on the flash subject, I believe you can utilize the SharedObject class to achieve what they are wanting. I was told that you MUST remember to delete the SharedObject if the browser window is closed or crashes. Not sure on how this is done. Karl On May 23, 2010, at 3:59 AM, Karl

[PHP] Is there a good way to extract the embed/object content in HTML with/without closing tag?

2010-05-23 Thread Chian Hsieh
Hi, I want to extract all contents started with embed and object with/without closing tags. My solution is using a regular expression to get it work, but there is some exception I could not handle out. The REGEXs I used are: // With closing tag if

Re: [PHP] securing a custom app

2010-05-23 Thread David Mehler
Hello everyone, Thanks. I'm looking in to the ssl, I would like to use it, and it does seem much less work than the alternative. Thanks. Dave. On 5/23/10, Adam Richardson simples...@gmail.com wrote: On Sun, May 23, 2010 at 12:40 AM, David Mehler dave.meh...@gmail.comwrote: Hello, I've got a

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread tedd
At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n, $input_text); $output_text = implode(\n,$text_array); Sorry tedd, this is broken. It doesn't solve problems

Re: [PHP] securing a custom app

2010-05-23 Thread Nilesh Govindarajan
On 05/23/2010 05:22 PM, David Mehler wrote: Hello everyone, Thanks. I'm looking in to the ssl, I would like to use it, and it does seem much less work than the alternative. Thanks. Dave. On 5/23/10, Adam Richardsonsimples...@gmail.com wrote: On Sun, May 23, 2010 at 12:40 AM, David

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Robert Cummings
A virtual machine is like a separate computer, but running in the same computer. It would easily thwart this. Cheers, Rob. Karl DeSaulniers wrote: What about creating a java or ajax proxy that verifies the system mixed with PHP login security and cookies? Maybe mix it with some SSL??

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Robert Cummings
See comment on virtual machine :) But even without a virtual machine, is this SharedObject saved in a browser determined location, or does the flash app get a say on where it wants to go. Is it shared between flash apps in same browser, or shared across all browsers on same machine. Cheers,

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Robert Cummings
tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n, $input_text); $output_text = implode(\n,$text_array); Sorry tedd, this is broken. It doesn't

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Nathan Rixham
Karl DeSaulniers wrote: can't be done I'm afraid, no matter how hard you look - there is *always* a way around it. only thing you can do is in certain situations ensure that whatever important 'act' is carried out is limited to a fixed person with some personally identifiable data; for

[PHP] Re: Is there a good way to extract the embed/object content in HTML with/without closing tag?

2010-05-23 Thread Nathan Rixham
Chian Hsieh wrote: Hi, I want to extract all contents started with embed and object with/without closing tags. My solution is using a regular expression to get it work, but there is some exception I could not handle out. The REGEXs I used are: // With closing tag if

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Nathan Rixham
quick confirm: flash won't help you here (nor java, ajax, virtualisation, client side programs, ip filtering, browser detection) - it's not possible I'm afraid; best you can do is limit with personally identifiable information and trust that users won't be sharing an account which has

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n, $input_text); $output_text = implode(\n,$text_array); Sorry tedd, this is

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Nathan Rixham wrote: Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n, $input_text); $output_text =

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Robert Cummings
Nathan Rixham wrote: Nathan Rixham wrote: Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n, $input_text); $output_text =

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Karl DeSaulniers
Hi Nathan, The problem is not mine to speak of necessarily. I was trying to help find a solution for another. But from what I understand, they have a online lesson that they dont want people to be able to log in as another user and get the answers to. Here is the their post. On May 14,

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Nathan Rixham wrote: Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array(); $text_array = explode(\n\n,

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Nathan Rixham
Karl DeSaulniers wrote: Hi Nathan, The problem is not mine to speak of necessarily. I was trying to help find a solution for another. But from what I understand, they have a online lesson that they dont want people to be able to log in as another user and get the answers to. Here is the

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Robert Cummings
Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Nathan Rixham wrote: Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it: $text_array = array();

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Nathan Rixham wrote: Robert Cummings wrote: tedd wrote: At 1:02 PM -0400 5/22/10, Robert Cummings wrote: tedd wrote: If that is all (i.e., removing double linefeeds), then this will do it:

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Robert Cummings
Nathan Rixham wrote: Robert Cummings wrote: You may want to start testing your solutions. None have worked yet. Not even close :) filed under 'works for me' ?php $input = 'blah b asd as d asd a sd da asd d asd da'; echo preg_replace( /(\s)\s+/im, '\\1', $input ); on

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Karl DeSaulniers
I was given a solution, or a work-around. You will have to use flash, but, you can set up a LocalConnection class that determines if the swf is being run on the same system and if it is boot one. You have the LocalConnection class send out a message to itself and if it answers itself, then

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Karl DeSaulniers
You may still have trouble with virtual machines though. Karl On May 23, 2010, at 4:18 PM, Karl DeSaulniers wrote: I was given a solution, or a work-around. You will have to use flash, but, you can set up a LocalConnection class that determines if the swf is being run on the same system

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Robert Cummings wrote: You may want to start testing your solutions. None have worked yet. Not even close :) filed under 'works for me' ?php $input = 'blah b asd as d asd a sd da asd d asd da'; echo preg_replace( /(\s)\s+/im,

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Robert Cummings
Nathan Rixham wrote: Yes it was client stripping out extra whitespace! thanks Rob, replicated your results: 1 2 3 4 5 6 and then 'fixed' to give what's needed: preg_replace( /(((\r|)\n)(\h*|))+/im, '\\1' , $input ); the above keeps line termination the same as in the source file; can

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Nathan Rixham
Robert Cummings wrote: Nathan Rixham wrote: Yes it was client stripping out extra whitespace! thanks Rob, replicated your results: 1 2 3 4 5 6 and then 'fixed' to give what's needed: preg_replace( /(((\r|)\n)(\h*|))+/im, '\\1' , $input ); the above keeps line termination the same as in

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Karl DeSaulniers
I was also told that you can use Adobe Air to control this as well. Air only allows one copy per machine to run originally. Here is a link to set it to run multiple copies. You can use this to see how to set it up and figure a way to not let yours. If that is the route you take.

Re: [PHP] Multiple Login in a single PC should not be possible

2010-05-23 Thread Karl DeSaulniers
The consensus I have been getting is that there really is no way to block this type of activity, BUT you can make it difficult enough to deter most attempts. Karl On May 23, 2010, at 9:42 PM, Karl DeSaulniers wrote: I was also told that you can use Adobe Air to control this as well. Air

Re: [PHP] Remove blank lines from a file

2010-05-23 Thread Robert Cummings
Nathan Rixham wrote: Robert Cummings wrote: Nathan Rixham wrote: Yes it was client stripping out extra whitespace! thanks Rob, replicated your results: 1 2 3 4 5 6 and then 'fixed' to give what's needed: preg_replace( /(((\r|)\n)(\h*|))+/im, '\\1' , $input ); the above keeps line