[PHP] Multiple Login in a single PC should not be possible
Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will work for all browsers in a single machine.. I hope You will help me out Regards Jagdeep Singh +91 9988009272
Re: [PHP] Multiple Login in a single PC should not be possible
Hi Jagdeep, I would make an "active users" table in your database that the username gets loaded into on successful login and in your login script also check this table before letting them log in. Karl On May 14, 2010, at 2:18 AM, Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will work for all browsers in a single machine.. I hope You will help me out Regards Jagdeep Singh +91 9988009272 Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? The browser IP address works for us quite reliably. Once logged in, you get a message saying already logged on ... and where ... but it does need a little help if the user closes the browser without logging out. One needs a facility to 'bounce' a user now and again however some remote users may well have 'floating' IP addresses :( Cross browser on the same machine may be a little more problematic! How would one know that it's not just from another windows of the same browser. Browser sniffing should allow that to be included, but we've not needed to go that far yet. Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will work for all browsers in a single machine.. Unfortunately not ... -- 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
Re: [PHP] Multiple Login in a single PC should not be possible
Just remember to remove them from this table on log out. Karl Sent from losPhone On May 14, 2010, at 2:23 AM, Karl DeSaulniers wrote: Hi Jagdeep, I would make an "active users" table in your database that the username gets loaded into on successful login and in your login script also check this table before letting them log in. Karl On May 14, 2010, at 2:18 AM, Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will work for all browsers in a single machine.. I hope You will help me out Regards Jagdeep Singh +91 9988009272 Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
On Fri, May 14, 2010 at 12:29 AM, Lester Caine wrote: > Jagdeep Singh wrote: >> >> Hi All! >> >> I am looking for a solution, I want a user to do a single Login only on a >> PC >> . >> >> E.g. If a User has logged on my website website.com in Internet explorer, >> then he cant login on same website in another browser like Firefox etc >> with >> same loginid or another. >> >> Can I trace MAC address of a single machine to solve this issue? > > The browser IP address works for us quite reliably. Once logged in, you get > a message saying already logged on ... and where ... but it does need a > little help if the user closes the browser without logging out. One needs a > facility to 'bounce' a user now and again however some remote users may > well have 'floating' IP addresses :( Or in some cases, they may have multiple internet connections. I used to have 2, 1 cable and 1 DSL. I used FreeBSD's PF to do 'load balance' ;) It works really well with any apps that do multiple connections. Regards, Tommy > > Cross browser on the same machine may be a little more problematic! How > would one know that it's not just from another windows of the same browser. > Browser sniffing should allow that to be included, but we've not needed to > go that far yet. > >> Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will >> work for all browsers in a single machine.. > > Unfortunately not ... > > -- > 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
Re: [PHP] Multiple Login in a single PC should not be possible
On 14 May 2010 09:29, Lester Caine wrote: > Jagdeep Singh wrote: >> >> Hi All! >> >> I am looking for a solution, I want a user to do a single Login only on a >> PC >> . >> >> E.g. If a User has logged on my website website.com in Internet explorer, >> then he cant login on same website in another browser like Firefox etc >> with >> same loginid or another. >> >> Can I trace MAC address of a single machine to solve this issue? > > The browser IP address works for us quite reliably. Once logged in, you get > a message saying already logged on ... and where ... but it does need a > little help if the user closes the browser without logging out. One needs a > facility to 'bounce' a user now and again however some remote users may > well have 'floating' IP addresses :( > Don't rely on IP addresses staying the same for a user, it's not safe in any way and not needed anyway. Karls method is probably the best bet - just remember to record "last accessed time" so anyone not accessing for more than 15-20 minutes will succeed if trying to log in again. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with passing-by-reference
Hi. I'm doing the 5.3-strict thing, and am removing all my passing-by-reference muck from a script of mine. But i've run into a problem; I use the following construct to push new values fairly deeply inside an array structure; $chase = chaseToReference ($wm, $path); $arr = result($chase); $arr[$v] = $lid; $path is a flat-list array of indexes in $wm that have to be traversed to get to the right portion of $wm. a debug-dump of $wm and $arr after running this code shows $arr correctly updated, but $wm not. :(( here are the functions involved, any help is much appreciated. function chaseToReference (&$array, $path) { if (!empty($path)) { if (empty($array[$path[0]])) { return badResult (E_USER_WARNING, array( 'msg' => 'Could not walk the full tree', '$path' => $path, '$array (possibly partially walked)' => $array )); } else return chaseToReference($array[$path[0]], array_slice($path, 1)); } else { return goodResult($array); } } function result(&$r) { return $r['result']; } function goodResult(&$r) { $r2 = array ( 'isMetaForFunc' => true, 'result' => &$r ); return $r2; } -- - Greetings from Rene7705, My free open source webcomponents: http://code.google.com/u/rene7705/ http://mediabeez.ws/downloads (and demos) http://www.facebook.com/rene7705 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
Hi, yes, I can make a databse table to record LOGIN details, But I want that No other user can login on same machine on smae or another browser. E.g. If user1 has logged in from IE then user2 should not login from Firefox or Chrome etc.. I need ONLY ONE USER ACCESS AT SAME TIME ON SAME MACHINE (On Same or Other broswers) Regards Jagdeep Singh On Fri, May 14, 2010 at 1:26 PM, Peter Lind wrote: > On 14 May 2010 09:29, Lester Caine wrote: > > Jagdeep Singh wrote: > >> > >> Hi All! > >> > >> I am looking for a solution, I want a user to do a single Login only on > a > >> PC > >> . > >> > >> E.g. If a User has logged on my website website.com in Internet > explorer, > >> then he cant login on same website in another browser like Firefox etc > >> with > >> same loginid or another. > >> > >> Can I trace MAC address of a single machine to solve this issue? > > > > The browser IP address works for us quite reliably. Once logged in, you > get > > a message saying already logged on ... and where ... but it does need a > > little help if the user closes the browser without logging out. One needs > a > > facility to 'bounce' a user now and again however some remote users > may > > well have 'floating' IP addresses :( > > > > Don't rely on IP addresses staying the same for a user, it's not safe > in any way and not needed anyway. Karls method is probably the best > bet - just remember to record "last accessed time" so anyone not > accessing for more than 15-20 minutes will succeed if trying to log in > again. > > Regards > Peter > > -- > > WWW: http://plphp.dk / http://plind.dk > LinkedIn: http://www.linkedin.com/in/plind > Flickr: http://www.flickr.com/photos/fake51 > BeWelcome: Fake51 > Couchsurfing: Fake51 > >
[PHP] Re: problem with passing-by-reference
changed all function-definitions to include a "&" before their name, no change in behavior though.. On Fri, May 14, 2010 at 10:09 AM, Rene Veerman wrote: > Hi. > > I'm doing the 5.3-strict thing, and am removing all my > passing-by-reference muck from a script of mine. > > But i've run into a problem; > > I use the following construct to push new values fairly deeply inside > an array structure; > > $chase = chaseToReference ($wm, $path); > $arr = result($chase); > $arr[$v] = $lid; > > $path is a flat-list array of indexes in $wm that have to be traversed > to get to the right portion of $wm. > a debug-dump of $wm and $arr after running this code shows $arr > correctly updated, but $wm not. :(( > > here are the functions involved, any help is much appreciated. > > function chaseToReference (&$array, $path) { > if (!empty($path)) { > if (empty($array[$path[0]])) { > return badResult (E_USER_WARNING, array( > 'msg' => 'Could not walk the full tree', > '$path' => $path, > '$array (possibly partially walked)' => $array > )); > } else return chaseToReference($array[$path[0]], array_slice($path, 1)); > } else { > return goodResult($array); > } > } > > function result(&$r) { > return $r['result']; > } > > function goodResult(&$r) { > $r2 = array ( > 'isMetaForFunc' => true, > 'result' => &$r > ); > return $r2; > } > > > > -- > - > Greetings from Rene7705, > > My free open source webcomponents: > http://code.google.com/u/rene7705/ > http://mediabeez.ws/downloads (and demos) > > http://www.facebook.com/rene7705 > - > -- - Greetings from Rene7705, My free open source webcomponents: http://code.google.com/u/rene7705/ http://mediabeez.ws/downloads (and demos) http://www.facebook.com/rene7705 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem with passing-by-reference
On 14 May 2010 10:09, Rene Veerman wrote: > Hi. > > I'm doing the 5.3-strict thing, and am removing all my > passing-by-reference muck from a script of mine. > > But i've run into a problem; > > I use the following construct to push new values fairly deeply inside > an array structure; > > $chase = chaseToReference ($wm, $path); > $arr = result($chase); > $arr[$v] = $lid; > > $path is a flat-list array of indexes in $wm that have to be traversed > to get to the right portion of $wm. > a debug-dump of $wm and $arr after running this code shows $arr > correctly updated, but $wm not. :(( > > here are the functions involved, any help is much appreciated. > > function chaseToReference (&$array, $path) { > if (!empty($path)) { > if (empty($array[$path[0]])) { > return badResult (E_USER_WARNING, array( > 'msg' => 'Could not walk the full tree', > '$path' => $path, > '$array (possibly partially walked)' => $array > )); > } else return chaseToReference($array[$path[0]], array_slice($path, 1)); > } else { > return goodResult($array); > } > } > > function result(&$r) { > return $r['result']; > } > > function goodResult(&$r) { > $r2 = array ( > 'isMetaForFunc' => true, > 'result' => &$r > ); > return $r2; > } > After a quick glance, I can't actually see any modifications to $wm in this code. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
Jagdeep Singh wrote: Hi, yes, I can make a databse table to record LOGIN details, But I want that No other user can login on same machine on smae or another browser. E.g. If user1 has logged in from IE then user2 should not login from Firefox or Chrome etc.. I need ONLY ONE USER ACCESS AT SAME TIME ON SAME MACHINE (On Same or Other broswers) I'm doing almost exactly that on my CMS system. But we have the advantage that it is intranet, so we can cleanly identify the machines. Once a counter position is in use no one else can log in to that machine, and while loged in there a user can't login again. We can't easily add a 'timeout' since some interviews can take over an hour and the position remains locked for the whole period, but supervisor access allows a 'stuck user' to be bounced so they can log in again. If you don't have such control over the machines, then you may need to do a little more work to build up a list of 'active machines' in parallel with the 'active user' table. -- 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
[PHP] Re: problem with passing-by-reference
> On Fri, May 14, 2010 at 10:09 AM, Rene Veerman wrote: >> Hi. >> >> I'm doing the 5.3-strict thing, and am removing all my >> passing-by-reference muck from a script of mine. >> >> But i've run into a problem; >> >> I use the following construct to push new values fairly deeply inside >> an array structure; >> >> $chase = chaseToReference ($wm, $path); >> $arr = result($chase); >> $arr[$v] = $lid; >> >> $path is a flat-list array of indexes in $wm that have to be traversed >> to get to the right portion of $wm. >> a debug-dump of $wm and $arr after running this code shows $arr >> correctly updated, but $wm not. :(( >> >> here are the functions involved, any help is much appreciated. >> >> function chaseToReference (&$array, $path) { >> if (!empty($path)) { >> if (empty($array[$path[0]])) { >> return badResult (E_USER_WARNING, array( >> 'msg' => 'Could not walk the full tree', >> '$path' => $path, >> '$array (possibly partially walked)' => $array >> )); >> } else return chaseToReference($array[$path[0]], array_slice($path, 1)); >> } else { >> return goodResult($array); >> } >> } >> >> function result(&$r) { >> return $r['result']; >> } >> >> function goodResult(&$r) { >> $r2 = array ( >> 'isMetaForFunc' => true, >> 'result' => &$r >> ); >> return $r2; >> } >> On Fri, May 14, 2010 at 10:39 AM, Rene Veerman wrote: > changed all function-definitions to include a "&" before their name, > no change in behavior though.. > And then, change the calling code to: $chase = &chaseToReference ($wm, $path); $arr = &result($chase); $arr[$v] = $lid; and it works :)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
You lost me on that one. You want it so that multiple users can log in, but they have to be on separate browsers? Karl On May 14, 2010, at 3:26 AM, Jagdeep Singh wrote: Hi, yes, I can make a databse table to record LOGIN details, But I want that No other user can login on same machine on smae or another browser. E.g. If user1 has logged in from IE then user2 should not login from Firefox or Chrome etc.. I need ONLY ONE USER ACCESS AT SAME TIME ON SAME MACHINE (On Same or Other broswers) Regards Jagdeep Singh On Fri, May 14, 2010 at 1:26 PM, Peter Lind wrote: On 14 May 2010 09:29, Lester Caine wrote: Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? The browser IP address works for us quite reliably. Once logged in, you get a message saying already logged on ... and where ... but it does need a little help if the user closes the browser without logging out. One needs a facility to 'bounce' a user now and again however some remote users may well have 'floating' IP addresses :( Don't rely on IP addresses staying the same for a user, it's not safe in any way and not needed anyway. Karls method is probably the best bet - just remember to record "last accessed time" so anyone not accessing for more than 15-20 minutes will succeed if trying to log in again. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] jquery password problem
I encode my password with md5 base 64 ..on the php side but i have a problem with the POST that this function i using on my form. after posting my data + is replaced with space I came out with that explanation after a lot of tries and echos in my code files i found out that after using numbers ,onlu on that case, in the password field the space between the encoding was replaced with a + or / sometimes i tried to remove the + or / but still i get the same results any ideas data: "firstname="+ firstname +"& lastname="+ lastname +"& username="+ username +"& email="+ email +"& password="+ password +"& save="+ save+"& user_type="+ user_type,
Re: [PHP] Multiple Login in a single PC should not be possible
Hi J, Well, if you have an active users table with a users name in it and you check when logging in to see if that users name is in that table, They can not log in again. No matter what machine or browser they are in. As far as another user logging in on that same machine, you could match a cookie on the machine and the database that holds what browser they are using and username, an MD5 ip, etc. But someone can always delete cookies and some even know how to bounce ip addresses, so unless you have a bunch of hackers using your machines, these suggestions should work. Unless someone else has a better suggestion. GL, :) Karl On May 14, 2010, at 4:08 AM, Jagdeep Singh wrote: I want that only single user can login on a single machine If User has logged in one browser he should not login through 2nd browser... And no other user should login on same machine in any browser in Simple words: MAXIMUM ONE USER SHOULD LOGIN IN ONE MACHINE... On Fri, May 14, 2010 at 2:23 PM, Karl DeSaulniers wrote: You lost me on that one. You want it so that multiple users can log in, but they have to be on separate browsers? Karl On May 14, 2010, at 3:26 AM, Jagdeep Singh wrote: Hi, yes, I can make a databse table to record LOGIN details, But I want that No other user can login on same machine on smae or another browser. E.g. If user1 has logged in from IE then user2 should not login from Firefox or Chrome etc.. I need ONLY ONE USER ACCESS AT SAME TIME ON SAME MACHINE (On Same or Other broswers) Regards Jagdeep Singh On Fri, May 14, 2010 at 1:26 PM, Peter Lind wrote: On 14 May 2010 09:29, Lester Caine wrote: Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? The browser IP address works for us quite reliably. Once logged in, you get a message saying already logged on ... and where ... but it does need a little help if the user closes the browser without logging out. One needs a facility to 'bounce' a user now and again however some remote users may well have 'floating' IP addresses :( Don't rely on IP addresses staying the same for a user, it's not safe in any way and not needed anyway. Karls method is probably the best bet - just remember to record "last accessed time" so anyone not accessing for more than 15-20 minutes will succeed if trying to log in again. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Karl DeSaulniers Design Drumm http://designdrumm.com
Re: [PHP] Multiple Login in a single PC should not be possible
Only other thing I could think of is a session timeout. Because if two people are using the same computer, one person is going to be away long enough to time out. HTH Karl On May 14, 2010, at 4:21 AM, Karl DeSaulniers wrote: Hi J, Well, if you have an active users table with a users name in it and you check when logging in to see if that users name is in that table, They can not log in again. No matter what machine or browser they are in. As far as another user logging in on that same machine, you could match a cookie on the machine and the database that holds what browser they are using and username, an MD5 ip, etc. But someone can always delete cookies and some even know how to bounce ip addresses, so unless you have a bunch of hackers using your machines, these suggestions should work. Unless someone else has a better suggestion. GL, :) Karl On May 14, 2010, at 4:08 AM, Jagdeep Singh wrote: I want that only single user can login on a single machine If User has logged in one browser he should not login through 2nd browser... And no other user should login on same machine in any browser in Simple words: MAXIMUM ONE USER SHOULD LOGIN IN ONE MACHINE... On Fri, May 14, 2010 at 2:23 PM, Karl DeSaulniers wrote: You lost me on that one. You want it so that multiple users can log in, but they have to be on separate browsers? Karl On May 14, 2010, at 3:26 AM, Jagdeep Singh wrote: Hi, yes, I can make a databse table to record LOGIN details, But I want that No other user can login on same machine on smae or another browser. E.g. If user1 has logged in from IE then user2 should not login from Firefox or Chrome etc.. I need ONLY ONE USER ACCESS AT SAME TIME ON SAME MACHINE (On Same or Other broswers) Regards Jagdeep Singh On Fri, May 14, 2010 at 1:26 PM, Peter Lind wrote: On 14 May 2010 09:29, Lester Caine wrote: Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? The browser IP address works for us quite reliably. Once logged in, you get a message saying already logged on ... and where ... but it does need a little help if the user closes the browser without logging out. One needs a facility to 'bounce' a user now and again however some remote users may well have 'floating' IP addresses :( Don't rely on IP addresses staying the same for a user, it's not safe in any way and not needed anyway. Karls method is probably the best bet - just remember to record "last accessed time" so anyone not accessing for more than 15-20 minutes will succeed if trying to log in again. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Karl DeSaulniers Design Drumm http://designdrumm.com Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] jquery password problem
On May 14, 2010, at 4:01 AM, Manolis Vlachakis wrote: I encode my password with md5 base 64 ..on the php side but i have a problem with the POST that this function i using on my form. after posting my data + is replaced with space I came out with that explanation after a lot of tries and echos in my code files i found out that after using numbers ,onlu on that case, in the password field the space between the encoding was replaced with a + or / sometimes i tried to remove the + or / but still i get the same results any ideas data: "firstname="+ firstname +"& lastname="+ lastname +"& username="+ username +"& email="+ email +"& password="+ password +"& save="+ save+"& user_type="+ user_type, I don't know JQuery, but when passing a variable in a url with the "&", you cant have a space after the & nor a space before or after the +. If that is actually what you are doing with "data". The browser may be just deleting the +. Not positive. & lastname="+ lastname +" needs to be &lastname="+lastname+" Not sure if that would solve your problem, but may be a problem in its own. HTH some, Karl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] jquery password problem
On 14 May 2010 11:29, Karl DeSaulniers wrote: > On May 14, 2010, at 4:01 AM, Manolis Vlachakis wrote: > >> I encode my password with md5 base 64 ..on the php side but >> i have a problem with the POST that this function i using on my form. >> after posting my data + is replaced with space >> >> I came out with that explanation after a lot of tries and echos in my >> code >> files i found out that >> after using numbers ,onlu on that case, in the password field the space >> between the encoding was replaced with a + or / sometimes >> i tried to remove the + or / but still i get the same results >> any ideas >> >> >> data: "firstname="+ firstname +"& lastname="+ lastname +"& username="+ >> username +"& email="+ email +"& password="+ password +"& save="+ save+"& >> user_type="+ user_type, > > I don't know JQuery, but when passing a variable in a url with the "&", you > cant have a space after the & nor a space before or after the +. > If that is actually what you are doing with "data". The browser may be just > deleting the +. Not positive. > > & lastname="+ lastname +" > > needs to be > > &lastname="+lastname+" > As it's javascript, those spaces are not in string: they're ignored by the interpreter when the string is concatenated. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] jquery password problem
On May 14, 2010, at 4:38 AM, Peter Lind wrote: On 14 May 2010 11:29, Karl DeSaulniers wrote: On May 14, 2010, at 4:01 AM, Manolis Vlachakis wrote: I encode my password with md5 base 64 ..on the php side but i have a problem with the POST that this function i using on my form. after posting my data + is replaced with space I came out with that explanation after a lot of tries and echos in my code files i found out that after using numbers ,onlu on that case, in the password field the space between the encoding was replaced with a + or / sometimes i tried to remove the + or / but still i get the same results any ideas data: "firstname="+ firstname +"& lastname="+ lastname +"& username="+ username +"& email="+ email +"& password="+ password +"& save="+ save+"& user_type="+ user_type, I don't know JQuery, but when passing a variable in a url with the "&", you cant have a space after the & nor a space before or after the +. If that is actually what you are doing with "data". The browser may be just deleting the +. Not positive. & lastname="+ lastname +" needs to be &lastname="+lastname+" As it's javascript, those spaces are not in string: they're ignored by the interpreter when the string is concatenated. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Ah, ok. Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
On 14 May 2010 08:18, Jagdeep Singh wrote: > Hi All! > > I am looking for a solution, I want a user to do a single Login only on a PC > . > > E.g. If a User has logged on my website website.com in Internet explorer, > then he cant login on same website in another browser like Firefox etc with > same loginid or another. > > Can I trace MAC address of a single machine to solve this issue? > > Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will > work for all browsers in a single machine.. > > I hope You will help me out > > > Regards > > Jagdeep Singh > +91 9988009272 > Store the session id against the user table when they login if there is no session id currently stored for the user. On all secure pages, compare the current session id against the stored session id for their login. If they are the same, then this is the same user in the same session. At this stage, you can regenerate the session id and store a new one against the user. Essentially making the session id active for a single page only. If the sessions are different you can now either ... 1 -Tell the user that you can only have 1 active login per account and send them back to the home page (ideally an unsecured page where the browser won't automatically attempt to login by using remembered passwords.). 2 - Clear the session against the user table and tag the account so that all instances can be told that only 1 active account per login. Essentially logging the other user out - not nice but if multiple logins are in violation of an agreement, then all suffer. It does allow a "real" user to know that their details are known if they didn't attempt the second login. You also need to incorporate a time out to allow the first login to automatically expire without needing a logout. If you use the same timeout as the session timeout, then they will sync, but you will need to update the DB on each page request. A logout should clear the sessionid and the expiry info from the user table. Richard. -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about creating php files from a form
On Thu, 2010-05-13 at 23:53 -0400, Kevin wrote: > Ashley Sheridan wrote: > > On Thu, 2010-05-13 at 23:07 -0400, Kevin wrote: > >> Hello All, > >> > >> I am trying to figure out how to create files when a user submits a form > >> ... > >> I have seen something about '*fopen*' , is that the direction I should > >> be going? > >> > >> Here is what I am trying to accomplish: > >> > >> I am creating a program to keep track of recipes for my wife. I have > >> have page set up where she can put the name of the recipe, the > >> ingredients, and the amounts of each ingredient. > >> Then she clicks "Submit" > >> > >> I would like a html file with the name of the recipe to be created ie > >> *cookies.html *with a link to the cookies.html created on another page. > >> * > >> *I hope this makes sense, and thank you all for your time... > >> > >> - - Kevin > >> > >> > > > > It might sound overkill, but I'd use a database for this. All the > > recipes can be stored in a MySQL database, and then you can use a > > simple couple of queries to produce the recipe list and the recipe > > pages dynamically. This also has the advantage that it's very easy to > > search the recipe list when it becomes larger, and if you ever want to > > change the layout/presentation of the whole system you won't have to > > recreate all the recipe pages. > > > > The DB could have several columns labelled: id, name, ingredients, method > > > > So, the form page (lets assume it's called add.php) could submit to > > itself which then adds the recipe to the DB with a query like: > > > > INSERT INTO recipes(name, ingredients, method) VALUES($name, > > $ingredients, $method) > > > > This is only a very simple example which could be extended to use > > another table for ingredients for a recipe. Don't forget to sanitise > > any input coming from the form with mysql_real_escape_string() for > > inserting it into the DB. > > > > The list.php page could just use a simple query like: > > > > SELECT id, name FROM recipes > > > > And then create a link to each recipe in the form: > > recipe.php?recipe=id (where id is the numerical value used in the DB) > > and that would then use a query like: > > > > SELECT * FROM recipe WHERE id=$recipe > > > > MySQL is available on most hosting that you'll find has support for > > PHP, and every Linux distribution I've seen has it too. > > > > Thanks, > > Ash > > http://www.ashleysheridan.co.uk > > > > > Thank you Ash for the quick reply. > > I was actually looking at using a database too... and I am testing out a > few different ones (SQLite and MySQL) > I appreciate the extra information, it will be helpful in the future :-) > > /On a side note: > I am having some issues with connecting to a SQLite database right now > ... I'm getting the following error "Fatal Error: 'sqlite_open' is an > unknown function" > But I'm putting that on the side right now. > > /I wanted to try a different approach by just creating the recipes in > individual html files for the time being. > Do happen to know how to create html files from a php form? > > Thank you. > > To create files I'd probably just use fopen() and fwrite(). It's how I always do it. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Question about creating php files from a form
On 14 May 2010 04:07, Kevin wrote: > Hello All, > > I am trying to figure out how to create files when a user submits a form ... > I have seen something about '*fopen*' , is that the direction I should be > going? > > Here is what I am trying to accomplish: > > I am creating a program to keep track of recipes for my wife. I have have > page set up where she can put the name of the recipe, the ingredients, and > the amounts of each ingredient. > Then she clicks "Submit" > > I would like a html file with the name of the recipe to be created ie > *cookies.html *with a link to the cookies.html created on another page. > * > *I hope this makes sense, and thank you all for your time... > > - - Kevin > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > If you can build the HTML in memory, then you can use ... file_put_contents('your_file.html', $YourHtml'); -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
On Fri, 2010-05-14 at 04:26 -0500, Karl DeSaulniers wrote: > Only other thing I could think of is a session timeout. > Because if two people are using the same computer, one person is > going to be away long enough to time out. > > HTH > > Karl > > > > On May 14, 2010, at 4:21 AM, Karl DeSaulniers wrote: > > > Hi J, > > Well, if you have an active users table with a users name in it and > > you check when logging in to see if that users name is in that table, > > They can not log in again. No matter what machine or browser they > > are in. > > > > As far as another user logging in on that same machine, you could > > match a cookie on the machine and the database that holds what > > browser they are using and username, an MD5 ip, etc. > > But someone can always delete cookies and some even know how to > > bounce ip addresses, so unless you have a bunch of hackers using > > your machines, these suggestions should work. > > Unless someone else has a better suggestion. > > GL, > > > > :) > > > > Karl > > > > > > On May 14, 2010, at 4:08 AM, Jagdeep Singh wrote: > > > >> I want that only single user can login on a single machine If > >> User has logged in one browser he should not login through 2nd > >> browser... > >> > >> And no other user should login on same machine in any browser > >> > >> in Simple words: > >> > >> MAXIMUM ONE USER SHOULD LOGIN IN ONE MACHINE... > >> > >> On Fri, May 14, 2010 at 2:23 PM, Karl DeSaulniers > >> wrote: > >> You lost me on that one. > >> > >> You want it so that multiple users can log in, but they have to be > >> on separate browsers? > >> > >> > >> Karl > >> > >> > >> > >> On May 14, 2010, at 3:26 AM, Jagdeep Singh wrote: > >> > >> Hi, > >> > >> yes, I can make a databse table to record LOGIN details, But I > >> want that No > >> other user can login on same machine on smae or another browser. > >> > >> E.g. > >> > >> If user1 has logged in from IE then user2 should not login from > >> Firefox or > >> Chrome etc.. > >> > >> I need ONLY ONE USER ACCESS AT SAME TIME ON SAME MACHINE (On Same > >> or Other > >> broswers) > >> > >> Regards > >> > >> Jagdeep Singh > >> > >> On Fri, May 14, 2010 at 1:26 PM, Peter Lind > >> wrote: > >> > >> On 14 May 2010 09:29, Lester Caine wrote: > >> Jagdeep Singh wrote: > >> > >> Hi All! > >> > >> I am looking for a solution, I want a user to do a single Login > >> only on > >> a > >> PC > >> . > >> > >> E.g. If a User has logged on my website website.com in Internet > >> explorer, > >> then he cant login on same website in another browser like Firefox > >> etc > >> with > >> same loginid or another. > >> > >> Can I trace MAC address of a single machine to solve this issue? > >> > >> The browser IP address works for us quite reliably. Once logged > >> in, you > >> get > >> a message saying already logged on ... and where ... but it does > >> need a > >> little help if the user closes the browser without logging out. > >> One needs > >> a > >> facility to 'bounce' a user now and again however some remote > >> users > >> may > >> well have 'floating' IP addresses :( > >> > >> > >> Don't rely on IP addresses staying the same for a user, it's not safe > >> in any way and not needed anyway. Karls method is probably the best > >> bet - just remember to record "last accessed time" so anyone not > >> accessing for more than 15-20 minutes will succeed if trying to > >> log in > >> again. > >> > >> Regards > >> Peter > >> > >> -- > >> > >> WWW: http://plphp.dk / http://plind.dk > >> LinkedIn: http://www.linkedin.com/in/plind > >> Flickr: http://www.flickr.com/photos/fake51 > >> BeWelcome: Fake51 > >> Couchsurfing: Fake51 > >> > >> > >> > >> Karl DeSaulniers > >> Design Drumm > >> http://designdrumm.com > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > Karl DeSaulniers > > Design Drumm > > http://designdrumm.com > > > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > Why do you not want a user to be able to log into your system with another browser on the same machine? There is no way to grab the MAC address, and using the IP address is, as others have already mentioned on this thread, unreliable (consider a dozen employees in an office who will all be using the same external connection, ergo the same IP) It seems that a token might be the best method. You can store other information you get from the user agent if you want to try and pin down a particular user. Is it really necessary though? I use Firefox in the main as my browser, but occasionally an update of xul without an update of Fx will kill Fx, so I'm forced to use another browser temporarily. Likewise, people who use IE are more susceptible to virii, and the advice given to IE users is to use another browser such as Fx or Chrome. What I'm trying to say is that often people will have very legitimate reasons to be
RE: [PHP] Multiple Login in a single PC should not be possible
Web servers can only identify computers, not users. You will need something else to track which user started a specific application on a particular computer, probably a fingerprint scanner next to the keyboard. But that won't prevent someone else from replacing the entity between the keyboard and the chair after they log in. Plus, it is unlikely that will be useful in a true multi-user environment. There are simply too many possible ways to get around your restrictions. Bob McConnell -Original Message- From: Jagdeep Singh [mailto:jagsaini1...@gmail.com] Sent: Friday, May 14, 2010 4:26 AM To: Peter Lind Cc: Lester Caine; php-general@lists.php.net >> "php-general@lists.php.net" Subject: Re: [PHP] Multiple Login in a single PC should not be possible Hi, yes, I can make a databse table to record LOGIN details, But I want that No other user can login on same machine on smae or another browser. E.g. If user1 has logged in from IE then user2 should not login from Firefox or Chrome etc.. I need ONLY ONE USER ACCESS AT SAME TIME ON SAME MACHINE (On Same or Other broswers) Regards Jagdeep Singh On Fri, May 14, 2010 at 1:26 PM, Peter Lind wrote: > On 14 May 2010 09:29, Lester Caine wrote: > > Jagdeep Singh wrote: > >> > >> Hi All! > >> > >> I am looking for a solution, I want a user to do a single Login only on > a > >> PC > >> . > >> > >> E.g. If a User has logged on my website website.com in Internet > explorer, > >> then he cant login on same website in another browser like Firefox etc > >> with > >> same loginid or another. > >> > >> Can I trace MAC address of a single machine to solve this issue? > > > > The browser IP address works for us quite reliably. Once logged in, you > get > > a message saying already logged on ... and where ... but it does need a > > little help if the user closes the browser without logging out. One needs > a > > facility to 'bounce' a user now and again however some remote users > may > > well have 'floating' IP addresses :( > > > > Don't rely on IP addresses staying the same for a user, it's not safe > in any way and not needed anyway. Karls method is probably the best > bet - just remember to record "last accessed time" so anyone not > accessing for more than 15-20 minutes will succeed if trying to log in > again. > > Regards > Peter > > -- > > WWW: http://plphp.dk / http://plind.dk > LinkedIn: http://www.linkedin.com/in/plind > Flickr: http://www.flickr.com/photos/fake51 > BeWelcome: Fake51 > Couchsurfing: Fake51 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] opening a link in a new window
On Thu, May 13, 2010 at 5:18 PM, Ashley Sheridan wrote: > On Thu, 2010-05-13 at 17:13 -0400, David Mehler wrote: > >> Hello, >> I want to open an external link in a new window, i know i can do this >> with xhtml, but only with the transitional dtd, which i'm not using. I >> was wondering if php could pull this off? >> Thanks. >> Dave. >> > > > No. PHP is on the server, not the client-side. If you can't use > something like target="_blank" in your xhtml, then consider using > Javascript. It's not the ideal solution, as it won't work where > scripting is disabled or not available. > > Thanks, > Ash > http://www.ashleysheridan.co.uk It may or may not be the "ideal" solution, but I'm pretty sure it is considered the "correct" solution going forward. I recall reading somewhere that things like controlling the "target" for a link are considered behavior rather than part of the document's semantic structure, and therefore belong in scripting rather than markup under XHTML. That makes sense given that one of the goals of XHTML is structured documents that can be consumed by multiple services, including but not exclusively web browsers. This also has the side effect that the decision of whether to open a link in the current window or a new window/tab belongs to the viewer instead of the author, which some argue is exactly as it should be. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
On May 14, 2010, at 3:18 AM, Jagdeep Singh wrote: > Hi All! > > I am looking for a solution, I want a user to do a single Login only on a PC > . > > E.g. If a User has logged on my website website.com in Internet explorer, > then he cant login on same website in another browser like Firefox etc with > same loginid or another. > > Can I trace MAC address of a single machine to solve this issue? > > Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will > work for all browsers in a single machine.. > > I hope You will help me out > > > Regards > > Jagdeep Singh > +91 9988009272 If you store sessions in a MySQL table you could access that table to see if the user is still logged in and when the last time the session data was updated. Take care, Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] jquery password problem
i uses str_replace finally and it works.. but still i would like to know how this problem comes up cause i would like to be sure on whatever password is going to be used weather that is a number a letter or a combination of those two any ideas, oh and thank you for your replies ! Manolis Vlachakis On 14 May 2010 12:41, Karl DeSaulniers wrote: > > On May 14, 2010, at 4:38 AM, Peter Lind wrote: > > On 14 May 2010 11:29, Karl DeSaulniers wrote: >> >>> On May 14, 2010, at 4:01 AM, Manolis Vlachakis wrote: >>> >>> I encode my password with md5 base 64 ..on the php side but i have a problem with the POST that this function i using on my form. after posting my data + is replaced with space I came out with that explanation after a lot of tries and echos in my code files i found out that after using numbers ,onlu on that case, in the password field the space between the encoding was replaced with a + or / sometimes i tried to remove the + or / but still i get the same results any ideas data: "firstname="+ firstname +"& lastname="+ lastname +"& username="+ username +"& email="+ email +"& password="+ password +"& save="+ save+"& user_type="+ user_type, >>> >>> I don't know JQuery, but when passing a variable in a url with the "&", >>> you >>> cant have a space after the & nor a space before or after the +. >>> If that is actually what you are doing with "data". The browser may be >>> just >>> deleting the +. Not positive. >>> >>> & lastname="+ lastname +" >>> >>> needs to be >>> >>> &lastname="+lastname+" >>> >>> >> As it's javascript, those spaces are not in string: they're ignored by >> the interpreter when the string is concatenated. >> >> Regards >> Peter >> >> -- >> >> WWW: http://plphp.dk / http://plind.dk >> LinkedIn: http://www.linkedin.com/in/plind >> Flickr: http://www.flickr.com/photos/fake51 >> BeWelcome: Fake51 >> Couchsurfing: Fake51 >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > Ah, ok. > > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Manolis Vlachakis Nelly's Family Hotel Visit: www.nellys-hotel.gr www.nellys.gr Skype : manolis.vlachakis
Re: [PHP] Append Dom Document
On Thu, May 13, 2010 at 7:46 PM, Alice Wei wrote: > > Hi, > > I am trying to create a news feed page that loads a number of different > feeds depending on what options the user selects. For some reason, I could > not figure out how to get the dom document to "append" the different xml > documents that get created. > > Below is the code, and obviously now every time when I try to have a new item > selected, then it displays that element's > > > $q=$_GET["q"]; > $q2 = explode(" ",$q); > $count = count($q2); > > for($i=0;$i<$count;$i++) { > > //find out which feed was selected > switch ($q2[$i]) { > case "Weather": > > $xml=("http://rss.weather.com/rss/national/rss_nwf_rss.xml?cm_ven=NWF&cm_cat=rss&par=NWF_rss";); > break; > > case "NFL": > $xml = ("http://www.nfl.com/rss/rsslanding?searchString=home";); > break; > > default: > exit; > break; > } > } > > $xmlDoc = new DOMDocument(); > $xmlDoc->load($xml); > > //get and output "" elements > $x=$xmlDoc->getElementsByTagName('item'); > for ($i=0; $i<=4; $i++) > { > $item_title=$x->item($i)->getElementsByTagName('title') > ->item(0)->childNodes->item(0)->nodeValue; > $item_link=$x->item($i)->getElementsByTagName('link') > ->item(0)->childNodes->item(0)->nodeValue; > $item_desc=$x->item($i)->getElementsByTagName('description') > ->item(0)->childNodes->item(0)->nodeValue; > > echo ("" . $item_title . ""); > echo (""); > echo ($item_desc . ""); > } > > ?> > > > Is there such a function where I could allow my dom document here append and > not have to create a new one every time when a new selection is made? > > Thanks for your help. > > Alice > First, I don't see where you need to append anything. Your code simply opens XML documents that you fetch from remote sources and iterates through the nodes in each document to echo links to the articles. If that's all you need, what you have looks like it will work just fine. If you are concerned about the overhead of creating a new DOMDocument each time through the loop, you could move that step outside the loop. Every time you run $xmlDoc->load($xml) it will replace the existing contents with the new contents. However, I suspect that instantiating a new object is fairly cheap compared to the rest of the actions in your loop, so I doubt you'll save much. As for your original question, if you really need to append multiple XML documents into a single document using DOM, you would need to create a DOMDocument outside the loop that contains your aggregator's information in the header and that will contain the aggregated items. Then inside your loop you would still load each feed into a separate DOMDocument instance just as you are now and import the nodes from the rss feed into your aggregated document. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Question about creating php files from a form
From: Kevin > I am trying to figure out how to create files when a user submits a form ... > I have seen something about '*fopen*' , is that the direction I should > be going? > > Here is what I am trying to accomplish: > > I am creating a program to keep track of recipes for my wife. I have > have page set up where she can put the name of the recipe, the > ingredients, and the amounts of each ingredient. > Then she clicks "Submit" > > I would like a html file with the name of the recipe to be created ie > *cookies.html *with a link to the cookies.html created on another page. There are already a number of free applications for this. I have reviewed over a dozen of them in the past year. Drupal has a recipe module, Gourmet for Gnome users, Krecipes for KDE users. ReciPants in Perl, Qookbook, to name a few off the top of my head. Some of them will link into the USDA Nutrition Database as well. You may not need to reinvent this particular wheel. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] jquery password problem
On Fri, 2010-05-14 at 16:16 +0300, Manolis Vlachakis wrote: > i uses str_replace finally and it works.. > but still i would like to know how this problem comes up > cause i would like to be sure on whatever password is going to be used > weather that is a number a letter or a combination of those two > > any ideas, > oh and thank you for your replies ! > > Manolis Vlachakis > > On 14 May 2010 12:41, Karl DeSaulniers wrote: > > > > > On May 14, 2010, at 4:38 AM, Peter Lind wrote: > > > > On 14 May 2010 11:29, Karl DeSaulniers wrote: > >> > >>> On May 14, 2010, at 4:01 AM, Manolis Vlachakis wrote: > >>> > >>> I encode my password with md5 base 64 ..on the php side but > i have a problem with the POST that this function i using on my form. > after posting my data + is replaced with space > > I came out with that explanation after a lot of tries and echos in my > code > files i found out that > after using numbers ,onlu on that case, in the password field the space > between the encoding was replaced with a + or / sometimes > i tried to remove the + or / but still i get the same results > any ideas > > > data: "firstname="+ firstname +"& lastname="+ lastname +"& username="+ > username +"& email="+ email +"& password="+ password +"& save="+ save+"& > user_type="+ user_type, > > >>> > >>> I don't know JQuery, but when passing a variable in a url with the "&", > >>> you > >>> cant have a space after the & nor a space before or after the +. > >>> If that is actually what you are doing with "data". The browser may be > >>> just > >>> deleting the +. Not positive. > >>> > >>> & lastname="+ lastname +" > >>> > >>> needs to be > >>> > >>> &lastname="+lastname+" > >>> > >>> > >> As it's javascript, those spaces are not in string: they're ignored by > >> the interpreter when the string is concatenated. > >> > >> Regards > >> Peter > >> > >> -- > >> > >> WWW: http://plphp.dk / http://plind.dk > >> LinkedIn: http://www.linkedin.com/in/plind > >> Flickr: http://www.flickr.com/photos/fake51 > >> BeWelcome: Fake51 > >> Couchsurfing: Fake51 > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > Ah, ok. > > > > > > Karl DeSaulniers > > Design Drumm > > http://designdrumm.com > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > IIRC JQuery URL encodes any data it sends to the server, which in Javascript terms, turns a space into a + character rather than a %20. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Append Dom Document
On Fri, May 14, 2010 at 12:04 AM, Nathan Nobbe wrote: [snip] > having said that if you wanted to append > a new DOMNode to an existing one, you would use the appendChild() method. Usually, yes. In this case, since she would be importing nodes from one document into another document, she would need to use importNode() instead of appendChild(). Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] jquery password problem
From: Manolis Vlachakis > i uses str_replace finally and it works.. > but still i would like to know how this problem comes up > cause i would like to be sure on whatever password is going to be used > weather that is a number a letter or a combination of those two > > any ideas, You probably should look at the documentation for html entities and magic quotes to see what is and is not allowed in a URL. There are a number of characters that may be modified by either the browser or the server before you get your hands on them. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] jquery password problem
On 14 May 2010 15:16, Manolis Vlachakis wrote: > i uses str_replace finally and it works.. > but still i would like to know how this problem comes up > cause i would like to be sure on whatever password is going to be used > weather that is a number a letter or a combination of those two > any ideas, > oh and thank you for your replies ! > Manolis Vlachakis Looking over your JS again (wrong mailing list for this topic, really), Karl was actually half past right. You need to understand urls: spaces are not kosher and will typically be handled one way or the other instead of just allowed. So in your JS data: "firstname="+ firstname +"& lastname="+ lastname +"& username="+ username +"& email="+ email +"& password="+ password +"& save="+ save+"& user_type="+ user_type, You need to remove the space after & (you're constantly inserting blank spaces in your string for no reason) as I'm guessing you don't have any spaces inside the data you're dealing with. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] jquery password problem
sorry for the off topic it is true that it turned out to be clearly a JS script problem ... thanks again for the replies problem solved then.. On 14 May 2010 16:23, Peter Lind wrote: > On 14 May 2010 15:16, Manolis Vlachakis > wrote: > > i uses str_replace finally and it works.. > > but still i would like to know how this problem comes up > > cause i would like to be sure on whatever password is going to be used > > weather that is a number a letter or a combination of those two > > any ideas, > > oh and thank you for your replies ! > > Manolis Vlachakis > > Looking over your JS again (wrong mailing list for this topic, > really), Karl was actually half past right. > > You need to understand urls: spaces are not kosher and will typically > be handled one way or the other instead of just allowed. So in your JS > > data: "firstname="+ firstname +"& lastname="+ lastname +"& username="+ > username +"& email="+ email +"& password="+ password +"& save="+ save+"& > user_type="+ user_type, > > You need to remove the space after & (you're constantly inserting > blank spaces in your string for no reason) as I'm guessing you don't > have any spaces inside the data you're dealing with. > > Regards > Peter > > -- > > WWW: http://plphp.dk / http://plind.dk > LinkedIn: http://www.linkedin.com/in/plind > Flickr: http://www.flickr.com/photos/fake51 > BeWelcome: Fake51 > Couchsurfing: Fake51 > > -- Manolis Vlachakis Nelly's Family Hotel Visit: www.nellys-hotel.gr www.nellys.gr Skype : manolis.vlachakis
Re: [PHP] Multiple Login in a single PC should not be possible
Bob McConnell wrote: Web servers can only identify computers, not users. You will need something else to track which user started a specific application on a particular computer, probably a fingerprint scanner next to the keyboard. But that won't prevent someone else from replacing the entity between the keyboard and the chair after they log in. Plus, it is unlikely that will be useful in a true multi-user environment. There are simply too many possible ways to get around your restrictions. Isn't it simple to associate a single session ID with a username? User logs in, place username and session ID in active users table and invalidate any others for same user. When user accesses page check session ID against entry in active users table. Richard Quadling has it right. This is not complicated, but it sounds like people are making it so. The user identified themselves via login. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
On Fri, May 14, 2010 at 3:18 AM, Jagdeep Singh wrote: > Hi All! > > I am looking for a solution, I want a user to do a single Login only on a PC > . > > E.g. If a User has logged on my website website.com in Internet explorer, > then he cant login on same website in another browser like Firefox etc with > same loginid or another. > > Can I trace MAC address of a single machine to solve this issue? > > Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will > work for all browsers in a single machine.. > > I hope You will help me out > > > Regards > > Jagdeep Singh I usually store the sessions in a database table that includes a column for the user identity (username, e-mail address, etc.) and then simply log out any previous "active" sessions any time a new session logs in by deleting (or marking inactive) any rows for the same identity whose session_id does not match the current session_id. That ensures that users can have no more than one active session at a time. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] what's the point of _autoload?
Since php started to support oop it has moved more and more features in that direction. This is good for me because I love oop. Then came _autoload() and I was rejoiced only to find that this (no fun)ction can't be used to it's fullest potential in oop unless I have all the files in the same directory. This is where you correct me and tell me how I can have a file structure in more then one level and still get the ripe juices of _autoload() (Please, I beg you!) I have looked at the comments on the doc page of the function and every single one comes with the addition of many, often complex lines of code that will only add more load on the server. If _autoload can't figure out the correct path to the file which defines the class, then what is the point from an oop pov? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: what's the point of _autoload?
I use this in a different way so I think it can be useful for everyone avoiding long and complex codes. I´ve got a file called classes.php that looks like: Smarty = BASE_PATH."includes/Smarty/Smarty.class.php"; $Classes->Mail = BASE_PATH."includes/mail/Mail.php"; ?> So my _autoload() looks like: function MY__autoload($className) { require_once("classes.php") require_once($Classes->$className); } if (function_exists("spl_autoload_register") ) { spl_autoload_register("MY__autoload"); } else { function __autoload($className) { MY__autoload($className); } } Hope it can help you. ""Michael N. Madsen"" escreveu na mensagem news:62.43.44964.9b05d...@pb1.pair.com... > Since php started to support oop it has moved more and more features in > that direction. > This is good for me because I love oop. Then came _autoload() and I was > rejoiced only to find that this (no fun)ction can't be used to it's > fullest potential in oop unless I have all the files in the same > directory. This is where you correct me and tell me how I can have a file > structure in more then one level and still get the ripe juices of > _autoload() (Please, I beg you!) > > I have looked at the comments on the doc page of the function and every > single one comes with the addition of many, often complex lines of code > that will only add more load on the server. If _autoload can't figure out > the correct path to the file which defines the class, then what is the > point from an oop pov? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's the point of _autoload?
On 14 May 2010 15:31, Michael N. Madsen wrote: > Since php started to support oop it has moved more and more features in that > direction. > This is good for me because I love oop. Then came _autoload() and I was > rejoiced only to find that this (no fun)ction can't be used to it's fullest > potential in oop unless I have all the files in the same directory. This is > where you correct me and tell me how I can have a file structure in more > then one level and still get the ripe juices of _autoload() (Please, I beg > you!) > > I have looked at the comments on the doc page of the function and every > single one comes with the addition of many, often complex lines of code that > will only add more load on the server. If _autoload can't figure out the > correct path to the file which defines the class, then what is the point > from an oop pov? __autoload() is triggered when a class referenced isn't already loaded. It gives you the chance to load the class by requiring the needed file - but there's no way PHP has any idea of how many files you have in your project, so YOU have to tell PHP which file to load. This, to most people, means coming up with a meaningful way of naming files and classes so you can parse the class name and then know where to grab the file from (Zend naming for instance: Zend_Db_Table_Abstract gets parsed to Zend/Db/Table/Abstract.php). So no, you don't have to stress the server a lot - but you do have to do some manual work. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Multiple Login in a single PC should not be possible
From: Robert Cummings > Bob McConnell wrote: >> Web servers can only identify computers, not users. You will need >> something else to track which user started a specific application on a >> particular computer, probably a fingerprint scanner next to the >> keyboard. But that won't prevent someone else from replacing the entity >> between the keyboard and the chair after they log in. Plus, it is >> unlikely that will be useful in a true multi-user environment. There are >> simply too many possible ways to get around your restrictions. > > Isn't it simple to associate a single session ID with a username? User > logs in, place username and session ID in active users table and > invalidate any others for same user. When user accesses page check > session ID against entry in active users table. Richard Quadling has it > right. This is not complicated, but it sounds like people are making it > so. The user identified themselves via login. >From the series of questions he asked, it was not clear to me what he was trying to do. It sounded like he wanted to allow a user to access a single session simultaneously via multiple browsers, yet not allow another person to hijack that session even if both were using the same computer. Somehow I don't think all of that is a reasonable requirement. Actually, I believe that linking a session to a specific individual without reading a biometric key with every http request is an unacceptable risk. And no, I don't do any banking online. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
On 14 May 2010 14:47, Bob McConnell wrote: > Actually, I believe that linking a session to a specific individual > without reading a biometric key with every http request is an > unacceptable risk. And no, I don't do any banking online. > > Bob McConnell That's why my bank has supplied me with a little card reader for my bank card, into which I put my pin number. So they know it is me because of something I have (my card and card reader) and something I know (my pin number). This is pretty similar to the system we use for our online BACS transactions. And yes, I do online banking. -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Append Dom Document
On Fri, May 14, 2010 at 7:20 AM, Andrew Ballard wrote: > On Fri, May 14, 2010 at 12:04 AM, Nathan Nobbe > wrote: > [snip] > > having said that if you wanted to append > > a new DOMNode to an existing one, you would use the appendChild() method. > > Usually, yes. In this case, since she would be importing nodes from > one document into another document, she would need to use importNode() > instead of appendChild(). right, if there was actually more than one document, which in this case there isnt... whether or not there should be multiple DOMDocuments here is about as unclear as OPs original question. -nathan
RE: [PHP] Multiple Login in a single PC should not be possible
From: Richard Quadling >On 14 May 2010 14:47, Bob McConnell wrote: >> Actually, I believe that linking a session to a specific individual >> without reading a biometric key with every http request is an >> unacceptable risk. And no, I don't do any banking online. > > That's why my bank has supplied me with a little card reader for my > bank card, into which I put my pin number. > > So they know it is me because of something I have (my card and card > reader) and something I know (my pin number). > > This is pretty similar to the system we use for our online BACS transactions. > > And yes, I do online banking. That only verifies that it was probably you that initially logged in. There is nothing to prevent someone else from knocking you out and using the session once you have completed that step, or hijacking it after you are done. There are any number of ways to intercept your traffic, such as a poisoned DNS server misdirecting your browser through a man in the middle. Even without that, how long would it take someone else to 'discover' your four digit PIN number if they wanted to? Probably less than an hour with only possible variations. That's nowhere near safe enough for me. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Multiple Login in a single PC should not be possible
On Fri, 2010-05-14 at 10:26 -0400, Bob McConnell wrote: > From: Richard Quadling > > >On 14 May 2010 14:47, Bob McConnell wrote: > >> Actually, I believe that linking a session to a specific individual > >> without reading a biometric key with every http request is an > >> unacceptable risk. And no, I don't do any banking online. > > > > That's why my bank has supplied me with a little card reader for my > > bank card, into which I put my pin number. > > > > So they know it is me because of something I have (my card and card > > reader) and something I know (my pin number). > > > > This is pretty similar to the system we use for our online BACS > transactions. > > > > And yes, I do online banking. > > That only verifies that it was probably you that initially logged in. > There is nothing to prevent someone else from knocking you out and using > the session once you have completed that step, or hijacking it after you > are done. There are any number of ways to intercept your traffic, such > as a poisoned DNS server misdirecting your browser through a man in the > middle. > > Even without that, how long would it take someone else to 'discover' > your four digit PIN number if they wanted to? Probably less than an hour > with only possible variations. That's nowhere near safe enough for > me. > > Bob McConnell > Actually, a 4-digit pin has 10,000 combinations ( through inclusively) It becomes more interesting if you allow for letters as well, with case sensitivity, so the permutations would become 62^4 (52 letters & 10 numbers) Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Multiple Login in a single PC should not be possible
Hello Jagdeep, I think that using the user table will fix your first problem of having a single user tied to a browser for the same machine or even a different machine. Once logged in that same user cannot login again. For your second issue, I do not think is possible to keep track of anything that will not allow user1 to login using Internet Explorer and then user2 to come along open Firefox and log in using the same machine as sessions are kept separately and will look different on the server. Unless you can actually use something to identify the computer as per your question of tracking MAC addresses I do not see this as being possible. But then again I'm no expert. Just my thoughts. Good Luck. On 14/05/2010 03:18, Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will work for all browsers in a single machine.. I hope You will help me out Regards Jagdeep Singh +91 9988009272
Re: [PHP] Multiple Login in a single PC should not be possible
On 14 May 2010 15:26, Bob McConnell wrote: > From: Richard Quadling > >>On 14 May 2010 14:47, Bob McConnell wrote: >>> Actually, I believe that linking a session to a specific individual >>> without reading a biometric key with every http request is an >>> unacceptable risk. And no, I don't do any banking online. >> >> That's why my bank has supplied me with a little card reader for my >> bank card, into which I put my pin number. >> >> So they know it is me because of something I have (my card and card >> reader) and something I know (my pin number). >> >> This is pretty similar to the system we use for our online BACS > transactions. >> >> And yes, I do online banking. > > That only verifies that it was probably you that initially logged in. > There is nothing to prevent someone else from knocking you out and using > the session once you have completed that step, or hijacking it after you > are done. There are any number of ways to intercept your traffic, such > as a poisoned DNS server misdirecting your browser through a man in the > middle. > > Even without that, how long would it take someone else to 'discover' > your four digit PIN number if they wanted to? Probably less than an hour > with only possible variations. That's nowhere near safe enough for > me. > > Bob McConnell > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > The pin pad requires my 4 digit pin and generates an 8 digit number which is required by the bank's web site (100 million combinations and must match expectation on the server). The 8 digit number is different every time. And 3 failed logins disables the login until I go through security via the phone. And then I still have to use the same data to try again. The channel is https ONLY - you cannot login on http. I also keep my front door locked and I trust my wife and kids to not knock me out, though the way the kids play up sometimes ... DNS poisoning is certainly a possibility. The Blue Frog incident a few years ago certainly revealed a weakness in DNS servers (the operators). And you are right, essentially a man-in-the-middle is still not defendable (AFAIK). -- - Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's the point of _autoload?
On Fri, May 14, 2010 at 7:31 AM, Michael N. Madsen wrote: > Since php started to support oop it has moved more and more features in > that direction. > This is good for me because I love oop. Then came _autoload() and I was > rejoiced only to find that this (no fun)ction can't be used to it's fullest > potential in oop unless I have all the files in the same directory. This is > where you correct me and tell me how I can have a file structure in more > then one level and still get the ripe juices of _autoload() (Please, I beg > you!) > umm ok ill correct you.., theres no requirement to have files in a single directory. php gives you the name of a class and you are responsible for finding the file where the class lives and load it. > I have looked at the comments on the doc page of the function and every > single one comes with the addition of many, often complex lines of code that > will only add more load on the server. actually, autoloading typically reduces load on the server b/c only the files you actually need for a given request are loaded on demand. this in contrast to requires/includes for every possible class that could potentially be needed to fulfill a given request. > If _autoload can't figure out the correct path to the file which defines > the class, then what is the point from an oop pov? see above; its a speed boost, and typically folks prefer not to bother include/require files atop ever class the define; those are the 2 main benefits. -nathan
[PHP] Problem install modules using PEAR
I'm on a older Solaris server with PHP 5.0.5. I'm trying to install Spreadsheet Excel Writer and the mail module using PEAR. /usr/local/php-5.0.5/bin/pear config-set http_proxy ##.###.###.##: /usr/local/php-5.0.5/bin/pear install Spreadsheet_Excel_Writer-0.9.2 -alldeps HTTP error, got response: HTTP/1.0 410 Gone Didn't receive 200 OK from remote server. (HTTP/1.0 410 Gone) Does anyone have any ideas on how I get past this HTTP error? Is it some PEAR config or network issue? How much of a pain in the butt would it be to manually install these modules? Will I end up in dependency hell? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
At 12:48 PM +0530 5/14/10, Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will work for all browsers in a single machine.. I hope You will help me out Regards Jagdeep Singh +91 9988009272 Jagdeep: I don't think this is solvable. You can make it such that if a person is logged-in that they cannot log-in again until they log-out of their current session -- that's do able. But using IP addresses, or trying to sniff the machine, or other such attempts at identifying user will most certainly be problematic and not solve the problem. Good luck, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about creating php files from a form
At 11:07 PM -0400 5/13/10, Kevin wrote: Hello All, I am trying to figure out how to create files when a user submits a form ... I have seen something about '*fopen*' , is that the direction I should be going? Here is what I am trying to accomplish: I am creating a program to keep track of recipes for my wife. I have have page set up where she can put the name of the recipe, the ingredients, and the amounts of each ingredient. Then she clicks "Submit" I would like a html file with the name of the recipe to be created ie *cookies.html *with a link to the cookies.html created on another page. * *I hope this makes sense, and thank you all for your time... - - Kevin Kevin: Your wife is trying to make cookies? :-) Sorry, I couldn't resist. I recommend the same thing that Ash recommended, namely creating a database where your wife can enter the ingredients via a form and have those recorded in a database -- a database where one can pull the data and show the recipes in any manner you want. Don't look to saving these data as files, or as cookies, but rather as data in a database. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Append Dom Document
Hi, You are right about the fact I am not having multiple documents, and yet what I am trying to do here is to have one xmldoc, which I have declared in my original email, and have my other rss feeds that I am trying to call from the PHP to append as I check more checkboxes from the list. Right now, when I check one box, it does present it the way I want it, which is open a new xmldoc, and print out the rss feed. Yet, when I try to check the second box, it gives me the display of the rss feed from the second and not the first, because the second one opens a new xmldoc. However, I would like to see both docs in one screen, which is why I want to know if there is such a function available. Is what I am trying to do here possibly by any chance? Thanks for your help. Alice Date: Fri, 14 May 2010 08:26:48 -0600 Subject: Re: [PHP] Append Dom Document From: quickshif...@gmail.com To: aball...@gmail.com CC: aj...@alumni.iu.edu; php-general@lists.php.net On Fri, May 14, 2010 at 7:20 AM, Andrew Ballard wrote: On Fri, May 14, 2010 at 12:04 AM, Nathan Nobbe wrote: [snip] > having said that if you wanted to append > a new DOMNode to an existing one, you would use the appendChild() method. Usually, yes. In this case, since she would be importing nodes from one document into another document, she would need to use importNode() instead of appendChild(). right, if there was actually more than one document, which in this case there isnt... whether or not there should be multiple DOMDocuments here is about as unclear as OPs original question. -nathan _ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
Re: [PHP] opening a link in a new window
On Fri, May 14, 2010 at 8:59 AM, Andrew Ballard wrote: > On Thu, May 13, 2010 at 5:18 PM, Ashley Sheridan > wrote: > > On Thu, 2010-05-13 at 17:13 -0400, David Mehler wrote: > > > >> Hello, > >> I want to open an external link in a new window, i know i can do this > >> with xhtml, but only with the transitional dtd, which i'm not using. I > >> was wondering if php could pull this off? > >> Thanks. > >> Dave. > >> > > > > > > No. PHP is on the server, not the client-side. If you can't use > > something like target="_blank" in your xhtml, then consider using > > Javascript. It's not the ideal solution, as it won't work where > > scripting is disabled or not available. > > > > Thanks, > > Ash > > http://www.ashleysheridan.co.uk > > It may or may not be the "ideal" solution, but I'm pretty sure it is > considered the "correct" solution going forward. I recall reading > somewhere that things like controlling the "target" for a link are > considered behavior rather than part of the document's semantic > structure, and therefore belong in scripting rather than markup under > XHTML. That makes sense given that one of the goals of XHTML is > structured documents that can be consumed by multiple services, > including but not exclusively web browsers. > > This also has the side effect that the decision of whether to open a > link in the current window or a new window/tab belongs to the viewer > instead of the author, which some argue is exactly as it should be. > > Andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I'd avoid the target attribute, as it's deprecated in the strict versions (and I'd avoid it for the reasons Andrew mentioned.) For reading, here's a nice resource to start with: http://www.456bereastreet.com/archive/200603/the_target_attribute_and_opening_new_windows/ Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] Append Dom Document
On Fri, May 14, 2010 at 1:14 PM, Alice Wei wrote: > > Hi, > > You are right about the fact I am not having multiple documents, and yet > what I am trying to do here is to have one xmldoc, which I have declared in > my original email, and have my other rss feeds that I am trying to call from > the PHP to append as I check more checkboxes from the list. > > Right now, when I check one box, it does present it the way I want it, > which is open a new xmldoc, and print out the rss feed. Yet, when I try to > check the second box, it gives me the display of the rss feed from the second > and not the first, because the second one opens a new xmldoc. However, I > would like to see both docs in one screen, which is why I want to know if > there is such a function available. > > Is what I am trying to do here possibly by any chance? > Thanks for your help. > > Alice > Just move all of your DOMDocument code block inside the loop after the switch. http://rss.weather.com/rss/national/rss_nwf_rss.xml?cm_ven=NWF&cm_cat=rss&par=NWF_rss";); break; case "NFL": $xml = ("http://www.nfl.com/rss/rsslanding?searchString=home";); break; default: exit; break; } $xmlDoc = new DOMDocument(); $xmlDoc->load($xml); //get and output "" elements $x=$xmlDoc->getElementsByTagName('item'); for ($i=0; $i<=4; $i++) { $item_title=$x->item($i)->getElementsByTagName('title') ->item(0)->childNodes->item(0)->nodeValue; $item_link=$x->item($i)->getElementsByTagName('link') ->item(0)->childNodes->item(0)->nodeValue; $item_desc=$x->item($i)->getElementsByTagName('description') ->item(0)->childNodes->item(0)->nodeValue; echo ("" . $item_title . ""); echo (""); echo ($item_desc . ""); } } ?> Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Zend Framework Ebook
Hello, does anyone have any zend framework 1.10 ebook recomendations. -- A Brandon_R Production
[PHP] Brandon Rampersad has invited you to open a Google mail account
I've been using Gmail and thought you might like to try it out. Here's an invitation to create an account. --- Brandon Rampersad has invited you to open a free Gmail account. To accept this invitation and register for your account, visit http://mail.google.com/mail/a-b89a7a894d-3cf58aeb75-vzb_uAYWXu5ptZeOeU3BqjIlb54 Once you create your account, Brandon Rampersad will be notified with your new email address so you can stay in touch with Gmail! If you haven't already heard about Gmail, it's a new search-based webmail service that offers: - Over 2,700 megabytes (two gigabytes) of free storage - Built-in Google search that instantly finds any message you want - Automatic arrangement of messages and related replies into "conversations" - Powerful spam protection using innovative Google technology - No large, annoying ads--just small text ads and related pages that are relevant to the content of your messages To learn more about Gmail before registering, visit: http://mail.google.com/mail/help/benefits.html And, to see how easy it can be to switch to a new email service, check out our new switch guide: http://mail.google.com/mail/help/switch/ We're still working every day to improve Gmail, so we might ask for your comments and suggestions periodically. We hope you'll like Gmail. We do. And, it's only going to get better. Thanks, The Gmail Team (If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] regexp questions
Hi, I'm trying to insert a serialized data into mysql, but I does mysql_real_escape_string() before inserting it. INSERT IGNORE INTO `table` (`value`) VALUES ('a:3:{s:12:"F1";s:6:"nombre";s:11:"F2";s:5:"F3";s:16:"F4";s:10:"F5";}'); it result in INSERT IGNORE INTO `table` (`value`) VALUES (\'a:3:{s:12:\"F1\";s:6:\"nombre\";s:11:\"F2\";s:5:\"F3\";s:16:\"F4\";s:10:\"F5\";}\'); and of course it's not a valid SQL sentence. Why can't I escape an SQL value with " ??? Regards. I.Lopez. _ ¿Quieres conocer trucos de Windows 7? ¡Los que ya lo usan te los cuentan! http://www.sietesunpueblodeexpertos.com/index_windows7.html
[PHP] mysql_real_escape_string() and "
Hi, I'm trying to insert a serialized data into mysql, but I does mysql_real_escape_string() before inserting it. INSERT IGNORE INTO `table` (`value`) VALUES ('a:3:{s:12:"F1";s:6:"nombre";s:11:"F2";s:5:"F3";s:16:"F4";s:10:"F5";}'); it result in INSERT IGNORE INTO `table` (`value`) VALUES (\'a:3:{s:12:\"F1\";s:6:\"nombre\";s:11:\"F2\";s:5:\"F3\";s:16:\"F4\";s:10:\"F5\";}\'); and of course it's not a valid SQL sentence. Why can't I escape an SQL value with " ??? Regards. I.Lopez. ¿Sabes que La Gente de Hoy tiene GUARDAESPALDAS contra el Spam? _ Consejos para seducir ¿Puedes conocer gente nueva a través de Internet? ¡Regístrate ya! http://contactos.es.msn.com/?mtcmk=015352
RE: [PHP] regexp questions
> From: spudm...@hotmail.com > To: php-general@lists.php.net > Date: Fri, 14 May 2010 22:01:09 +0200 > Subject: RE: [PHP] regexp questions > > > > > Hi, > > > > I'm trying to insert a serialized data into mysql, but I does > mysql_real_escape_string() before inserting it. > > > > INSERT IGNORE INTO `table` (`value`) VALUES > ('a:3:{s:12:"F1";s:6:"nombre";s:11:"F2";s:5:"F3";s:16:"F4";s:10:"F5";}'); > > > > it result in > > INSERT IGNORE INTO `table` (`value`) VALUES > (\'a:3:{s:12:\"F1\";s:6:\"nombre\";s:11:\"F2\";s:5:\"F3\";s:16:\"F4\";s:10:\"F5\";}\'); > > > > and of course it's not a valid SQL sentence. > > > > Why can't I escape an SQL value with " ??? > > > > Regards. > > > > I.Lopez. > > > > > > _ > ¿Quieres conocer trucos de Windows 7? ¡Los que ya lo usan te los cuentan! > http://www.sietesunpueblodeexpertos.com/index_windows7.html I'm sorry, I mistaked the subject _ Consejos para seducir ¿Puedes conocer gente nueva a través de Internet? ¡Regístrate ya! http://contactos.es.msn.com/?mtcmk=015352
RE: [PHP] regexp questions
On Fri, 2010-05-14 at 22:01 +0200, Spud. Ivan. wrote: > > > Hi, > > > > I'm trying to insert a serialized data into mysql, but I does > mysql_real_escape_string() before inserting it. > > > > INSERT IGNORE INTO `table` (`value`) VALUES > ('a:3:{s:12:"F1";s:6:"nombre";s:11:"F2";s:5:"F3";s:16:"F4";s:10:"F5";}'); > > > > it result in > > INSERT IGNORE INTO `table` (`value`) VALUES > (\'a:3:{s:12:\"F1\";s:6:\"nombre\";s:11:\"F2\";s:5:\"F3\";s:16:\"F4\";s:10:\"F5\";}\'); > > > > and of course it's not a valid SQL sentence. > > > > Why can't I escape an SQL value with " ??? > > > > Regards. > > > > I.Lopez. > > > > > > _ > ¿Quieres conocer trucos de Windows 7? ¡Los que ya lo usan te los cuentan! > http://www.sietesunpueblodeexpertos.com/index_windows7.html It appears that you're performing the mysql_real_escape_string on the entire query, and not the variables you're using in your query, hence the single quotes that denote an SQL string being escaped. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] opening a link in a new window
On Fri, 2010-05-14 at 13:18 -0400, Adam Richardson wrote: > On Fri, May 14, 2010 at 8:59 AM, Andrew Ballard wrote: > > > On Thu, May 13, 2010 at 5:18 PM, Ashley Sheridan > > wrote: > > > On Thu, 2010-05-13 at 17:13 -0400, David Mehler wrote: > > > > > >> Hello, > > >> I want to open an external link in a new window, i know i can do this > > >> with xhtml, but only with the transitional dtd, which i'm not using. I > > >> was wondering if php could pull this off? > > >> Thanks. > > >> Dave. > > >> > > > > > > > > > No. PHP is on the server, not the client-side. If you can't use > > > something like target="_blank" in your xhtml, then consider using > > > Javascript. It's not the ideal solution, as it won't work where > > > scripting is disabled or not available. > > > > > > Thanks, > > > Ash > > > http://www.ashleysheridan.co.uk > > > > It may or may not be the "ideal" solution, but I'm pretty sure it is > > considered the "correct" solution going forward. I recall reading > > somewhere that things like controlling the "target" for a link are > > considered behavior rather than part of the document's semantic > > structure, and therefore belong in scripting rather than markup under > > XHTML. That makes sense given that one of the goals of XHTML is > > structured documents that can be consumed by multiple services, > > including but not exclusively web browsers. > > > > This also has the side effect that the decision of whether to open a > > link in the current window or a new window/tab belongs to the viewer > > instead of the author, which some argue is exactly as it should be. > > > > Andrew > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > I'd avoid the target attribute, as it's deprecated in the strict versions > (and I'd avoid it for the reasons Andrew mentioned.) > > For reading, here's a nice resource to start with: > http://www.456bereastreet.com/archive/200603/the_target_attribute_and_opening_new_windows/ > > Adam > There are still valid reasons to use it. On my own site for example, and links which lead outside of my site open up in a new tab/window. I link to a lot of other external sites often in my blog entries, and I think it's valid that these links open up in new tabs/windows so that my site is left open when they read the rest of the article. I guess I could add some form of indication that the link will open up in a new window though. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] mysql_real_escape_string() and "
On 14 May 2010 22:03, Spud. Ivan. wrote: > > I'm trying to insert a serialized data into mysql, but I does > mysql_real_escape_string() before inserting it. > > INSERT IGNORE INTO `table` (`value`) VALUES > ('a:3:{s:12:"F1";s:6:"nombre";s:11:"F2";s:5:"F3";s:16:"F4";s:10:"F5";}'); > > it result in > INSERT IGNORE INTO `table` (`value`) VALUES > (\'a:3:{s:12:\"F1\";s:6:\"nombre\";s:11:\"F2\";s:5:\"F3\";s:16:\"F4\";s:10:\"F5\";}\'); > > and of course it's not a valid SQL sentence. > > Why can't I escape an SQL value with " ??? > > Regards. > > I.Lopez. > > Hello, Actually, the problem is that you're not just escaping the content of the insert, but the entire insert statement itself. You need to only escape the data, not the query. To properly prepare your statement, you need something like this: $sql = "INSERT IGNORE INTO `table` (`value`) VALUES ('".mysql_real_escape_query($my_serialized_string)."');"; Note that the mysql_real_escape_string() function is *not* affecting the apostrophes (') that delineate the value. Michiel
Re: [PHP] opening a link in a new window
On Fri, May 14, 2010 at 4:49 PM, Ashley Sheridan wrote: > On Fri, 2010-05-14 at 13:18 -0400, Adam Richardson wrote: > > On Fri, May 14, 2010 at 8:59 AM, Andrew Ballard wrote: > > > On Thu, May 13, 2010 at 5:18 PM, Ashley Sheridan > > wrote: > > > On Thu, 2010-05-13 at 17:13 -0400, David Mehler wrote: > > > > > >> Hello, > > >> I want to open an external link in a new window, i know i can do this > > >> with xhtml, but only with the transitional dtd, which i'm not using. I > > >> was wondering if php could pull this off? > > >> Thanks. > > >> Dave. > > >> > > > > > > > > > No. PHP is on the server, not the client-side. If you can't use > > > something like target="_blank" in your xhtml, then consider using > > > Javascript. It's not the ideal solution, as it won't work where > > > scripting is disabled or not available. > > > > > > Thanks, > > > Ash > > > http://www.ashleysheridan.co.uk > > > > It may or may not be the "ideal" solution, but I'm pretty sure it is > > considered the "correct" solution going forward. I recall reading > > somewhere that things like controlling the "target" for a link are > > considered behavior rather than part of the document's semantic > > structure, and therefore belong in scripting rather than markup under > > XHTML. That makes sense given that one of the goals of XHTML is > > structured documents that can be consumed by multiple services, > > including but not exclusively web browsers. > > > > This also has the side effect that the decision of whether to open a > > link in the current window or a new window/tab belongs to the viewer > > instead of the author, which some argue is exactly as it should be. > > > > Andrew > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > I'd avoid the target attribute, as it's deprecated in the strict versions > (and I'd avoid it for the reasons Andrew mentioned.) > > For reading, here's a nice resource to start > with:http://www.456bereastreet.com/archive/200603/the_target_attribute_and_opening_new_windows/ > > Adam > > > > There are still valid reasons to use it. On my own site for example, and > links which lead outside of my site open up in a new tab/window. I link to a > lot of other external sites often in my blog entries, and I think it's valid > that these links open up in new tabs/windows so that my site is left open > when they read the rest of the article. > > I guess I could add some form of indication that the link will open up in a > new window though. > > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > The resource I suggested was focused on the use of the target attribute to open a new window. Yes, there are situations where opening a new window/tab are appropriate (but, as you mentioned, you should always try to provide feedback that clicking the link will open a new window.) However, using javascript to open new windows provides a solution that validates for both strict and transitional documents AND separates behavior from content. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] opening a link in a new window
On 14 May 2010 22:49, Ashley Sheridan wrote: > > There are still valid reasons to use it. On my own site for example, and > links which lead outside of my site open up in a new tab/window. I link > to a lot of other external sites often in my blog entries, and I think > it's valid that these links open up in new tabs/windows so that my site > is left open when they read the rest of the article. > > I guess I could add some form of indication that the link will open up > in a new window though. > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > I don't entirely agree that the target attribute should be avoided, or that you absolutely need to use Strict XHTML rather than Transitional. There really aren't that many differences between them. Yes, a lot of legacy elements were removed, but those that program in valid XHTML tend to not use them anyway. The real reason why target is a little ill-conceived is because not all target devices are able to use it in a valid way, e.g. phones with simple web browsers. But if it was never your intention to support those devices, using Transitional and the target attribute really isn't an issue. Michiel
[PHP] PHP framework
Greetings all! I new in template engines and frameworks, can you advice me the best php framework. Do you all use smarty? I need something that does MVC and templates, and specialy that has a lot of web resources to see other uers experiences and problems. Regards, Joao -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP framework
On Sat, 2010-05-15 at 00:02 +0200, jfma...@electrex.pt wrote: > Greetings all! > > I new in template engines and frameworks, can you advice me the best php > framework. Do you all use smarty? I need something that does MVC and > templates, and specialy that has a lot of web resources to see other uers > experiences and problems. > > Regards, > > Joao > > CodeIgniter is probably the simplest to get to grips with as frameworks go. It's my understanding that Smarty is more of a templating engine than a framework. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] PHP framework
You can use the symfony. It's a great framework. Bye. Augusto Morais
Re: [PHP] Question about creating php files from a form
Paul M Foster wrote: On Thu, May 13, 2010 at 11:53:54PM -0400, Kevin wrote: /On a side note: I am having some issues with connecting to a SQLite database right now ... I'm getting the following error "Fatal Error: 'sqlite_open' is an unknown function" But I'm putting that on the side right now. I think the docs are still screwed up. Try sqlite3_open() instead and see if that works. Also, check phpinfo() to see if the SQLite/SQLite3 modules are loaded. Paul Thanks Paul, I tried with sqlite3_open() and it gave the same error. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] var_dump( (0 == 'heading') ) == TRUE ?!
Can someone explain why an integer 0 compared to a string evaluates to boolean true?? var_dump( (0 == 'heading') ); Yet, var_dump( (1 == 'heading') ); Is FALSE. WTF? I would expect the 0 one to be FALSE too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] var_dump( (0 == 'heading') ) == TRUE ?!
I'm pretty sure this is the right answer. If not, someone please correct me. PHP will compare the 0 against the integer represented by the string. So, for example, 0 == "0" would test true. 0 == "1" would test false. However, 'heading' doesn't represent a valid integer, so it appears on the right hand side as just 0, which is equal to the left hand side. James Daevid Vincent wrote: > Can someone explain why an integer 0 compared to a string evaluates to > boolean true?? > > var_dump( (0 == 'heading') ); > > Yet, > > var_dump( (1 == 'heading') ); > > Is FALSE. > > WTF? I would expect the 0 one to be FALSE too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] var_dump( (0 == 'heading') ) == TRUE ?!
On 15/05/2010 03:19, Daevid Vincent wrote: Can someone explain why an integer 0 compared to a string evaluates to boolean true?? var_dump( (0 == 'heading') ); Yet, var_dump( (1 == 'heading') ); Is FALSE. WTF? I would expect the 0 one to be FALSE too. http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion IMO this is a pretty well known gotcha of PHP - you need to use === to check type as well as value Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] var_dump( (0 == 'heading') ) == TRUE ?!
== operator type casts the string to integer before comparing so the comparison boils down to 0 == 0 which is true these rules also apply to the switch statement http://php.net/manual/en/language.operators.comparison.php but with === the typecasting does no occur -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about creating php files from a form
Kevin wrote: I am having some issues with connecting to a SQLite database right now ... I'm getting the following error "Fatal Error: 'sqlite_open' is an unknown function" But I'm putting that on the side right now. I think the docs are still screwed up. Try sqlite3_open() instead and see if that works. Also, check phpinfo() to see if the SQLite/SQLite3 modules are loaded. I tried with sqlite3_open() and it gave the same error. THEN ... 'check phpinfo()' Obviously sqlite extension is not actually loaded. You don't aey which OS ... On windows there are a list of extensions in the php.ini file, just 'uncomment' the one(s) you need ... -- 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
Re: [PHP] opening a link in a new window
>> On Fri, May 14, 2010 at 8:59 AM, Andrew Ballard wrote: >> >> > This also has the side effect that the decision of whether to open a >> > link in the current window or a new window/tab belongs to the viewer >> > instead of the author, which some argue is exactly as it should be. >> > >> > Andrew On Fri, May 14, 2010 at 4:49 PM, Ashley Sheridan wrote: > There are still valid reasons to use it. On my own site for example, and > links which lead outside of my site open up in a new tab/window. I link > to a lot of other external sites often in my blog entries, and I think > it's valid that these links open up in new tabs/windows so that my site > is left open when they read the rest of the article. > > I guess I could add some form of indication that the link will open up > in a new window though. > > Thanks, > Ash > http://www.ashleysheridan.co.uk Obviously it is up to you as the site author, but then that was part of the point I was trying to make above. Authors frequently make links to "external" material open in a new window because they don't want the user to navigate away from their own site. However, there are many who would argue that the target of a link is a decision that belongs to the viewer. In most browsers, one has the choice with any regular link to either click it and open it in the same window/frame as the referring document, or open the context menu (right-click, etc.) for the link and open it in a new tab/window. If the site author specifies target="_blank", the author has removed one of those options from the viewer. I get annoyed by sites that use href="javascript:window.open('someurl')" specifically because it prevents me from choosing to open the link in a new tab. Besides, as Adam said, more and more web browsing is being done on mobile devices and other platforms that don't support multiple "windows". In these environments, the idea of a link target no longer has meaning. For what it's worth, here is a sample page that shows one way to address the OP's question of duplicating the functionality of "target" on links while still being valid XHTML. And yeah ... I know someone will blast me for how much code it took to duplicate a simple target="_blank" attribute. :-) I didn't test it extensively (just tried it in Firefox and IE7) but I believe it degrades pretty well, it simulates target pretty closely, and it validates. http://pastebin.com/Q3MrWBKi Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
Hi! Thanks for all the replies... But may of the solutions are not for my question. Friends! E.g. : If user1 has logged in Internet Explorer on IP adress (Say IP - A) with MAC Adress (MAC-X) Then No other user can login on that IP (IP-A) AND MAC Adress (MAC-X) on any other browser say Firefox. I can stop any user to login more than one time at two different machines.. But I am unable to stop Multiple logins on same machine (ofcourse on different Browsers) Because each browser has different SESSION and Cookie system. I hope problem is very clear now.. regards Jagdeep Singh On Fri, May 14, 2010 at 9:51 PM, tedd wrote: > At 12:48 PM +0530 5/14/10, Jagdeep Singh wrote: > >> Hi All! >> >> I am looking for a solution, I want a user to do a single Login only on a >> PC >> . >> >> E.g. If a User has logged on my website website.com in Internet explorer, >> then he cant login on same website in another browser like Firefox etc >> with >> same loginid or another. >> >> Can I trace MAC address of a single machine to solve this issue? >> >> Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will >> work for all browsers in a single machine.. >> >> I hope You will help me out >> >> >> Regards >> >> Jagdeep Singh >> +91 9988009272 >> > > Jagdeep: > > I don't think this is solvable. > > You can make it such that if a person is logged-in that they cannot log-in > again until they log-out of their current session -- that's do able. > > But using IP addresses, or trying to sniff the machine, or other such > attempts at identifying user will most certainly be problematic and not > solve the problem. > > Good luck, > > tedd > > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com >
Re: [PHP] Multiple Login in a single PC should not be possible
Jagdeep Singh wrote: Hi! Thanks for all the replies... But may of the solutions are not for my question. Friends! E.g. : If user1 has logged in Internet Explorer on IP adress (Say IP - A) with MAC Adress (MAC-X) Then No other user can login on that IP (IP-A) AND MAC Adress (MAC-X) on any other browser say Firefox. I can stop any user to login more than one time at two different machines.. But I am unable to stop Multiple logins on same machine (ofcourse on different Browsers) Because each browser has different SESSION and Cookie system. I hope problem is very clear now.. Oh, I see... you don't even want 2 DIFFERENT users on the same computer to log in at the same time. Hah, you must be doing an online game or something. You cannot do what you want to do. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
Jagdeep Singh wrote: Hi! Thanks for all the replies... But may of the solutions are not for my question. But I am unable to stop Multiple logins on same machine (ofcourse on different Browsers) Because each browser has different SESSION and Cookie system. As I have already said ... you need to maintain a list of 'logged in' machines in addition to the 'logged in' users. You check any new login against the machine list as well as the user list. You ARE right in that a different browser will not have the cookie settings, but in YOUR case, simply do not use browser based 'storage'. Store the settings so that authentication from a different browser will return the current logged in status. I'm not worried about different browsers, but if the browser 'connection' is lost, then reopening it and trying to log in again takes you back to the point where the connection was lost. Should work cross browser, and does work IE6 to IE7 or 8. -- 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
Re: [PHP] Multiple Login in a single PC should not be possible
I am working on e-learning module... On Sat, May 15, 2010 at 12:03 PM, Robert Cummings wrote: > Jagdeep Singh wrote: > >> Hi! >> >> Thanks for all the replies... But may of the solutions are not for my >> question. >> >> Friends! >> >> E.g. : If user1 has logged in Internet Explorer on IP adress (Say IP - A) >> with MAC Adress (MAC-X) >> Then No other user can login on that IP (IP-A) AND MAC Adress (MAC-X) on >> any >> other browser say Firefox. >> >> I can stop any user to login more than one time at two different >> machines.. >> >> But I am unable to stop Multiple logins on same machine (ofcourse on >> different Browsers) Because each browser has different SESSION and Cookie >> system. >> >> I hope problem is very clear now.. >> > > Oh, I see... you don't even want 2 DIFFERENT users on the same computer to > log in at the same time. Hah, you must be doing an online game or something. > You cannot do what you want to do. > > > Cheers, > Rob. > -- > http://www.interjinn.com > Application and Templating Framework for PHP >