Re: [PHP] change Style Sheet by programming
I don't really understand your question, but... http://www.quirksmode.org/dom/changess.html http://www.quirksmode.org/book/examplescripts/dropdown/index.html On 3/6/07, Alain Roger <[EMAIL PROTECTED]> wrote: Hi, I'm creating a Class which should allow user to setup the default theme CSS file he would like to use to render a class object. therefore i have a simple function : public function SetTheme(string $ThemeName) { $this->m_ThemeUsed = $ThemeName; } which set the theme (CSS file) to use to render my object. However, how can i tell to my class to render or update his render with new CSS file theme ? can it be possible to provoke something like a refresh ? Or it is only a CSS or JS topic ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] change Style Sheet by programming
Hi, I'm creating a Class which should allow user to setup the default theme CSS file he would like to use to render a class object. therefore i have a simple function : public function SetTheme(string $ThemeName) { $this->m_ThemeUsed = $ThemeName; } which set the theme (CSS file) to use to render my object. However, how can i tell to my class to render or update his render with new CSS file theme ? can it be possible to provoke something like a refresh ? Or it is only a CSS or JS topic ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5
Re: [PHP] advise on consulting fees
On Fri, March 2, 2007 12:33 pm, John wrote: > This may be deviating a bit from the intent of the list, and someone > feel > free to say so if the list shouldn't be used for this. My apologies in > advance if that is the case. This is NOT a self-advertisement! > > My question is regarding the "going rate" for software development > consulting - Way too open-ended a question... In what region? For what specialties? How experienced is the developer? You can hear numbers from $15/hour in off-shored out-sourced quotes to $X00/hour for experts in a particular areas. X could even be a 2-digit number, for that matter. Somebody somewhere probably even uses a 3-digit number for X. Might as well ask us how much you should pay for a house without saying where, how big, and in what condition... That said: If somebody is giving you solid steady ongoing work, you'd maybe want to give them a "discount" from your usual rate, possibly in the 10% neighborhood, since you'll be getting enough hours from them to make it worth it. Perhaps even invoice them at full price, but with the discount as a line-item at the end, so they know what they are saving. It can also be difficult to track time on such an open-ended deal at first. I *highly* recommend you have a process in-place for that client to open up new "tickets" with you, and to track the progress of whatever needs doing and what got done. This is also crucial to prioritize the zillion things that will get thrown at you with (probably) little organization on their side of things -- Or, at least, it will be organized to their convenience and not necessarily in the best order to get your work done efficiently and with their true best interests. If you have a dozen 5-minute tickets, you can lump them together and charge for an hour. If you have no tickets and just do a dozen 5-minute tasks spread out and don't account for them, it's like being nibbled to death by ducks. NOTE: One reason I got back into a full-time position is that I sucked at this kind of administrivia, and it just plain wasn't any fun (to me) to change myself to be better at it. YMMV -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Combining sound files
I may be replying to an outdated URL or even all out of order as I play catchup on the list... Your JS "play" function checks for precisely two possible browser "appName" values: Microsoft Internet Explorer Netscape Maybe Mozilla Firefox has "Netscape" in its appName, but I wouldn't expect that... I'm told I need a plugin still, so I guess maybe that part IS working... On Fri, March 2, 2007 12:37 pm, tedd wrote: > At 5:28 PM -0600 2/27/07, Richard Lynch wrote: >>You may find it easier/faster to just locate a .wav splicer command >>line tool and run exec with it. Though perhaps not nearly as fun, >>depending on your definition of fun. > > Richard: > > Nah, it's easier to bit twiddle the sound files and I found an easy > way to combine them. It's funny what a few bytes of data can do. :-) > > What's ya think of this -- does it work for you? > > http://sperling.com/examples/captcha/ > > Cheers, > > tedd > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Launch a seperate process
On Tue, March 6, 2007 4:06 pm, Brad Fuller wrote: > Is there a way in a php script to launch another script but output > something > and exit (terminating the original request) before that script > finishes? > > I have a script that accepts data, does some stuff, returns a response > and > exits. > > I want that page to accept data, return a response and exit. Then the > stuff > happens. > > Make sense? > > I am STFW right now, but nothing yet. > > Any advice is much appreciated. http://php.net/pcntl What you describe is called "fork" for a more general Google experience about it. To take a previous post a bit further: Unless you are 100% sure that all your OTHER extensions are thread-safe, you should not add pcntl to your web-server installation, unless you actually LIKE random server crashes as your forked threads stomp all over each other... And, from hard-won recent personal experience, in Gentoo, you have to edit /etc/make.conf or whatever it is and NOT the /etc/packages thingie, and definitely not just USE in the ports system, because otherwise you will find yourself a victim of Gentoo assuming one of the following: Oh, you said you wanted pcntl, but this is an Apache build, and that's bad, so I'll take it out. Oh, you said you wanted PHP CLI with pctnl, but you had Apache module before, so I'll uninstall Apache module to give you PHP CLI. Oh, you said you wanted Apache Module without pcntl, but you had PHP CLI before, so I'll uninstall PHP CLI to give you Apache module. I'm not quite sure why Gentoo package making people thought all that was a "good idea", but it did at least give me LOTS of practice in installing PHP under Gentoo... Tossing pcntl and Apache into the /etc/make.conf, for some reason beyond my ken, convinced Gentoo that I actually wanted pcntl in CLI where it makes sense, and not in Apache module where it doesn't. This was PHP 4 and Apache 1.3, in case that matters. YMMV NAIAA PS I do not claim to actually understand the Gentoo adminstration of software installation system. In fact, I can categorically state that I just do NOT "get" this system... Oh well. It's just my laptop, and the REAL systems are managed by the expert. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Live Sound experience?
If you are (or even might be) attending the php|tek conference in Chicago in May, and if you have experience running a live sound board (e.g., Mackie 1604 VLZ Pro or similar) please contact me OFF-LIST. Experience in rudimentary command line skills (like using * as a wildcard) is a big plus. While technically "on" topic, I'm pretty sure the minutae of this would not be of interest to the general population here, and will not post anything more about this here. THANKS! -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] zipArchive - corrupting files?
Been playing with this for a few hours and it seems that anything but a plain text file (doc,xls,pdf,etc.) is being trashed by ZipArchive. Has anyone had similar experiences or am I just doing something stupid and can't see it? Whatever the problem is, it certainly is silent about it. I thought it may be a permissions thing but that doesn't seem to be it. The one file it doesn't mess up is a plain text file. Anything else gets trashed. -km public function zipAction() { $params = SiteControllers::getParams(); if(!isset($params['file'])) { echo "zip: file param expected - not found"; return false; } $file = $params['file']; if(!file_exists("uploads/{$file}")) { echo "file to zip: {$file} not found"; return false; } $zip = new ZipArchive; $res = $zip->open("uploads/{$file}.zip", ZipArchive::OVERWRITE); if ($res === TRUE) { $zip->addFile("uploads/{$file}","{$file}"); $zip->close(); unlink("uploads/{$file}"); echo "{$file} - was zipped"; return true; } else { echo "{$file} - zip failed"; return false; } } public function unzipAction() { $params = SiteControllers::getParams(); $file = $params['file']; if(!isset($params['file'])) { echo "unzip: file param expected - not found"; return false; } $zfn = "uploads/{$file}.zip"; if(!file_exists($zfn)) { echo "zip file: {$zfn} not found"; return false; } if(file_exists("uploads/{$file}")) { echo "file to unzip: {$file} exists"; return false; } $zip = new ZipArchive; $res = $zip->open($zfn); if ($res === TRUE) { $zip->extractTo("uploads/"); $zip->close(); echo "{$file}: unzipped"; unlink($zfn); return true; } else { echo "unzip for: {$file} failed"; return false; } } -- View this message in context: http://www.nabble.com/zipArchive---corrupting-files--tf3359654.html#a9345356 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Launch a seperate process
pcntl_ fork() and pcntl_ wait(), yo On 3/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: Is there a way in a php script to launch another script but output something and exit (terminating the original request) before that script finishes? I have a script that accepts data, does some stuff, returns a response and exits. I want that page to accept data, return a response and exit. Then the stuff happens. Make sense? I am STFW right now, but nothing yet. Any advice is much appreciated. Thx, B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List all files in directory
On Tuesday 06 March 2007 22:34, Jim Moseby wrote: > > Helder Lopes wrote: > > > Hi people > > > > > > How to php give to me a list of all files in one directory > > > > to make an > > > > > editor??? > > > > if you can't figure out how to get a list of files from a directory > > using php then how do you expect to write a fully fledged 'editor'? > > > > RTFM ... there are examples that show you how to do exactly > > what your asking. > > Who wants to bet the next question is how to list all the files on the > client's machine? Oh, yes, about that, how do you _really_ use PHP to do some reading on the client machine... like say. listing files... ;D > > JM -- --- Børge Kennel Arivene http://www.arivene.net --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List all files in directory
On Tuesday 06 March 2007 23:36, Jay Blanchard wrote: > [snip] > Oh, yes, about that, how do you _really_ use PHP to do some reading on > the > client machine... like say. listing files... ;D > [/snip] > > You're kidding, right? Here's how, set up a PHP enabled.nah, never > mind. Just repeat to yourself Dorothy, "PHP is server-side, not > client-side.." you think... -- --- Børge Kennel Arivene http://www.arivene.net --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] List all files in directory
[snip] Oh, yes, about that, how do you _really_ use PHP to do some reading on the client machine... like say. listing files... ;D [/snip] You're kidding, right? Here's how, set up a PHP enabled.nah, never mind. Just repeat to yourself Dorothy, "PHP is server-side, not client-side.." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Launch a seperate process
fedt wrote: pcntl_ fork() and pcntl_ wait(), yo If you're using PHP as an apache DSO, you may find that those functions aren't available. If you don't have the pcntl_* functions available, there a less attractive options...I've done a request with curl with a short timeout to "spawn" the second request from PHP. You could likely also do it with JavaScript/AJAX. There are probably lots of other ways, in fact there may have been a discussion here some time ago about it though I don't remember the outcome. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Launch a seperate process
tyvm, I will check it out right away! B > -Original Message- > From: fedt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 06, 2007 5:17 PM > To: Brad Fuller > Cc: php-general@lists.php.net > Subject: Re: [PHP] Launch a seperate process > > pcntl_ fork() and pcntl_ wait(), yo > > On 3/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: > > > > > > Is there a way in a php script to launch another script but output > > something > > and exit (terminating the original request) before that script finishes? > > > > I have a script that accepts data, does some stuff, returns a response > and > > exits. > > > > I want that page to accept data, return a response and exit. Then the > > stuff > > happens. > > > > Make sense? > > > > I am STFW right now, but nothing yet. > > > > Any advice is much appreciated. > > > > Thx, > > > > B > > > > -- > > 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] List all files in directory
> > Helder Lopes wrote: > > Hi people > > > > How to php give to me a list of all files in one directory > to make an > > editor??? > > if you can't figure out how to get a list of files from a directory > using php then how do you expect to write a fully fledged 'editor'? > > RTFM ... there are examples that show you how to do exactly > what your asking. > Who wants to bet the next question is how to list all the files on the client's machine? JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List all files in directory
On 06/03/07, Helder Lopes <[EMAIL PROTECTED]> wrote: Hi people How to php give to me a list of all files in one directory to make an editor??? http://php.net/readdir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Opinion on on-line payment and banking gateway
> > > He's not selling any physical product. He's selling services and > on-line videos. So I don't know if PayPal suits his needs. > > google/yahoo knows more than me :-) > > Paypal is perfect for his needs. They provide an API for use with PHP and are easy to set up and use. JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with spam
On Monday 05 March 2007 12:15, Bc. Radek Krejca wrote: > Hi, > > I have problem with spam over function mail. My clients have badly > written functions and I cannot find where. Is there in php simple > way to detect which script generate mail? I mean like header (in > case of returning mail) or log every using mail function etc. Probably is, but what about using someting real easy like grep or rgrep. Those two helps me find witch files generates quirks whenever someones in need of some cleanup. > > Thank you > > -- > Regards > Bc. Radek Krejca > ICQ: 65895541 -- --- Børge Kennel Arivene http://www.arivene.net --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] array field type
Sancar Saran wrote: > Thanks for all those replies. It seems there was no easy solution (and or > serializing was better solution) for us. > > Our arrays contains lots of things.. XML may not fit because content of > array may broke xml structure. > Before you give up, take a look at the XMLDBX PHP extension at http://www.mohawksoft.org It uses XML and works really well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Opinion on on-line payment and banking gateway
On 3/6/07, Seak, Teng-Fong <[EMAIL PROTECTED]> wrote: Jochem Maas wrote: > tell him this: "never ever ever ever so much as accept a creditcard number > as input to any of his scripts let alone store it somewhere - leave that to > the payment provider who has the expertise, secure (hopefully) system and massive > liability fund to be able to deal with such things professionally." > OK, jotted down. > payment provider is probably a more used term. but yes her needs one > of those. > one example is paypal - there are plenty of others. > He's not selling any physical product. He's selling services and on-line videos. So I don't know if PayPal suits his needs. > google/yahoo knows more than me :-) > Yes, there are quite a lot, but how do we know if such and such site is a real one? Or an honest one? Just like phishing sites are proliferating, I think we'd be careful with anything found in the Net. Don't you agree? -- * Zoner PhotoStudio 8 - Your Photos perfect, shared, organised! www.zoner.com/zps You can download your free version. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php When the company I work for sets up a payment gateway for a client we always have the client set up the account through their bank. Each bank has different payment gateway companies they are willing to work with. Usually we are able to get a few choices from the bank and keep it within the 3 or so gateways we support with our current e-commerce solution. Hope that helps! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Opinion on on-line payment and banking gateway
Jochem Maas wrote: > tell him this: "never ever ever ever so much as accept a creditcard number > as input to any of his scripts let alone store it somewhere - leave that to > the payment provider who has the expertise, secure (hopefully) system and > massive > liability fund to be able to deal with such things professionally." > OK, jotted down. > payment provider is probably a more used term. but yes her needs one > of those. > one example is paypal - there are plenty of others. > He's not selling any physical product. He's selling services and on-line videos. So I don't know if PayPal suits his needs. > google/yahoo knows more than me :-) > Yes, there are quite a lot, but how do we know if such and such site is a real one? Or an honest one? Just like phishing sites are proliferating, I think we'd be careful with anything found in the Net. Don't you agree? -- * Zoner PhotoStudio 8 - Your Photos perfect, shared, organised! www.zoner.com/zps You can download your free version. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE:[[PHP] Error in Script!!!
On 3/5/07, Helder Lopes <[EMAIL PROTECTED]> wrote: Helder Lopes wrote: Erro no banco de dados!");//line 23 Where is $con defined??? -B $total = mysql_num_rows($result_id); // Caso o usuário tenha digitado um login válido o número de linhas será 1.. if($total) { // Obtém os dados do usuário, para poder verificar a senha e passar os demais dados para a sessão $dados = mysql_fetch_array($result_id); // Agora verifica a senha if(!strcmp($senha, $dados["password"])) { // TUDO OK! Agora, passa os dados para a sessão e redireciona o usuário $_SESSION["username"] = $dados["username"]; $_SESSION["realname"] = $dados["realname"]; $_SESSION["gid"]= $dados["gid"]; require_once ('../utilizadores/listar.php'); exit; } // Senha inválida else { echo "Senha inválida!"; exit; } } // Login inválido else { echo "Error"; exit; } ?> Why this script give me a error: **Warning**: mysql_query(): supplied argument is not a valid MySQL-Link resource in **ver.php** on line *23* in a file with a name mysql.php the $con is correct with the other that results I don't know , but if you have only 1 mysql connection, there's no need to use a MySQL link, you can just leave that out, and it will use the last opened connection by mysql_connect. Tijnema
Re: [PHP] Re: Opinion on on-line payment and banking gateway
Mark wrote: > Seak, Teng-Fong wrote: > >> I'm not a PHP programmer. I ask this question for a friend of >> mine. So I'm not sure if I'm using the correct terms. He's making an >> e-commerce website and he doesn't know much about how to validate credit >> card, or how to make transactions. What he needs is called "banking >> gateway", right? >> > a couple years ago I did some research and while I'm not Sure who the > players are right now, I concluded it was not worth the effort. We > concluded it was better to subscribe to a credit card clearing service. > > They provide a basic API that allows you to pass a billing amount to the > clearing service who, for a fee or percentage, process the credit card. You > never Have to deal with it, they just credit your account and you ship > goods. > That sounds good. Could I know more about this clearing service? I mean, to whom should my friend contact? Some bank? His company is in Chicago. So, is there any central banking organization in United-States that he should contact? Or some bank in Chicago? Thanks in advance -- * Zoner PhotoStudio 8 - Your Photos perfect, shared, organised! www.zoner.com/zps You can download your free version. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List all files in directory
Helder Lopes wrote: > Hi people > > How to php give to me a list of all files in one directory to make an > editor??? if you can't figure out how to get a list of files from a directory using php then how do you expect to write a fully fledged 'editor'? RTFM ... there are examples that show you how to do exactly what your asking. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] List all files in directory
[snip] How to php give to me a list of all files in one directory to make an editor??? [/snip] RTFM, seriously. http://www.php.net/readdir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] List all files in directory
Hi people How to php give to me a list of all files in one directory to make an editor???
[PHP] Re: [PHP-DB] array field type
Wrong! Take a look at the SET datatype http://dev.mysql.com/doc/refman/4.1/en/set.html. This allows you to have an array of values in a single field, and the user can select any number of them. Sort of, but not really: This is a really specialized keyword, and depends on binary mapping of enum-ish sets. As a results you have a maximum of 64 possible values, and only 1 dimension. Large or multdimensional arrays wouldn't work with this. -Micah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] array field type
Myron Turner wrote: > Tony Marston wrote: >> "Sancar Saran" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> On Sunday 04 March 2007 23:04, Sancar Saran wrote: >>> Hi, I want to know is there any db server around there for store php arrays natively. Regards Sancar >>> Thanks for responses, it seems I have to give more info about situation. >>> >>> In my current project, we had tons of arrays. They are very deep and >>> unpredictable nested arrays. >>> >>> Currently we are using serialize/unserialize and it seems it comes >>> with own >>> cpu cost. Xdebug shows some serializing cost blips. Sure it was not >>> SO BIG >>> deal (for now of course). >>> >>> My db expertise covers a bit mysql and mysql does not have any array >>> type >>> field (enum just so simple). >>> >> >> Wrong! Take a look at the SET datatype >> http://dev.mysql.com/doc/refman/4.1/en/set.html. This allows you to >> have an array of values in a single field, and the user can select any >> number of them. >> >> > It might be worth looking at wddx. I can't speak about the cpu cost for > large numbers of arrays, but it's mechanism is simple. It saves data > types as XML strings, which can be written using > **wddx_serialize_vars()* *and read > using **wddx_deserialize()* . WDDX is kind of dicey, it doesn't handle a lot of the data types correctly. About a year an a half ago, I tried to use it as a serializer and it really confused the datatypes in PHP. If you are doing something simple, it will probably work, but I wouldn't count on it. I have an extension to PHP that could work for you. Take a look at XMLDBX at http://www.mohawksoft.org. You'll need to get it from CVS. Put it in the "ext" directory and run ./buildconf.sh --force, then configure with --with-xmldbx It started out as a fix to wddx, but essentially became a rewrite. I've been using it on a few sites for over a year now. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] array field type
Tony Marston wrote: "Sancar Saran" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Sunday 04 March 2007 23:04, Sancar Saran wrote: Hi, I want to know is there any db server around there for store php arrays natively. Regards Sancar Thanks for responses, it seems I have to give more info about situation. In my current project, we had tons of arrays. They are very deep and unpredictable nested arrays. Currently we are using serialize/unserialize and it seems it comes with own cpu cost. Xdebug shows some serializing cost blips. Sure it was not SO BIG deal (for now of course). My db expertise covers a bit mysql and mysql does not have any array type field (enum just so simple). Wrong! Take a look at the SET datatype http://dev.mysql.com/doc/refman/4.1/en/set.html. This allows you to have an array of values in a single field, and the user can select any number of them. It might be worth looking at wddx. I can't speak about the cpu cost for large numbers of arrays, but it's mechanism is simple. It saves data types as XML strings, which can be written using **wddx_serialize_vars()* *and read using **wddx_deserialize()* . -- _ Myron Turner http://www.room535.org http://www.bstatzero.org http://www.mturner.org/XML_PullParser/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Opinion on on-line payment and banking gateway
Seak, Teng-Fong wrote: > I'm not a PHP programmer. I ask this question for a friend of > mine. So I'm not sure if I'm using the correct terms. He's making an > e-commerce website and he doesn't know much about how to validate credit > card, or how to make transactions. What he needs is called "banking > gateway", right? a couple years ago I did some research and while I'm not Sure who the players are right now, I concluded it was not worth the effort. We concluded it was better to subscribe to a credit card clearing service. They provide a basic API that allows you to pass a billing amount to the clearing service who, for a fee or percentage, process the credit card. You never Have to deal with it, they just credit your account and you ship goods. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Turning serialize data into an array
btw, the code: $testdata='a:17:{s:11:"event_start";s:4:"2230";s:9:"event_end";s:4:"2300";s:14:"start_unixtime";i:1173076200;s:12:"end_unixtime";i:1173078000;s:10:"event_text";s:37:"Call+NANCYADKINS+-+%28276%29+681-6548";s:12:"event_length";i:1800;s:13:"event_overlap";i:0;s:11:"description";s:17:"This+is+test+Data";s:6:"status";s:0:"";s:5:"class";s:7:"CONTACT";s:9:"spans_day";b:0;s:8:"location";s:0:"";s:9:"organizer";s:6:"a:0:{}";s:8:"attendee";s:6:"a:0:{}";s:9:"calnumber";i:1;s:7:"calname";s:5:"admin";s:3:"url";s:0:""}}'; $testdata = unserialize($testdata); print_r($testdata); ""Richard Kurth"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How can I get the data out of this string that has been serialize I need > to > get it into an array so I can access the data with something like > $testdata[1] > I have tried > $testdata= unserialize($testdata); > also > $sst= base64_encode(serialize($testdata)); > $testdata1= unserialize(base64_decode($sst)); > > I ether get an error bool(false) or the same data back. > I do not have control of the script that serializes it > > $testdata='a:17:{s:11:"event_start";s:4:"2230";s:9:"event_end";s:4:"2300";s: > 14:"start_unixtime";i:1173076200;s:12:"end_unixtime";i:1173078000;s:10:"even > t_text";s:37:"Call+NANCYADKINS+-+%28276%29+681-6548";s:12:"event_length";i:1 > 800;s:13:"event_overlap";i:0;s:11:"description";s:17:"This+is+test+Data";s:6 > :"status";s:0:"";s:5:"class";s:7:"CONTACT";s:9:"spans_day";b:0;s:8:"location > ";s:0:"";s:9:"organizer";s:6:"a:0:{}";s:8:"attendee";s:6:"a:0:{}";s:9:"calnu > mber";i:1;s:7:"calname";s:5:"admin";s:3:"url";s:0:""'; > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Turning serialize data into an array
Looks like your serialized data isn't right. I added two curly brackets }} to the end, and unserialized the string with no problems. ""Richard Kurth"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How can I get the data out of this string that has been serialize I need > to > get it into an array so I can access the data with something like > $testdata[1] > I have tried > $testdata= unserialize($testdata); > also > $sst= base64_encode(serialize($testdata)); > $testdata1= unserialize(base64_decode($sst)); > > I ether get an error bool(false) or the same data back. > I do not have control of the script that serializes it > > $testdata='a:17:{s:11:"event_start";s:4:"2230";s:9:"event_end";s:4:"2300";s: > 14:"start_unixtime";i:1173076200;s:12:"end_unixtime";i:1173078000;s:10:"even > t_text";s:37:"Call+NANCYADKINS+-+%28276%29+681-6548";s:12:"event_length";i:1 > 800;s:13:"event_overlap";i:0;s:11:"description";s:17:"This+is+test+Data";s:6 > :"status";s:0:"";s:5:"class";s:7:"CONTACT";s:9:"spans_day";b:0;s:8:"location > ";s:0:"";s:9:"organizer";s:6:"a:0:{}";s:8:"attendee";s:6:"a:0:{}";s:9:"calnu > mber";i:1;s:7:"calname";s:5:"admin";s:3:"url";s:0:""'; > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: pictures stored in PostgreSQL DB
At 5:14 PM -0500 3/5/07, markw@mohawksoft.com wrote: The "science" is computer science and that is mostly mathematics based. The "art" is the creativity of coming up with novel solutions. The thing that separates "engineering" from "art" is the fact that after the abstract creativity takes place, it is verified against the science. All hogwash -- and not even well said. 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] Opinion on on-line payment and banking gateway
Seak, Teng-Fong wrote: > I'm not a PHP programmer. you eloi, you. :-) > I ask this question for a friend of > mine. So I'm not sure if I'm using the correct terms. He's making an > e-commerce website and he doesn't know much about how to validate credit > card, or how to make transactions. tell him this: "never ever ever ever so much as accept a creditcard number as input to any of his scripts let alone store it somewhere - leave that to the payment provider who has the expertise, secure (hopefully) system and massive liability fund to be able to deal with such things professionally." > What he needs is called "banking > gateway", right? payment provider is probably a more used term. but yes her needs one of those. one example is paypal - there are plenty of others. > > After some search in php.net, I've found a link to > http://www.trustcommerce.com/. Is this what he's looking for? no idea if trustcommerce.com is recommended but it's the kind of thing he's looking for yes. Has > anyone here used this? Actually, it doesn't matter to him if such thing > isn't open-source or isn't free. What he needs is something that > works. Anyone has any opinions or suggestions? Any tutorial to banking > gateway? google/yahoo knows more than me :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to access private property?
Németh Zoltán wrote: 2007. 03. 6, kedd keltezéssel 20.08-kor Nicholas Yim ezt írta: Hello Everyone, [code] class MyClass { private $prop; } $obj=new MyClass; [/code] is there anyway to read and write MyClass->prop, except serialize write methods to do this class MyClass { private $prop; function getProp() { return $this->prop; } function setProp($val) { $this->prop = $val; } } You could also use the __get() and __set() methods to write a generic handler for all of your private vars. http://uk.php.net/manual/en/language.oop5.overloading.php Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to access private property?
> > Hello Everyone, > > [code] > class MyClass { > private $prop; > } > $obj=new MyClass; > [/code] > > is there anyway to read and write MyClass->prop, except serialize > Not directly, that's the whole point of declaring something private. You could use __set and __get methods in the class if you need to but I think you need to consider your design further first. Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to access private property?
Nicholas Yim wrote: > Hello Everyone, > > [code] > class MyClass { > private $prop; > } > $obj=new MyClass; > [/code] > > is there anyway to read and write MyClass->prop, except serialize > > Best regards, > > Nicholas Yim > [EMAIL PROTECTED] > 2007-03-06 > > why not have a public function that returns the value of the private variable $prop... -- Arno Coetzee Flash Media Group Developer Mobile : 27 82 693 6180 Office : 27 12 430 7597 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to access private property?
2007. 03. 6, kedd keltezéssel 20.08-kor Nicholas Yim ezt írta: > Hello Everyone, > > [code] > class MyClass { > private $prop; > } > $obj=new MyClass; > [/code] > > is there anyway to read and write MyClass->prop, except serialize write methods to do this class MyClass { private $prop; function getProp() { return $this->prop; } function setProp($val) { $this->prop = $val; } } greets Zoltán Németh > > Best regards, > > Nicholas Yim > [EMAIL PROTECTED] > 2007-03-06 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] array field type
"Sancar Saran" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sunday 04 March 2007 23:04, Sancar Saran wrote: >> Hi, >> >> I want to know is there any db server around there for store php arrays >> natively. >> >> Regards >> >> Sancar > Thanks for responses, it seems I have to give more info about situation. > > In my current project, we had tons of arrays. They are very deep and > unpredictable nested arrays. > > Currently we are using serialize/unserialize and it seems it comes with > own > cpu cost. Xdebug shows some serializing cost blips. Sure it was not SO BIG > deal (for now of course). > > My db expertise covers a bit mysql and mysql does not have any array type > field (enum just so simple). Wrong! Take a look at the SET datatype http://dev.mysql.com/doc/refman/4.1/en/set.html. This allows you to have an array of values in a single field, and the user can select any number of them. -- Tony Marston http://www.tonymarston.net http://www.radicore.org > I just want to know is there any way to keep array data type natively in a > sql > field. > > Regards. > > Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Opinion on on-line payment and banking gateway
I'm not a PHP programmer. I ask this question for a friend of mine. So I'm not sure if I'm using the correct terms. He's making an e-commerce website and he doesn't know much about how to validate credit card, or how to make transactions. What he needs is called "banking gateway", right? After some search in php.net, I've found a link to http://www.trustcommerce.com/. Is this what he's looking for? Has anyone here used this? Actually, it doesn't matter to him if such thing isn't open-source or isn't free. What he needs is something that works. Anyone has any opinions or suggestions? Any tutorial to banking gateway? Thanks in advance (in his behalf) :) -- * Zoner PhotoStudio 8 - Your Photos perfect, shared, organised! www.zoner.com/zps You can download your free version. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with spam
Bc. Radek Krejca wrote: > Hello, > > JM> grep -l "mail(" *.php > > I of course tried this before but I have hundereds domains and a lot > of files where clients using function mail. that sucks then doesn't it ... there is no better way, unless you search out the patch someone wrote (which may be part of a future release) which automatically adds some 'X' headers to each outgoing mail php sends (via mail()) - can't remember the details but I'm pretty sure it was posted to [EMAIL PROTECTED] not too long ago. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] module and access rights
Hi, On every request you have to check access rights. So you need access rights. someting like this rights table page_id user_login right_type select right_type from rights_table where page_id = '".$PHP_SELF."' and user_login ='".$_SESSION['user_login']."' if this query returns someting, your code give the permission if not you show "access denied message" Regards Sancar On Monday 05 March 2007 16:05, Alain Roger wrote: > I already started to use SSL, but i do not understand how to keep it > running. > > I mean after user has been authenticated and authorized to go further, all > next web pages are opened using PHP location(https://...); command. > however, it does not certify that it can not be faked by just typing into > browser address bar https://another_webpage.php > > for example : > 1.my login page is called "index.php" and it is accessible only by https. > if user type http://../index.php, the index.php redirect itself to > https://.../index.php. > 2. user type logon and password. > 3. application control it with information stored into DB and authorize > user to go further, so a session is created and user is redirected to > https://.../welcome.php > > what avoid hacker to directly type https://.../welcome.php ? > how to be sure that it works correctly as in my example ? > > thanks a lot, > > Al. > > On 3/4/07, Stut <[EMAIL PROTECTED]> wrote: > > Tijnema ! wrote: > > > On 3/4/07, Stut <[EMAIL PROTECTED]> wrote: > > >> Tijnema ! wrote: > > >> > Give your server a unique ID, and add that to your check string lets > > >> > > >> say > > >> > > >> > so you store in your cookie the username and the check string. > > >> > > > >> > example > > >> > $user = "tijnema"; > > >> > $server_unique_key = > > >> > "w#$#%#54dfa4vf4w5$2!@@$ > > >> > "; > > >> > $check_string = md5($server_unique_key.$user.$server_unqie_key); > > >> > > > >> > and check that each time the user does an action. > > >> > > >> How, exactly, is that any more secure than a standard session > > > > identifier? > > > > >> While it's good to worry about security, adding pointless activity > > >> such as this to every request is not going to help. Anything you do is > > >> going to involve some piece of data being transferred from client to > > >> server, and can therefore be faked/shared by the client. Get over it. > > >> > > >> -Stut > > > > > > It is ofcourse possible to share it to another client, but when > > > > combining > > > > > this with the IP address. This means it can only be used in the same > > > > LAN. > > > > > To get to the point, using this means you cannot simply fake the > > > username in > > > the cookie, which is possible else. session identifiers can be faked > > > > too. > > > > As I said in another email, you *cannot* use the IP address for any > > verification without causing usability issues. It is perfectly > > legitimate for sequential requests from any given user to come from > > different IP addresses. The biggest user of systems like this is AOL, > > and that's a fairly large user base you may want to avoid annoying by > > insisting that they login for every other request. > > > > In short, this issue has been discussed to death, not only by the PHP > > community but also by the web community at large. If you're really > > paranoid, use SSL to secure all data transferred, but just accept that > > it's possible that a session may be hijacked. However, unless you're a > > bank, is anyone really going to bother? > > > > -Stut > > > > >> On 3/4/07, Alain Roger <[EMAIL PROTECTED]> wrote: > > >> >> Ok, but i would be very glad to know how can i REALLY authenticate > > > > the > > > > >> >> user. > > >> >> for example, user is logged, so i have in the cookie his login > > >> >> name. > > >> >> > > >> >> how can i be sure that it's the same user and not some hacker who > > >> > > >> hacked > > >> > > >> >> the cookie and the session ? > > >> >> what should be checked and where those data should be stored ? > > >> >> > > >> >> because i can store in DB the sessionID, and check it to every DB > > >> > > >> request > > >> > > >> >> user does...but a sessionID can be easily fake. > > >> >> > > >> >> So what should I do ? > > >> >> > > >> >> Al. > > >> >> > > >> >> On 3/4/07, Tijnema ! <[EMAIL PROTECTED]> wrote: > > >> >> > On 3/4/07, Stut <[EMAIL PROTECTED]> wrote: > > >> >> > > Alain Roger wrote: > > >> >> > > > I would like to implement a module access rights in my web > > >> >> > > > >> >> > application. > > >> >> > > > >> >> > > > Basically after authentication and authorization. Logged user > > >> > > >> has > > >> a > > >> > > >> >> > > > particular profile which allow him to have access to some > > >> > > >> part of > > >> > > >> >> > the > > >> >> > > > >> >> > > web > > >> >> > > > > >> >> > > > application. > > >> >> > > > > > >> >> > > > after reading the security guide from *php*sec.org webpage, > > > > i'm > > > > >> >> > confused > > >> >> > > > >> >> > > > regarding how to store user login and passwor
Re: [PHP] Re: remote fopen not working, despite allow_url_fopen = on SOLVED
On 2/21/07, alex handle <[EMAIL PROTECTED]> wrote: On 2/21/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > > On Mon, February 19, 2007 9:43 am, alex handle wrote: > > A minute ago i tried to run my test script (remote.php) on the shell > > and the > > remote fopen works!! > > The problem must be within the php apache module or apache self. > > Is there a way to debug the php apache module? > > Step #1. > Create a page with in it, surf to it, and find the > allow_url_fopen setting within that output. > > I'm betting dollars to donuts that the php.ini you changed has not yet > been read by your webserver, because it isn't the right php.ini, or > because you forgot to re-start Apache. > > Step #2. > It's possible that your httpd.conf is messed up so that Apache (and > thus PHP module) cannot manage to do a hostname lookup. If that's the > case, you probably need to be checking in httpd.conf and asking on the > Apache list... > > -- > Some people have a "gift" link here. > Know what I want? > I want you to buy a CD from some starving artist. > http://cdbaby.com/browse/from/lynch > Yeah, I get a buck. So? > > When i disable allow_url_fopen, i get this error mesage: [Wed Feb 21 13:12:20 2007] [error] [client xxx] PHP Warning: file() [function.file]: URL file-access is disabled in the server configuration in /home/domains/x//tmp/remote.php on line 2. With "allow_url_fopen = on" i get a different error message (see my previous posts). Thank you for the tip i will check my httpd.conf. Alex Hi, i found a solution on this site: http://danger.rulez.sk/articles/php-http-request-fails.php PHP4 does not work reliable with more than 1024 filedescriptors (incl. apache logfiles). Alex