php-general Digest 13 Feb 2009 13:35:38 -0000 Issue 5956
php-general Digest 13 Feb 2009 13:35:38 - Issue 5956 Topics (messages 288200 through 288214): Re: Don't Forget to Punch the Clock, Shorty! 288200 by: Kyle Terry 288201 by: George Langley Re: PHP OOP 288202 by: Virgilio Quilario Re: How can an elephant count for nothing? 288203 by: Clancy 288206 by: Yeti Re: Opinions needed 288204 by: Per Jessen 288211 by: Rene Veerman 288213 by: Al Re: fork/spawnzombie question 288205 by: Per Jessen Re: Extract result from a https remote server response 288207 by: m a r k u s 288208 by: m a r k u s 288209 by: Bruno Fajardo 288212 by: m a r k u s [Fwd] How to make a secured login form 288210 by: Rene Veerman 288214 by: Virgilio Quilario Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- On Thu, Feb 12, 2009 at 5:03 PM, Richard Whitney phpmy...@gmail.com wrote: On Thu, Feb 12, 2009 at 5:05 PM, Daevid Vincent dae...@daevid.com wrote: On Thu, 2009-02-12 at 15:58 -0700, Richard Whitney wrote: Anyone care to try this out? Feedback welcome. http://dftpcs.com Thanks Also, given that this was formatted and sounded as vague as a spam email, I simply dismissed it and moved on. Even the URL is very cryptic (although I realize NOW that it's an acronym, at the time it looked random letters as phishers use). I have no interest in registering and giving you my email, etc. just to try a SaaS that i have ZERO idea how it works or what it does. There is no description. No screenshots. no anything. Why not provide a 'test/test123' account if you want people to try it out. Not to mention the time it would take for me to populate your tool with data to be useful enough to evaluate. http://daevid.com good idea Daevid! Thanks! http://dftpcs.com u: testing p: testing123 -- Richard Whitney phpmy...@gmail.com http://phpmydev.com 602-288-5340 310-943-6498 You come up with ideas, I come up with solutions. Haha...Information management and timesheets... That's what I write for a living. -- Kyle Terry | www.kyleterry.com Help kick start VOOM (Very Open Object Model) for a library of PHP classes. http://www.voom.me | IRC EFNet #voom ---End Message--- ---BeginMessage--- On 12-Feb-09, at 8:55 PM, Kyle Terry wrote: On Thu, 2009-02-12 at 15:58 -0700, Richard Whitney wrote: Anyone care to try this out? Feedback welcome. http://dftpcs.com Thanks -- Hi there! The right panel is not always refreshing correctly in my Mac Safari 3.2.1 Sometimes is leaving lines through the various elements, or not drawing them at all. This is occurring mostly when I click a Submit or other button in the right panel, but also when I click an item in the left panel. It does seem to be fine until after I have added a new company to the list, and then it starts having problems. Don't know if something in your code, or just my machine acting up! But may be worth testing somewhere else. HTH. George Langley Multimedia Developer, Audio/Video Editor, Musician, Arranger, Composer http://www.georgelangley.ca ---End Message--- ---BeginMessage--- Java is really awesome at OOP and it is great for teaching OOP or, shall we say illustrating OOP. OOP is a programming technique in general without any bias towards any programming language. Good background on OOP concepts is essential in learning language specific OOP implementation. So don't worry about languages. The important thing is, you know what OOP means. Also you can't compare PHP to other programming languages. PHP is new and mainly built for the web. With its raw power, it is simply incomparable. virgil http://www.jampmark.com ---End Message--- ---BeginMessage--- On Thu, 12 Feb 2009 23:47:31 +0800, huixinc...@baidu.com (???) wrote: Jochem Maas wrote: Clancy schreef: While PHP has a lot of nice features, it also has some traps which I am forever falling into. One which I find particularly hard to understand is how mixed mode comparisons work. . you can avoid auto-casting if needed, in a variety of ways: php -r ' $foo = elephant; if (!empty($foo)) echo $foo found!\n; if (strlen($foo)) echo $foo found!\n; if (is_string($foo) strlen($foo)) echo $foo found!\n; if ($foo !== ) echo $foo found!\n; if ($foo === elephant) echo $foo found!\n; ' those last 2 show how to use 'type-checked' equality testing. because intval(elephant) == 0; intval will convert the string into integer , Strings will most likely return 0 although this depends on the leftmost characters of the string.
php-general Digest 14 Feb 2009 01:41:03 -0000 Issue 5957
php-general Digest 14 Feb 2009 01:41:03 - Issue 5957 Topics (messages 288215 through 288245): Re: APC problem with PHP 288215 by: Virgilio Quilario Re: Extract result from a https remote server response 288216 by: Virgilio Quilario Re: Opinions needed 288217 by: Virgilio Quilario 288245 by: Ashley Sheridan Re: How can an elephant count for nothing? 288218 by: Virgilio Quilario Re: Simple open source CMS as a starting point 288219 by: Virgilio Quilario 288220 by: Shawn McKenzie Happy 1234567890 day! 288221 by: Lists 288222 by: Daniel Brown 288225 by: Luke Slater 288226 by: TG 288227 by: Daevid Vincent 288228 by: Virgilio Quilario 288233 by: Gary Maddock-Greene 288235 by: Don Collier 288236 by: Simon J Welsh 288237 by: Eric Butera 288241 by: alexus [PHP 5.2.8] Retrieve cookies from remote host and pass them back to client. 288223 by: Jason Cipriani 288224 by: Andrew Ballard 288230 by: Jason Cipriani Execute EXE with variables 288229 by: Dan Shirah 288231 by: Paul M Foster 288232 by: Dan Shirah Help with MySQL 288234 by: James Colannino 288240 by: Waynn Lue 288242 by: Shawn McKenzie list all constitute group of array ? 288238 by: LKSunny 288239 by: Robert Cummings 288243 by: Shawn McKenzie 288244 by: Shawn McKenzie Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- Hmm, I'll try taking down the optimizer and seeing if it segfaults or not. If that's what it is it's a crying shame that apc and zend_optimizer can't get along. maybe give eaccelerator a shot, i believe theyve got an optimizer in there. im not sure how it stacks up to zend's, but it will do both caching and optimization, afaik. also, you will find a not yet stable optimization extension haging out in pecl for apc, http://pecl.php.net/package/optimizer -nathan I'd recommend using X-Cache. I've had nothing but good experiences with it. i would also recommend x-cache. it's incredibly fast and stable. i could also cache data on memory with it. have used it on high traffic sites with no problem ever since. Virgil http://www.jampmark.com ---End Message--- ---BeginMessage--- Sorry all, I was testing in a Windows environment. I feel like an idiot... :) Thanks to all. -- m a r k u s Bruno Fajardo wrote: Assigning the return of file_get_contents to a variable? Didn't get your point... 2009/2/13 m a r k u s queribus2...@hotmail.com Shawn McKenzie wrote: Shawn McKenzie wrote: m a r k u s wrote: Hi all, Example : https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123 The MB server response displayed is : Illegal operation. We would like to put the result below in a php variable and process it . An idea ? PS: The server is secured. The php functions like file(), file_get_contents(), readfile(), fopen() has been tested. Regards -- m a r k u s allow_url_fopen = On We have no control of the MB remote server configuration. -- m a r k u s -- in your php.ini, set allow_url_fopen = On then do this: $contents = file_get_contents('https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123'); if ($contents !== FALSE) // $contents now have your data to work on virgil http://www.jampmark.com ---End Message--- ---BeginMessage--- I'm scripting a light-weight, low volume signup registry for a running club. Folks sign up to volunteer for events and the like. There will generally be a handful of signup registries at any one time. A typical registry will only contain 50 to 100 names. Each registry is only in existence for a month or so. I really don't see the advantage of using a real DB [e.g., mySQL,] for this. Don't need any special searching, etc. Am thinking of using a simple serialized array file for each registry; or, using Pear Cache_lite. Cache_lite has several nice functions I can take advantage of. In spite of its name, it can be configured to be permanent. I'd just go ahead and use Cache_lite; but, I'm always reluctant to use a Pear package for fear it may not be updated for for future php releases, etc. I aways aim to keep maintenance to a minimum. Anyone had experience with Cache_Lite? Anyone have an opinion on the alternatives or maybe another storage approach? Thanks, Al I think you should fear for updates in Pear because that might break your code. once you get it working and you're happy with it, try not to update unless
Re: [PHP] Opinions needed
Al wrote: I'm scripting a light-weight, low volume signup registry for a running club. Folks sign up to volunteer for events and the like. There will generally be a handful of signup registries at any one time. A typical registry will only contain 50 to 100 names. Each registry is only in existence for a month or so. I really don't see the advantage of using a real DB [e.g., mySQL,] for this. Don't need any special searching, etc. You might as well just go with MySQL. It'll make it a lot easier both to start with and in the long run. -- Per Jessen, Zürich (-1.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fork/spawnzombie question
bruce wrote: Hi Nathan/Torok... Hey guys... got a bit of a question. I'm playing around with the php/for/pcntl_exec functions and I've got a process that spawns off a bunch of child processes. Unfortunately, I'm getting to where I have 100's of zombie child processes that I can see from the linux/processTBL. I don't want to have my master loop do a waitpid() call, as it would block on the wait for one of the child processes to exit. No, it wouldn't - just use WNOHANG: pcntl_waitpid( -1, $status, WNOHANG ); /Per Jessen -- Per Jessen, Zürich (-0.9°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can an elephant count for nothing?
I guess the main reason for PHP to behave like this is to make life easier for many everyday situations. EXAMPLE: User input via GET or POST - usually string You compare it to some value - int/string or whatever So if a user posts '17' (string) and you compare it to 17 (int), unless you are using ===, PHP won't complain. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Extract result from a https remote server response
Shawn McKenzie wrote: m a r k u s wrote: Hi all, Example : https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123 The MB server response displayed is : Illegal operation. We would like to put the result below in a php variable and process it . An idea ? PS: The server is secured. The php functions like file(), file_get_contents(), readfile(), fopen() has been tested. Regards -- m a r k u s Well, I don't know how you tested, but if fopen_wrappers are enabled in php.ini, then this: echo file_get_contents('https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123'); displays this: Illegal operation Seems to work for me. The question is how to extract what is displayed to be processed by our script ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Extract result from a https remote server response
Shawn McKenzie wrote: Shawn McKenzie wrote: m a r k u s wrote: Hi all, Example : https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123 The MB server response displayed is : Illegal operation. We would like to put the result below in a php variable and process it . An idea ? PS: The server is secured. The php functions like file(), file_get_contents(), readfile(), fopen() has been tested. Regards -- m a r k u s allow_url_fopen = On We have no control of the MB remote server configuration. -- m a r k u s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Extract result from a https remote server response
Assigning the return of file_get_contents to a variable? Didn't get your point... 2009/2/13 m a r k u s queribus2...@hotmail.com Shawn McKenzie wrote: Shawn McKenzie wrote: m a r k u s wrote: Hi all, Example : https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123 The MB server response displayed is : Illegal operation. We would like to put the result below in a php variable and process it . An idea ? PS: The server is secured. The php functions like file(), file_get_contents(), readfile(), fopen() has been tested. Regards -- m a r k u s allow_url_fopen = On We have no control of the MB remote server configuration. -- m a r k u s -- 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
[PHP] [Fwd] How to make a secured login form
Hi, I'm cross-posting this (from jquery-en js mailinglist) because it's something that i think is relevant for this list too.. You can ignore the jQuery in it, since all the jquery calls can be replaced with document.getElementById(). I have secured the login form for my CMS with a challenge-response thing that encrypts both username and password with the (login-attempts-counted) challenge (and; here's my problem: a system hash) sent by the server (it would end up in your html as a hidden inputs, or as part of a json transmission).. Since then, i've found these libs that do even longer one-way-crypto: http://mediabeez.ws/downloads/sha256.js-php.zip The principles i'm about to explain stay the same. *but i'd really like to know if my crypto can be improved* So instead of the browser getting just a text-field for username and password, you also send the challenge (and system_hash) value. That's a 100-character random string (include special characters!), then sha256-ed (for prettiness mostly i think). I really wonder if i can do without the systemhash.. HTML form id=myForm input type=hidden id=system_hash name=system_hash value=[SHA256 SORTA-MASTER-KEY__DUNNO-WHAT-TO-DO-WITH-THIS]/ input type=hidden id=challenge name=challenge value=[SHA256RANDOMSTRINGFROMPHP]/ table trtdLogin/tdtdnbsp;/tdtdinput id='login' name='login'//td/tr trtdPassword/tdtdnbsp;/tdtdinput id='pass' name='pass'//td/tr /table /form JS $('#myform').submit (function() { var s = ($'system_hash')[0]; var c = ($'challenge')[0]; var l = $('#login')[0]; var p = $('#pass')[0]; l.value = sha256 (sha256 (l.value + s.value) + c.value); p.value = sha256 (sha256 (p.value + s.value) + c.value); //Here, submit the form using ajax routines in plain text, as both the login name and //password are now one-way-encrypted. // //on the PHP end, authentication is done against a mysql table users. // //in this table i have 3 relevant fields: //user_login_name (for administrative and display purposes) //user_login_name_hash (==sha256 (user_login_name + system_hash)) //user_password_hash (== passwords aint stored unencrypted in my cms, to prevent admin corruption and pw-theft by third parties; the password is encrypted by the browser in the new-password-form with the system hash before it's ever sent to the server. server Never knows about the cleartext password, ever.) // //when a login-attempt is evaluated, all the records in users table have to be traversed (which i admit can get slow on larger userbases... help!?! :) //for each user in the users table, the loginhash and password hash are calculated; //$uh = sha256 ($users-rec[user_login_name_hash] . $challenge); //$pwh = sha256 ($users-rec[user_password_hash] . $challenge); //and then, //if they match the hash strings that were sent (both of them), //if the number of login-attempts isn't exceeded, //if the IP is still the same (as the one who first requested the html login form with new challenge value) //then, maybe, i'll let 'm log in :) }); phicarre wrote: How to secure this jquery+php+ajax login procedure ? $('#myform').submit( function() { $(this).ajaxSubmit( { type:'POST', url:'login.php', success: function(msg) { login ok : how to call the welcome.php *** }, error: function(request,iderror) { alert(iderror + + request); } }); return false; }) form id=myForm action= Name : input type='text' name='login' size='15' / divPassword : input type='password' name='passe' size='15' / /div input type=submit value=login class=submit / /form Login.php check the parameters and reply by echo ok or echo ko Logically if the answer is ok we must call a welcome.php module BUT, if someone read the client code, he will see the name of the module and can hack the server. May I wrong ? how to secure this code ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Opinions needed
Al wrote: I'm scripting a light-weight, low volume signup registry for a running club. Folks sign up to volunteer for events and the like. There will generally be a handful of signup registries at any one time. A typical registry will only contain 50 to 100 names. Each registry is only in existence for a month or so. I really don't see the advantage of using a real DB [e.g., mySQL,] for this. Don't need any special searching, etc. Am thinking of using a simple serialized array file for each registry; or, using Pear Cache_lite. Cache_lite has several nice functions I can take advantage of. In spite of its name, it can be configured to be permanent. I'd just go ahead and use Cache_lite; but, I'm always reluctant to use a Pear package for fear it may not be updated for for future php releases, etc. I aways aim to keep maintenance to a minimum. Anyone had experience with Cache_Lite? Anyone have an opinion on the alternatives or maybe another storage approach? Thanks, Al AdoDB + SQL = easier to maintain than a half dozen custom storage interfaces.. imo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Extract result from a https remote server response
Sorry all, I was testing in a Windows environment. I feel like an idiot... :) Thanks to all. -- m a r k u s Bruno Fajardo wrote: Assigning the return of file_get_contents to a variable? Didn't get your point... 2009/2/13 m a r k u s queribus2...@hotmail.com Shawn McKenzie wrote: Shawn McKenzie wrote: m a r k u s wrote: Hi all, Example : https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123 The MB server response displayed is : Illegal operation. We would like to put the result below in a php variable and process it . An idea ? PS: The server is secured. The php functions like file(), file_get_contents(), readfile(), fopen() has been tested. Regards -- m a r k u s allow_url_fopen = On We have no control of the MB remote server configuration. -- m a r k u s -- 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] Opinions needed
Rene Veerman wrote: Al wrote: I'm scripting a light-weight, low volume signup registry for a running club. Folks sign up to volunteer for events and the like. There will generally be a handful of signup registries at any one time. A typical registry will only contain 50 to 100 names. Each registry is only in existence for a month or so. I really don't see the advantage of using a real DB [e.g., mySQL,] for this. Don't need any special searching, etc. Am thinking of using a simple serialized array file for each registry; or, using Pear Cache_lite. Cache_lite has several nice functions I can take advantage of. In spite of its name, it can be configured to be permanent. I'd just go ahead and use Cache_lite; but, I'm always reluctant to use a Pear package for fear it may not be updated for for future php releases, etc. I aways aim to keep maintenance to a minimum. Anyone had experience with Cache_Lite? Anyone have an opinion on the alternatives or maybe another storage approach? Thanks, Al AdoDB + SQL = easier to maintain than a half dozen custom storage interfaces.. imo. I don't really have any custom storage interfaces. To create a new signup registry, we simply place a file in the topic directory [e.g., /10Krace/Volunteers.php] that contains one line of code that includes the operational scripts. require_once $_SERVER['DOCUMENT_ROOT'] . '/signups/commonReg.php'; commonReg.php takes care of everything and the signup's ID is simply /10Krace/Volunteers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Fwd] How to make a secured login form
I have secured the login form for my CMS with a challenge-response thing that encrypts both username and password with the (login-attempts-counted) challenge (and; here's my problem: a system hash) sent by the server (it would end up in your html as a hidden inputs, or as part of a json transmission).. Since then, i've found these libs that do even longer one-way-crypto: http://mediabeez.ws/downloads/sha256.js-php.zip The principles i'm about to explain stay the same. *but i'd really like to know if my crypto can be improved* So instead of the browser getting just a text-field for username and password, you also send the challenge (and system_hash) value. That's a 100-character random string (include special characters!), then sha256-ed (for prettiness mostly i think). I really wonder if i can do without the systemhash.. HTML form id=myForm input type=hidden id=system_hash name=system_hash value=[SHA256 SORTA-MASTER-KEY__DUNNO-WHAT-TO-DO-WITH-THIS]/ input type=hidden id=challenge name=challenge value=[SHA256RANDOMSTRINGFROMPHP]/ table trtdLogin/tdtdnbsp;/tdtdinput id='login' name='login'//td/tr trtdPassword/tdtdnbsp;/tdtdinput id='pass' name='pass'//td/tr /table /form JS $('#myform').submit (function() { var s = ($'system_hash')[0]; var c = ($'challenge')[0]; var l = $('#login')[0]; var p = $('#pass')[0]; l.value = sha256 (sha256 (l.value + s.value) + c.value); p.value = sha256 (sha256 (p.value + s.value) + c.value); //Here, submit the form using ajax routines in plain text, as both the login name and //password are now one-way-encrypted. // //on the PHP end, authentication is done against a mysql table users. // //in this table i have 3 relevant fields: //user_login_name (for administrative and display purposes) //user_login_name_hash (==sha256 (user_login_name + system_hash)) //user_password_hash (== passwords aint stored unencrypted in my cms, to prevent admin corruption and pw-theft by third parties; the password is encrypted by the browser in the new-password-form with the system hash before it's ever sent to the server. server Never knows about the cleartext password, ever.) // //when a login-attempt is evaluated, all the records in users table have to be traversed (which i admit can get slow on larger userbases... help!?! :) //for each user in the users table, the loginhash and password hash are calculated; //$uh = sha256 ($users-rec[user_login_name_hash] . $challenge); //$pwh = sha256 ($users-rec[user_password_hash] . $challenge); //and then, //if they match the hash strings that were sent (both of them), //if the number of login-attempts isn't exceeded, //if the IP is still the same (as the one who first requested the html login form with new challenge value) //then, maybe, i'll let 'm log in :) }); phicarre wrote: How to secure this jquery+php+ajax login procedure ? $('#myform').submit( function() { $(this).ajaxSubmit( { type:'POST', url:'login.php', success: function(msg) { login ok : how to call the welcome.php *** }, error: function(request,iderror) { alert(iderror + + request); } }); return false; }) form id=myForm action= Name : input type='text' name='login' size='15' / divPassword : input type='password' name='passe' size='15' / /div input type=submit value=login class=submit / /form Login.php check the parameters and reply by echo ok or echo ko Logically if the answer is ok we must call a welcome.php module BUT, if someone read the client code, he will see the name of the module and can hack the server. May I wrong ? how to secure this code ? i think you should drop the IP address out of the equation because when you're behind a firewall with rotating outgoing IP addresses, you will never get authenticated. also, traversing users table is a slow operation as you pointed out. i guess you should look into two way encryption or use ssl which is better and easier to implement. virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC problem with PHP
Hmm, I'll try taking down the optimizer and seeing if it segfaults or not. If that's what it is it's a crying shame that apc and zend_optimizer can't get along. maybe give eaccelerator a shot, i believe theyve got an optimizer in there. im not sure how it stacks up to zend's, but it will do both caching and optimization, afaik. also, you will find a not yet stable optimization extension haging out in pecl for apc, http://pecl.php.net/package/optimizer -nathan I'd recommend using X-Cache. I've had nothing but good experiences with it. i would also recommend x-cache. it's incredibly fast and stable. i could also cache data on memory with it. have used it on high traffic sites with no problem ever since. Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Extract result from a https remote server response
Sorry all, I was testing in a Windows environment. I feel like an idiot... :) Thanks to all. -- m a r k u s Bruno Fajardo wrote: Assigning the return of file_get_contents to a variable? Didn't get your point... 2009/2/13 m a r k u s queribus2...@hotmail.com Shawn McKenzie wrote: Shawn McKenzie wrote: m a r k u s wrote: Hi all, Example : https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123 The MB server response displayed is : Illegal operation. We would like to put the result below in a php variable and process it . An idea ? PS: The server is secured. The php functions like file(), file_get_contents(), readfile(), fopen() has been tested. Regards -- m a r k u s allow_url_fopen = On We have no control of the MB remote server configuration. -- m a r k u s -- in your php.ini, set allow_url_fopen = On then do this: $contents = file_get_contents('https://www.moneybookers.com/app/email_check.pl?email=t...@toto.comcust_id=123546password=123'); if ($contents !== FALSE) // $contents now have your data to work on virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Opinions needed
I'm scripting a light-weight, low volume signup registry for a running club. Folks sign up to volunteer for events and the like. There will generally be a handful of signup registries at any one time. A typical registry will only contain 50 to 100 names. Each registry is only in existence for a month or so. I really don't see the advantage of using a real DB [e.g., mySQL,] for this. Don't need any special searching, etc. Am thinking of using a simple serialized array file for each registry; or, using Pear Cache_lite. Cache_lite has several nice functions I can take advantage of. In spite of its name, it can be configured to be permanent. I'd just go ahead and use Cache_lite; but, I'm always reluctant to use a Pear package for fear it may not be updated for for future php releases, etc. I aways aim to keep maintenance to a minimum. Anyone had experience with Cache_Lite? Anyone have an opinion on the alternatives or maybe another storage approach? Thanks, Al I think you should fear for updates in Pear because that might break your code. once you get it working and you're happy with it, try not to update unless there is a real need. you should also consider concurrency where multiple users simultaneously doing logins. your data file may end up broken. good luck Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can an elephant count for nothing?
While PHP has a lot of nice features, it also has some traps which I am forever falling into. One which I find particularly hard to understand is how mixed mode comparisons work. For instance $string = 'elephant'; If($string == 0) returns true; If($string != 0) returns false; If($string === 0) returns false; I know that in this case I should use 'If($string == '')', but I still manage to forget. Can anyone explain clearly why comparing a string with zero gives this apparently anomalous result? when comparing string with integer, the interpreter first converts string into an integer before comparison takes place. Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple open source CMS as a starting point
I need simple CMS sistem that I could use as a staring point (to save some time in setting up the structure) in developing my own CMS. The code should be simple to understand so that I can easily get on and start building on it. It would be of great help if it already had features like statistics, rss feeds, and multi-language support (visitors can click on the flag at the top of the page and have the pages display the content in that particular language), but if it doesn't it's okay I would build them. For example Joomla seems to be too powerfull, and pretty diffucult to understand at the coding level in order to customize it to serve my specific needs. Does anyone know of any promising open source CMS project that I could use in this respect? Thanks, Dzenan Are you referring to 5 minute sites? anyway, try word press. it is very easy to add custom pages in PHP. you can also download free modules for rss feeds and multi-language support with flags at the top. good luck, Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simple open source CMS as a starting point
dzenan.cause...@wise-t.com wrote: I need simple CMS sistem that I could use as a staring point (to save some time in setting up the structure) in developing my own CMS. The code should be simple to understand so that I can easily get on and start building on it. It would be of great help if it already had features like statistics, rss feeds, and multi-language support (visitors can click on the flag at the top of the page and have the pages display the content in that particular language), but if it doesn't it's okay I would build them. For example Joomla seems to be too powerfull, and pretty diffucult to understand at the coding level in order to customize it to serve my specific needs. Does anyone know of any promising open source CMS project that I could use in this respect? Thanks, Dzenan I haven't tried them, but I would suspect if you want something simple that you can extend, you might look at some of the simple or alpha/beta CMSs that have been developed in a PHP framework. There are several in the cake forge for the cakephp framework and I'm sure other frameworks have 1 or more. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Happy 1234567890 day!
:-) Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o D. BROOKE EUCA Design Center WEB: http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Happy 1234567890 day!
2009/2/13 Lists li...@euca.us: :-) Donovan To you, as well! I think it's really neat. For us in the EST time zone, with time adjustments and such, it'll be 6:31:30p tonight. ?php echo strtotime(February 13, 2009 6:31:30 PM); ? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [PHP 5.2.8] Retrieve cookies from remote host and pass them back to client.
I have a PHP 5.2.8 web application that needs to retrieve a resource from a remote URL. However, the remote host also sends a cookie back (in a Set-Cookie header), and I need to grab that cookie and pass it on to the client (so that it's stored by the client browser). I do know the name of the cookie beforehand. What is the best way to do this? Passing a cookie from PHP back to the client is easy, it's grabbing the cookie from the remote URL that is the problem. There is no support for cookies in file_get_contents(), so that won't work. I can use curl to retrieve the remote URL with headers, but curl does not seem to provide an easy way to get the value of the cookie beyond retrieving the HTTP headers and parsing them manually. I could use and parse curl's cookie file (another hack) but the cookie contains a value that is randomly generated, and the cookies in curl's cookie jar are global to all PHP requests (so if multiple users made the same request, their cookie value could be shared). How can I retrieve the contents of a remote resource as well as the value of a cookie sent with that resource? Thanks, Jason P.S.: Also, as a minor side question; how, if at all, would the method for doing this be different in PHP 4.4.9? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP 5.2.8] Retrieve cookies from remote host and pass them back to client.
On Fri, Feb 13, 2009 at 12:42 PM, Jason Cipriani jason.cipri...@gmail.comwrote: I have a PHP 5.2.8 web application that needs to retrieve a resource from a remote URL. However, the remote host also sends a cookie back (in a Set-Cookie header), and I need to grab that cookie and pass it on to the client (so that it's stored by the client browser). I do know the name of the cookie beforehand. What is the best way to do this? Passing a cookie from PHP back to the client is easy, it's grabbing the cookie from the remote URL that is the problem. There is no support for cookies in file_get_contents(), so that won't work. I can use curl to retrieve the remote URL with headers, but curl does not seem to provide an easy way to get the value of the cookie beyond retrieving the HTTP headers and parsing them manually. I could use and parse curl's cookie file (another hack) but the cookie contains a value that is randomly generated, and the cookies in curl's cookie jar are global to all PHP requests (so if multiple users made the same request, their cookie value could be shared). How can I retrieve the contents of a remote resource as well as the value of a cookie sent with that resource? Thanks, Jason P.S.: Also, as a minor side question; how, if at all, would the method for doing this be different in PHP 4.4.9? I usually use the HttpRequest for this type of stuff, but it only works with PHP 5.0/5.1 and greater. Otherwise, CURL is the next easiest, followed by direct socket connections. Keep in mind when passing the cookie to the client that if the client browser is set to reject 3rd party cookies and you pass a value for $domain to setcookie() that is different than the domain of your site, the browser will ignore the header. Andrew
Re: [PHP] Happy 1234567890 day!
On Friday 13 Feb 2009 17:39:09 Daniel Brown : 2009/2/13 Lists li...@euca.us: :-) Donovan To you, as well! I think it's really neat. For us in the EST time zone, with time adjustments and such, it'll be 6:31:30p tonight. ?php echo strtotime(February 13, 2009 6:31:30 PM); ? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Unadvertised dedicated server deals, too low to print - email me to find out! Odd that I should see this on here, I wrote a script in PHP to calculate the time left to 1234567890 earlier... ?php print Unix timestamp is: . time() . \n; $left = 1234567890 - time(); print Time left til 1234567890 is: . $left . \n; But if we're being all obfuscated you could do: ?php print Time left: . 1234567890 - time(); signature.asc Description: This is a digitally signed message part.
Re: [PHP] Happy 1234567890 day!
http://timestamp1234567890.com/ - Original Message - From: Lists li...@euca.us To: php-general@lists.php.net Date: Fri, 13 Feb 2009 11:33:28 -0600 Subject: [PHP] Happy 1234567890 day! :-) Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o D. BROOKE EUCA Design Center WEB: http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o -- 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] Happy 1234567890 day!
http://coolepochcountdown.com/ On Fri, 2009-02-13 at 13:34 -0500, TG wrote: http://timestamp1234567890.com/
Re: [PHP] Happy 1234567890 day!
http://coolepochcountdown.com/ On Fri, 2009-02-13 at 13:34 -0500, TG wrote: http://timestamp1234567890.com/ Happy cool epoch 1234567890 day! virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Execute EXE with variables
Hello all, Can someone point me in the right direction? I'm trying to call an EXE from PHP and pass it two variables. I looked at the exec() command and I see that this can call the executable, but I don't see that it can pass the variables to it. Dan
Re: [PHP] [PHP 5.2.8] Retrieve cookies from remote host and pass them back to client.
On Fri, Feb 13, 2009 at 1:03 PM, Andrew Ballard aball...@gmail.com wrote: On Fri, Feb 13, 2009 at 12:42 PM, Jason Cipriani jason.cipri...@gmail.com wrote: I have a PHP 5.2.8 web application that needs to retrieve a resource from a remote URL. However, the remote host also sends a cookie back (in a Set-Cookie header), and I need to grab that cookie and pass it on to the client (so that it's stored by the client browser). I do know the name of the cookie beforehand. What is the best way to do this? Passing a cookie from PHP back to the client is easy, it's grabbing the cookie from the remote URL that is the problem. There is no support for cookies in file_get_contents(), so that won't work. I can use curl to retrieve the remote URL with headers, but curl does not seem to provide an easy way to get the value of the cookie beyond retrieving the HTTP headers and parsing them manually. I could use and parse curl's cookie file (another hack) but the cookie contains a value that is randomly generated, and the cookies in curl's cookie jar are global to all PHP requests (so if multiple users made the same request, their cookie value could be shared). How can I retrieve the contents of a remote resource as well as the value of a cookie sent with that resource? Thanks, Jason P.S.: Also, as a minor side question; how, if at all, would the method for doing this be different in PHP 4.4.9? I usually use the HttpRequest for this type of stuff, but it only works with PHP 5.0/5.1 and greater. Otherwise, CURL is the next easiest, followed by direct socket connections. Thanks! This is exactly what I was looking for. I've managed to get everything working well with HttpRequest. Cheers, Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Execute EXE with variables
On Fri, Feb 13, 2009 at 02:30:38PM -0500, Dan Shirah wrote: Hello all, Can someone point me in the right direction? I'm trying to call an EXE from PHP and pass it two variables. I looked at the exec() command and I see that this can call the executable, but I don't see that it can pass the variables to it. Use the system() command, and enclose both your command and its parameters in a pair of single quotes, as: system('mycmd -a alfa -b bravo'); Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Execute EXE with variables
Use the system() command, and enclose both your command and its parameters in a pair of single quotes, as: system('mycmd -a alfa -b bravo'); Paul -- Paul M. Foster Using both exec() and system() I am getting the error: Unable to fork
Re: [PHP] Happy 1234567890 day!
Note quite there yet here but yes Happy 1234567890 day to you too -- - Gary Maddock-Greene Luke Slater l...@blog-thing.com wrote in message news:200902131812.43295.l...@blog-thing.com... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with MySQL
Hey everyone. I've been reading the list for a long time, but have only really posted to the mailing list a few times. I just had a quick question about MySQL. I'm not sure if this is exactly relevant to PHP, but it is for a PHP application I'm writing, so hopefully that makes this question ok :) Basically, I was wondering if there are any queries in MySQL that I can use to determine the data types used to construct a pre-existing table. The reason I ask is that I went back to look at the data in a table I've been using for a while and realized that I forgot to document what the data types were (DOH!) I'm sure there's something, but I wasn't quite sure what to google for, so I wasn't really able to turn up anything. Thanks! James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Happy 1234567890 day!
Lists wrote: :-) Donovan Is there going to be someone contacting me about my prize? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Happy 1234567890 day!
Happy 1234567890! (yes, 3.5 minutes late) On 14/02/2009, at 11:13 AM, Gary Maddock-Greene wrote: Note quite there yet here but yes Happy 1234567890 day to you too -- - Gary Maddock-Greene Luke Slater l...@blog-thing.com wrote in message news:200902131812.43295.l...@blog-thing.com ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Simon Welsh Admin of http://simon.geek.nz/ Who said Microsoft never created a bug-free program? The blue screen never, ever crashes! http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Happy 1234567890 day!
On Fri, Feb 13, 2009 at 5:13 PM, Gary Maddock-Greene g...@maddock-greene.co.uk wrote: Note quite there yet here but yes Happy 1234567890 day to you too -- - Gary Maddock-Greene Luke Slater l...@blog-thing.com wrote in message news:200902131812.43295.l...@blog-thing.com... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php woot! -- http://www.voom.me | EFnet: #voom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] list all constitute group of array ?
On Sat, 2009-02-14 at 07:41 +0800, LKSunny wrote: ? $a = array(a, b, c, d); /* how to list: abcd abc ab ac ad bcd bc bd cd a b c d who have idea ? thank you very much !! */ ? This looks like homework. Use recursion. 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] Help with MySQL
You can type show create table tablename to see the datatypes. Waynn On 2/13/09, James Colannino ja...@colannino.org wrote: Hey everyone. I've been reading the list for a long time, but have only really posted to the mailing list a few times. I just had a quick question about MySQL. I'm not sure if this is exactly relevant to PHP, but it is for a PHP application I'm writing, so hopefully that makes this question ok :) Basically, I was wondering if there are any queries in MySQL that I can use to determine the data types used to construct a pre-existing table. The reason I ask is that I went back to look at the data in a table I've been using for a while and realized that I forgot to document what the data types were (DOH!) I'm sure there's something, but I wasn't quite sure what to google for, so I wasn't really able to turn up anything. Thanks! James -- 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] Happy 1234567890 day!
wot!!! On Fri, Feb 13, 2009 at 6:38 PM, Eric Butera eric.but...@gmail.com wrote: On Fri, Feb 13, 2009 at 5:13 PM, Gary Maddock-Greene g...@maddock-greene.co.uk wrote: Note quite there yet here but yes Happy 1234567890 day to you too -- - Gary Maddock-Greene Luke Slater l...@blog-thing.com wrote in message news:200902131812.43295.l...@blog-thing.com... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php woot! -- http://www.voom.me | EFnet: #voom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://alexus.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help with MySQL
James Colannino wrote: Hey everyone. I've been reading the list for a long time, but have only really posted to the mailing list a few times. I just had a quick question about MySQL. I'm not sure if this is exactly relevant to PHP, but it is for a PHP application I'm writing, so hopefully that makes this question ok :) Basically, I was wondering if there are any queries in MySQL that I can use to determine the data types used to construct a pre-existing table. The reason I ask is that I went back to look at the data in a table I've been using for a while and realized that I forgot to document what the data types were (DOH!) I'm sure there's something, but I wasn't quite sure what to google for, so I wasn't really able to turn up anything. Thanks! James DESCRIBE tablename -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] list all constitute group of array ?
Robert Cummings wrote: On Sat, 2009-02-14 at 07:41 +0800, LKSunny wrote: ? $a = array(a, b, c, d); /* how to list: abcd abc ab ac ad bcd bc bd cd a b c d who have idea ? thank you very much !! */ ? This looks like homework. Use recursion. Cheers, Rob. Well, I don't know how you list them in that pattern, you need to write an algorithm, but array_keys() will give keys for the array. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] list all constitute group of array ?
Shawn McKenzie wrote: Robert Cummings wrote: On Sat, 2009-02-14 at 07:41 +0800, LKSunny wrote: ? $a = array(a, b, c, d); /* how to list: abcd abc ab ac ad bcd bc bd cd a b c d who have idea ? thank you very much !! */ ? This looks like homework. Use recursion. Cheers, Rob. Well, I don't know how you list them in that pattern, you need to write an algorithm, but array_keys() will give keys for the array. Or, if I actually read your post they are values, so maybe array_values() or you can check http://php.net/manual/book.array.php and hope you get an A. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Opinions needed
On Fri, 2009-02-13 at 08:02 -0500, Al wrote: Rene Veerman wrote: Al wrote: I'm scripting a light-weight, low volume signup registry for a running club. Folks sign up to volunteer for events and the like. There will generally be a handful of signup registries at any one time. A typical registry will only contain 50 to 100 names. Each registry is only in existence for a month or so. I really don't see the advantage of using a real DB [e.g., mySQL,] for this. Don't need any special searching, etc. Am thinking of using a simple serialized array file for each registry; or, using Pear Cache_lite. Cache_lite has several nice functions I can take advantage of. In spite of its name, it can be configured to be permanent. I'd just go ahead and use Cache_lite; but, I'm always reluctant to use a Pear package for fear it may not be updated for for future php releases, etc. I aways aim to keep maintenance to a minimum. Anyone had experience with Cache_Lite? Anyone have an opinion on the alternatives or maybe another storage approach? Thanks, Al AdoDB + SQL = easier to maintain than a half dozen custom storage interfaces.. imo. I don't really have any custom storage interfaces. To create a new signup registry, we simply place a file in the topic directory [e.g., /10Krace/Volunteers.php] that contains one line of code that includes the operational scripts. require_once $_SERVER['DOCUMENT_ROOT'] . '/signups/commonReg.php'; commonReg.php takes care of everything and the signup's ID is simply /10Krace/Volunteers Which in itself is a custom storage interface... Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Lightweight Picasa API v3
Anyone using Cameron Hinkle's Picasa API? I'm having a bitch of a time trying to get the AuthSub methods working and would love to trade ideas if anyone is familiar. thanks, John Corry email: jco...@gmail.com
Re: [PHP] Happy 1234567890 day!
It's not the 1234567890th day! Its the 12345Gmail - [PHP] Happy 1234567890 day! - th.he...@gmail.com ?shva=1#label/PHP/11f70b391d7613f767890 second since beginning of 1970: 2009-02-14 12:31:30 is the result of $a = 1234567890;// * 60*60*24; die(date(Y-m-d H:i:s, $a)); Anyway happy 1234567890 second to all of you, although i'm sure i'm late lol (i'm a German who is always late). Regards, Tim-Hinnerk Heuer http://www.ihostnz.com Mike Ditka - If God had wanted man to play soccer, he wouldn't have given us arms. 2009/2/14 alexus ale...@gmail.com wot!!! On Fri, Feb 13, 2009 at 6:38 PM, Eric Butera eric.but...@gmail.com wrote: On Fri, Feb 13, 2009 at 5:13 PM, Gary Maddock-Greene g...@maddock-greene.co.uk wrote: Note quite there yet here but yes Happy 1234567890 day to you too -- - Gary Maddock-Greene Luke Slater l...@blog-thing.com wrote in message news:200902131812.43295.l...@blog-thing.com... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php woot! -- http://www.voom.me | EFnet: #voom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://alexus.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php