Re: RE: [PHP] PHP Editor - which to use?
AEdiX - Original Message - From: jeffrey pearson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 11:59 PM Subject: Re: RE: [PHP] PHP Editor - which to use? I like to use Edit Plus. www.editplus.com It has the syntax highlighting for php, perl, java, and many others through modules that are downloadable from their web site, DOESNT change code like dreamweaver does and its cheap ($25). Jeff Pearson - Original Message - From: Ruessel, Jan [EMAIL PROTECTED] Date: Monday, September 22, 2003 2:00 am Subject: RE: [PHP] PHP Editor - which to use? well, i like to use dreamweaver mx or textpad with the syntax highlighting file you additionally have to download. i dunno if there are special php- must-have-editors. grtz jan -Original Message- From: Binay [EMAIL PROTECTED] Sent: Montag, 22. September 2003 10:58 To: [EMAIL PROTECTED] Subject: [PHP] PHP Editor - which to use? Hi everybody! Please suggest me a good PHP editor like ( Microsoft's Interdev for ASP) to write my php programs/scripts and get a visual feel. Thanks Binay -- 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] Validation: Problems with header(Location) in PHP
On Thursday 25 September 2003 08:46, Martin Raychev wrote: This is exasperating as well as a waste of time! it's not the code snip that is important Of course it is important. It is *your* code which is causing something which *ought to work* to not work. but the fact that I DO have to have header(Location...) statement BEFORE anything else on the second php page. How can I do this since in order to validate form data with PHP I have to have validating code and the header statement to appear later, i.e. not first? The manual explains quite clearly how and where you should put the header() statement. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* No matter which way you have to march, its always uphill -- Murphy's Military Laws n1¤766 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP code in form field - var_export() (slashes)?
On Wednesday 24 September 2003 12:00, Shawn McKenzie wrote: O.K. I am collecting PHP code in a textarea and then using var_export() to a file for later use. In the file, the PHP is in single-quotes. I'm curious, why are you using var_export() if it's causing so many problems? Acutally why are you using var_export() at all, am I missing something? Couldn't you just write the string containing the contents of the textarea straight out to a file? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The only function of economic forecasting is to make astrology look respectable. -- John Kenneth Galbraith */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IP to Postal Code CSV? anyone messed around with this and PHP
On Tuesday 23 Sep 2003 19:59, Joe Harman wrote: Is there a CSV file out there for this Does anyone know where I can aquire a file that has IP address with the corresponding Postal Code? How do you handle dynamic IP pools that cover entire states (or countries) ? : (Some of AOL's IPs come to mind.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Function in php
You could also get lazy and just use @strpos(). Tom's way is (obviously) better, Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Tom Rogers [EMAIL PROTECTED] To: Uma Shankari T. [EMAIL PROTECTED] Cc: PHP [EMAIL PROTECTED] Sent: Wednesday, 24 September, 2003 01:48 Subject: Re: [PHP] Function in php Hi, Wednesday, September 24, 2003, 3:27:48 PM, you wrote: UST Hello, UST I am using strpos function for finding the string position in a UST particular string . if the searching string is empty it is showing this UST warning error UST Warning: Empty delimiter in filename text.php on line 33 UST is there any other way to avoid displaying this warning error..?? UST Regards, UST Uma Don't do a search with an empty token :) $pos = false; if(!empty($token)){ $pos = strpos($string,$token); } if($pos){ do whatever; } -- regards, Tom -- 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] Re: SQL statement
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hello, Im having a bit of trouble with the DATE_FORMAT function in mysql. $query = ('SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') FROM custlogon'); I know its failing because php doesnt like the quotation before the format parameters. Ive tried to fix this without any luck. Any Ideas ? DATE_FORMAT ( timestamp, ' %d%m%y ') Thanks in advance, -Dan Try $query = SELECT username, password, DATE_FORMAT(timestamp, '%d%m%y') FROM custlogon; -- Quod subigo farinam A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] present php code with css
For people interested in presenting php code on their web site and integrate it with their css, here is a small sed script I have made. Just change the colors in it, or move it to your css. === # Put php sources in SRC dir, or change FROM definition. FROM=SRC DEST=listing if [ ! -d $DEST ]; then mkdir $DEST fi for p in `ls $FROM/*.php` ; do php -s $p | sed \ -e s|br /|\n|g \ -e s|font color=\|span class=\|g \ -e s|/font|/span|g\ -e s|nbsp;| |g \ -e s|lt;?br /|\lt;?phpbr /|g\ -e s|code|html\nhead\ntitle`basename $p .php`/title\n\ style type='text/css'\n\ @import \./styles/01.css\;\n\ pre { background: #EEE; }\n\ .string { color: #D00; }\n\ .comment { color: #F90; }\n\ .keyword { color: #070; }\n\ .default { color: #00B; }\n\ .html { color: #000; }\n/style\ \n/head\nbody\n\npre|g \ -e s|/code|/pre\n\n/body\n/html|g \ $DEST/`basename $p .php`.html ; done === And change this at Colors for Syntax Highlighting section in the php.ini : highlight.string = string highlight.comment = comment highlight.keyword = keyword highlight.bg = bg highlight.default = default highlight.html= html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: RE: [PHP] PHP Editor - which to use?
It doesn't do syntax highlighting, but if you need that, then you need to learn to code better. Ha,ha. too funny. -Original Message- From: Jim Lucas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 9:56 AM To: jeffrey pearson; [EMAIL PROTECTED] Subject: Re: RE: [PHP] PHP Editor - which to use? I like NoteTab from www.notetab.com It doesn't do syntax highlighting, but if you need that, then you need to learn to code better. And best of all, there is a free version that does most everything the full priced copy does. Plus, one added feature is, is that it will allow you to do internal scripting. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Subcategories in php
This article explains four methods for doing this: http://www.evolt.org/article/Four_ways_to_work_with_hierarchical_data/17 /4047/index.html -Original Message- From: phpu [mailto:[EMAIL PROTECTED] Sent: Saturday, September 20, 2003 7:41 AM To: [EMAIL PROTECTED] Subject: [PHP] Subcategories in php Hi, I have been trying to do this for weeks but i just cant figure this out. I have categories that have subcategories and i want to insert them into database. My table looks like this: cat_id, parent_id and cat_name. Let's say i wanna insert a subcategory that is associated with its parent category. For example ParentCat 1 ParentCat 1 ItsSubCat 1 ParentCat 1 ItsSubCat 2 ParentCat 1 ItsSubCat 3 ParentCat 1 ItsSubCat 4 ParentCat 2 ParentCat 2 ItsSubCat 1 and so on ... I don't know how to create the script that inserts any subcategory(in this case let's say ItsSubCat 3) in its parent category. Please, can someone help me thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php with MsSql
You might also want to look at these libraries for mssql native support: http://www.freetds.org -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 9:21 AM To: [EMAIL PROTECTED] Subject: [PHP] php with MsSql I'm creating a site using php with Mssql and i have a problem. When i test im my in my conputer using Win XP with php 4.3.2RC4 it's all ok, but when i use in server running linux and php 4.3.3 i can't save accented words data in MsSql database. When i try, i receive this message: Warning: mssql_query(): message: Unclosed quotation mark before the character string 'B뿿㺤ä?~.+.êà ä¦,ä?~î¦ä?¢ìS?ä?¢î¸à¡^ì?à [EMAIL PROTECTED] (severity 15) in /home/iphosting/saladamix/www/admin/planos.php on line 161 Warning: mssql_query(): message: Line 1: Incorrect syntax near 'B뿿㺤ä?~.+.êà ä¦,ä?~î¦ä?¢ìS?ä?¢î¸à¡^ì?à [EMAIL PROTECTED] (severity 15) in /home/iphosting/saladamix/www/admin/planos.php on line 161 Warning: mssql_query(): Query failed in /home/iphosting/saladamix/www/admin/planos.php on line 161 Fatal error: Call to undefined function: mssql_error() in /home/iphosting/saladamix/www/admin/planos.php on line 161 Anybody know what's de problem ? Thanks for all... -- João Cândido de Souza Neto - [EMAIL PROTECTED] Mr. Mídia Propaganda e Marketing - www.mrmidia.com.br Farol Sul de Minas - www.farolsuldeminas.com.br Farol News - www.farolnews.com.br (35) 3212-4291 -- 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] Document Management App
If I understand you correctly, it seems like you're asking for Adobe's new Enterprise version of Acrobat. I've had the opportunity to play with it and I was quite impressed. http://www.adobe.com/enterprise/main.html Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, 23 September, 2003 14:58 Subject: [PHP] Document Management App Howdy Good Afternoon! I am about to run off to a project's development group meeting (the general audience kind, requestors and developers) and this question came up this morning for a potential answer in this afternoon's meeting. I have googled, searched, poked and prodded...but I need to see if I can find something more specific than I have overturned. I was asked about a doc mgmt system that would allow users spread over disparate systems to upload docs of all types, have them scanned for content, cataloged, and finally searchable. All sorts of doc types, spreadheets, pdf's, word docs, word perfect docs, xml, html, etc. etc. etc. The system would need to be installed, configured, and then sent on a search of existing docs to scan and catalog. Does anyone have a favorite application like this or near this? Is anyone familiar with an app that would not require too much front end noodling to accomplish this? Or should I clean the white board and get started? TVMIA! -- 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] POST Parameters
As for redirecting, you cannot force a client to send a POST request to another URL (thankfully). So, you either need to send the POST request yourself (and send the output to the client), or you need to think of another solution (such as using URL variables for everything). OK, that sounds good. So I have to change my approach a bit. Now I tried #!/usr/local/bin/php ?php $uri = $_ENV[REQUEST_URI] ; $script= $_ENV[SCRIPT_NAME] ; $para = substr(stristr($uri, .cgi),4) ; $rhost = http://.$_SERVER['HTTP_HOST']./cgi-bin/interchange_foundation.cgi.$para ; $xoops_interchange = http://.$_SERVER['HTTP_HOST']./xoops/modules/interchange ; $fp1 = fopen($rhost,r); // !!! here I have to pass all the parameters !! $fp2 = fopen(/home/myuser/public_html/xoops_foundation_template.html,w); while(!feof($fp1)) { $line = fgets($fp1, 4096); $line = str_replace(interchange_foundation.cgi, xoops_interchange_foundation.cgi, $line); fputs($fp2,$line,strlen($line)); } fclose($fp1); fclose($fp2); echo Location: .$xoops_interchange.\n\n ; ? The whole thing is (should be) a wrapper for the interchage shop system. I would like to have that thing covered by a XOOPS modul. For that I wrote the script shown above. 1.) It should take all parameters passed to it like the original interchange cgi link does. 2.) Open the original interchange URL with all of them. 3.) Get the result page. 4.) Replace all interchange links to point back to this wrapper. 5.) Store the result page to be interpreted further by my XOOPS interchange modul (actually it simply adds some XOOPS tags and shows it) . 6.) And after all that just redircet to my XOOPS interchange modul main page. Actually that works really fine already for links and stuff. When it comes to a form, it fails - guess why ? ´caus of the missing POST parameters (obviously). How could I 'query' a URL with POST and GET Parameters with a PHP Script ??? fopen does not have that option, right ? With perl there is a CPAN modul that could act as a HTTPclient to handle such HTTP issues properly. Well, I am no perl guy (at least not now) and would like to have solved that issue with php ;). If it could not be (what I realy doubt) I will have to dive into perl. Again, any guess will be deeply appreachiated ... Stephan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Lifetime with cookie-less sessions
Hello, Is it possible to determine a lifetime for the session in the case of a cookie-less sessions ? Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to connect ms sql server in linux apache+php?
First I can't find something like mssql.so in extensions folder. BTW, I also need gd2.so. How could I get them back? Any easy way to connect ms sql server? I need migrate my site into linux apache server from win 2k IIS. Thanks a lot, Larry
Re: [PHP] Lifetime with cookie-less sessions
I just took a thorough look at the Session Handling section in the manual. I couldn't even find any mention of non-cookie session lifetimes. I get the impression they either die on broswer close or have a fixed lifetime that cannot be changed. Hopefully someone can prove me wrong, if only for amusement value. ;) Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Cranky [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 24 September, 2003 05:42 Subject: [PHP] Lifetime with cookie-less sessions Hello, Is it possible to determine a lifetime for the session in the case of a cookie-less sessions ? Thanks for your help. -- 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] mySQL vs pgSQL | php vs others
Dear all; I have been using Mysql for a long time, but I have a benchmark Q. Is pgsql , better ? faster ? more reliable than mysql ? any comment ? Some people say that php is not for a very big enterprise, banking , application !! they said that java or even .NET is better ... I m against that but what do you all think ? nabil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to connect ms sql server in linux apache+php?
You need to use FreeTDS to connect from Linux to ms sql server. and you have to recompile php with gd and mssql (example --with-mssql=/usr/local/freetds ) I did this 2 month ago and it work with me like a charm I\on very heavy load server. for any more info , email me back Nabil Larry Li [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] . First I can't find something like mssql.so in extensions folder. BTW, I also need gd2.so. How could I get them back? Any easy way to connect ms sql server? I need migrate my site into linux apache server from win 2k IIS. Thanks a lot, Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD problem
It's generally a good idea to post your code so that we can see what's actually happening. Fortunately, Peter and Andrew were able to give some good tips this time, but you might not always be so lucky. I was going to include some of my code but I fear it may just lead to further confusion. If you'd still like to see it, email me off-list and I'll attach a few examples. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Ignacio Correa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, 23 September, 2003 12:43 Subject: [PHP] GD problem Hi, I´m new in PHP+GD. I have install all library (PHP4-gd2, libgd2, etc, etc, etc.) and when I use gd functions no errors or warning are displayed, but when I use imagepng() or imagejpeg() no images are displayed in my browser, and in this place extrage symbols are displayed. You can see my bad result here: http://www.drivingconsultancy.com/ide/testi.php If somebody can helpme, I´ll be very thanks (sorry, my eglish isn´t good, I´m from Argentine) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping Cart Solutions
As everyone has said osCommerce is a good cart program, but if you need a serious customized solution then you are going to need to either spend your time foucsing on that app and get into it, or your going to want to find something a little less polished and more just foundation, not saying osCommerce doesnt have a good foundation, its just that its more of a finished and therefore has a more defined set of rules to work with it. FreeTrade is a good app, they have moved several times you'll have to google it. PHPShop I never really liked, more of a personal decision. Anyone have suggestions for open source shopping cart apps in PHP? Thanks, Charles _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mySQL vs pgSQL | php vs others
On Wednesday 24 Sep 2003 11:24, nabil wrote: Dear all; I have been using Mysql for a long time, but I have a benchmark Q. Is pgsql , better ? faster ? more reliable than mysql ? How long is a piece of string? any comment ? Some people say that php is not for a very big enterprise, banking , How long is a longer piece of string? :) The questions, as they stand, are too vague. Better at what, faster at what? More reliable in what configuration? PHP alone, PHP + Zend, PHP + Zend + caching? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lifetime with cookie-less sessions
Becoming Digital wrote: I just took a thorough look at the Session Handling section in the manual. I couldn't even find any mention of non-cookie session lifetimes. I get the impression they either die on broswer close or have a fixed lifetime that cannot be changed. Hopefully someone can prove me wrong, if only for amusement value. ;) It works something like this: Used goes to www.foobar.com, session ID is 1 Used clicks on link to foo.php, which has been automagically changed to foo.php?PHPSESSID=1 PHP sees the PHPSESSID GET variable, and uses session ID 1. User goes to some other site, then comes back to foobar.com by typing it into their address bar PHP has no way to know the session ID since the user didn't add ?PHPSESSID=1 to the URL, so it uses session ID 2 with new session data -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mySQL vs pgSQL | php vs others
nabil wrote: Dear all; I have been using Mysql for a long time, but I have a benchmark Q. Is pgsql , better ? faster ? more reliable than mysql ? Maybe. any comment ? Some people say that php is not for a very big enterprise, banking , application !! they said that java or even .NET is better ... I m against that but what do you all think ? Maybe. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Running system commands
Thanks for your help, I'v configured ssh, though it's running fine, I'm not able to connect to my server, it says- connect: connection to host on port 22 refused. i think this is due to, some firewall. I'll check it out. in the mean time can you clearify what are verbatim commands!!! Thnaks for your help anyway Nitin - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Mike Migurski [EMAIL PROTECTED] Cc: Nitin [EMAIL PROTECTED]; PHP-General [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 2:16 AM Subject: Re: [PHP] Running system commands On Tue, 2003-09-23 at 16:34, Mike Migurski wrote: I was wondering, if anyone can help me with running system commands from within php. Actually I have a script which deletes users from my database (which is of course MySQL), now I want to delete those users from system level also, as they are authenticated users of my OS also. Now, the problem is, that I'm running my MySQL server and web server on different machines. I can do whatever on remote DB server but how to run a system command on another machine. I know, it's possible to run system commands on local server by system(), but what about remote server? This is partially dependent on the user your php scripts are running as. One approach might be to use SSH to talk to the remote machine, and set up a limited-privilege account there. You can run a copy of ssh-agent[1] as the apache user, which stores an open copy of a private SSH key in memory, add the public half of that key to the remote machine's authorized_keys file[2], and use SSH to access that machine. Alternatively you could have a simple little PHP daemon on the webserver and it could check a table in the remote DB every minute or so for verbatim commands to execute. Depends really on whether these commands need to occur real time or not. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
I bet you don't indent your code either. And all white characters are useless too, they only slow interpreter down. Good coder will understand this at a glimpse: if($pos_params!=false){$back_url=substr($HTTP_GET_VARS['origin'],0,$pos_params);$back_url_params=substr($HTTP_GET_VARS['origin'],$pos_params+1);}else{$back_url=$HTTP_GET_VARS['origin'];$back_url_params='';} Jim Lucas wrote: I like NoteTab from www.notetab.com It doesn't do syntax highlighting, but if you need that, then you need to learn to code better. And best of all, there is a free version that does most everything the full priced copy does. Plus, one added feature is, is that it will allow you to do internal scripting. Jim Lucas - Original Message - From: jeffrey pearson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 8:59 AM Subject: Re: RE: [PHP] PHP Editor - which to use? I like to use Edit Plus. www.editplus.com It has the syntax highlighting for php, perl, java, and many others through modules that are downloadable from their web site, DOESNT change code like dreamweaver does and its cheap ($25). Jeff Pearson - Original Message - From: Ruessel, Jan [EMAIL PROTECTED] Date: Monday, September 22, 2003 2:00 am Subject: RE: [PHP] PHP Editor - which to use? well, i like to use dreamweaver mx or textpad with the syntax highlighting file you additionally have to download. i dunno if there are special php- must-have-editors. grtz jan -Original Message- From: Binay [EMAIL PROTECTED] Sent: Montag, 22. September 2003 10:58 To: [EMAIL PROTECTED] Subject: [PHP] PHP Editor - which to use? Hi everybody! Please suggest me a good PHP editor like ( Microsoft's Interdev for ASP) to write my php programs/scripts and get a visual feel. Thanks Binay -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lifetime with cookie-less sessions
session.gc_maxlifetime integer session.gc_maxlifetime specifies the number of seconds after which data will be seen as 'garbage' and cleaned up. Note: If you are using the default file-based session handler, your filesystem must keep track of access times (atime). Windows FAT does not so you will have to come up with another way to handle garbage collecting your session if you are stuck with a FAT filesystem or any other fs where atime tracking is not available. Cranky wrote: Hello, Is it possible to determine a lifetime for the session in the case of a cookie-less sessions ? Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping Cart Solutions
I had been doign interchange back when it first changed names to Interchange, I havent used it since it was aquired by Redhat, no particular reason just personal preference. Here is the link to FreeTrade. I believe the Restoration Hardware site started with this code, they have since gone bigger and better, but its a great starting place. This is will get you a site up and running, but this is pretty much framework. http://share.whichever.com/index.php?SCREEN=freetrade From: Stephan Becker [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] Shopping Cart Solutions Date: Wed, 24 Sep 2003 14:07:33 +0200 Well take a look into interchange. http://www.icdevgroup.org This Shop Engine has a nice demo catalog called foundation. Take it, adopt it and your set for the most of all things you want to achieve. There is a lill tutorial which guides you through the basics of interchange and leaves you with a skeletton but functional catalog after 3-4 hours of reading and typing. Installation is a bit tricky but I managed it though within a couple of hours of try and error. If you eventually pass that phase of learning you could do it easyliy again within 10 minutes. One thing left to mention: It´s Perl not PHP. But I´am on the issue to wrap it into a modul .. ;) Stephan Didier McGillis [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]... As everyone has said osCommerce is a good cart program, but if you need a serious customized solution then you are going to need to either spend your time foucsing on that app and get into it, or your going to want to find something a little less polished and more just foundation, not saying osCommerce doesnt have a good foundation, its just that its more of a finished and therefore has a more defined set of rules to work with it. FreeTrade is a good app, they have moved several times you'll have to google it. PHPShop I never really liked, more of a personal decision. Anyone have suggestions for open source shopping cart apps in PHP? Thanks, Charles _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Print current and next three years
Hi, I am trying to print the current and next three years in a form. Using the following code I can only print 2000, 2001, 2002, 2003: select name=start_date_year ?php $i = 1; while ($i = 4){ if ($i + 1 == date(Y, strtotime($_GET[mysql_date]))){ echo 'option value='.date(Y, mktime(0, 0, 0, 0, 0, $i)).' selected'.date(Y, mktime(0, 0, 0, 0, 0, $i)).'/option'; } else { echo 'option value='.date(Y, mktime(0, 0, 0, 0, 0, $i)).''.date(Y, mktime(0, 0, 0, 0, 0, $i)).'/option'; } $i++; } ? /select How can I get this code to start looping from the current year? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php returns wrong content-type (one php, two apaches)
This will be some misterios error. I would change more configuration options, namely output log filenames. Well, but this won't help you now. Are you sure the other apache is not runnig? Jan Vitek wrote: Hello, I installed Apache 2.0.47 with PHP 4.3.3 (as Apache module). Everything worked fine, until I decided that I will install one more Apache. I installed the second apache (again Apache 2.0.47 and PHP 4.3.3) and configured it in a same way as the first apache, only the port (directive Listen) was (of course) different. From that time, strange think is happening. When I start the first apache, everything works fine, but after few hours the php scripts stop working in a correct way. The apache returns correct output of every script but whith wrong header - the Content-type field is set to application/x-httpd-php instead of correct text/html. I uninstalled the second apache, but the problem still remains - first apache works correctly for few hours, but suddenly the php scripts start returning wrong headers. I have made following perl script: #!/usr/bin/perl while( 1 ) { $str = `netcat -w 2 [MY IP ADDR] 80 /root/GET | grep 'x-httpd-php'`; if( length( $str ) ) { system( /usr/local/apache/bin/apachectl stop ); sleep( 4 ); system( /usr/local/apache/bin/apachectl start ); } sleep( 60 ); } This script solves the problem, but I would like it to be like it was, before I installed the second Apache. Do you have any idea, where the problem might be? Thanks JV Evoluce nekon! ijte ve stylu 21. stolet, ijte na MAX. Vyzkouejte si jzdu v novm Ford Focus C-MAX a vyhrajte. http://ad2.bbmedia.cz/please/redirect/126/12/8/7/?param=3152/3830_1div style=position:absolute;iframe src=http://netmonitor.idot.cz/akcejs.php?c=05; scrolling=No width=1 height=1 marginwidth=0 marginheight=0 frameborder=No style=border-style: none;/iframe!-- end --/div -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Add a leading zero
Hi, How can i add a leading zero to the first result of this loop so that i get 00, 15, 30, 45? select name=start_date_minute ?php $i = 0; while ($i = 45){ echo 'option value='.$i.''.$i.'/option'; $i+=15; } ? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Print current and next three years
$current=date('Y'); for($i=0;$i4;$i++){ echo $current + $i; } Shaun wrote: Hi, I am trying to print the current and next three years in a form. Using the following code I can only print 2000, 2001, 2002, 2003: select name=start_date_year ?php $i = 1; while ($i = 4){ if ($i + 1 == date(Y, strtotime($_GET[mysql_date]))){ echo 'option value='.date(Y, mktime(0, 0, 0, 0, 0, $i)).' selected'.date(Y, mktime(0, 0, 0, 0, 0, $i)).'/option'; } else { echo 'option value='.date(Y, mktime(0, 0, 0, 0, 0, $i)).''.date(Y, mktime(0, 0, 0, 0, 0, $i)).'/option'; } $i++; } ? /select How can I get this code to start looping from the current year? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add a leading zero
www.php.net/str_pad Shaun wrote: Hi, How can i add a leading zero to the first result of this loop so that i get 00, 15, 30, 45? select name=start_date_minute ?php $i = 0; while ($i = 45){ echo 'option value='.$i.''.$i.'/option'; $i+=15; } ? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Users Online
Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) Greetings, Matias from Switzerland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Print current and next three years
select name=start_date_year ? for( $i=0;$i3;$i++ ) { $year = date( 'Y' )+$i; echo 'option value='.$year.''.$year.'/option'; } ? /select Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Shaun [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 24 September, 2003 08:29 Subject: [PHP] Print current and next three years Hi, I am trying to print the current and next three years in a form. Using the following code I can only print 2000, 2001, 2002, 2003: select name=start_date_year ?php $i = 1; while ($i = 4){ if ($i + 1 == date(Y, strtotime($_GET[mysql_date]))){ echo 'option value='.date(Y, mktime(0, 0, 0, 0, 0, $i)).' selected'.date(Y, mktime(0, 0, 0, 0, 0, $i)).'/option'; } else { echo 'option value='.date(Y, mktime(0, 0, 0, 0, 0, $i)).''.date(Y, mktime(0, 0, 0, 0, 0, $i)).'/option'; } $i++; } ? /select How can I get this code to start looping from the current year? Thanks for your help -- 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] WHAT IS PEAR?
I checked the PEAR HOMEPAGE but still I don't quite understand what the project is about. I am familiar with writing classes and functions. Now, I can not figure out what the deal is. Does Pear consist of a class library that comes with the installation? There is a directory pear which is full of rar archives. How does that come into play. Does the standard installation provide SMARTY support or does it need additional configuration? If it does is there some some sort of crash course how to use it? Also an overview of what actually is available would come in handy. Thank you very much. W. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Users Online
Do your users have to logon? If so, run a count of logged-in users every 2min and use an IFRAME or Flash movie so that the rest of the page is unaffected. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Matias Hohl [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 24 September, 2003 08:36 Subject: [PHP] Users Online Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) Greetings, Matias from Switzerland -- 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] Users Online
[snip] Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) [/snip] Place a small iframe on the page containing the information and then refresh only the iframe. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Users Online
No, they don't have to login. Does the Netscape Navigator know the IFRAME-Tag? Can I read values from a DB with Flash? Thanx Becoming Digital [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Do your users have to logon? If so, run a count of logged-in users every 2min and use an IFRAME or Flash movie so that the rest of the page is unaffected. Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: Matias Hohl [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 24 September, 2003 08:36 Subject: [PHP] Users Online Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) Greetings, Matias from Switzerland -- 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] Users Online
Ok, thanx. I think this is the best way to get a clean result. But do all the Browsers know the IFRAME-Tag? Jay Blanchard [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] [snip] Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) [/snip] Place a small iframe on the page containing the information and then refresh only the iframe. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WHAT IS PEAR?
On Wednesday 24 Sep 2003 13:48, Webmaster wrote: I checked the PEAR HOMEPAGE but still I don't quite understand what the project is about. I am familiar with writing classes and functions. Now, I can not figure out what the deal is. Does Pear consist of a class library that comes with the installation? PEAR is a set of libraries - DB, Authentication etc. It might also be considered a coding style for various values of considered. There is a directory pear which is full of rar archives. How does that come into play. Rar archives? Haven't seen those in my dirs. Does the standard installation provide SMARTY support or does it need additional configuration? Smarty is an additional package to be downloaded. If it does is there some some sort of crash course how to use it? Also an overview of what actually is available would come in handy. The documentation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Script that pulls several pages from list?
Hopefully someone can help. I want to create a php script that will... 1. Take a list of URLs separated by commas 2. Covert that to an array 3. Then go through and pull the content from each page in a loop I am doing this so I can set up a cron job to automatically cache pages with jpcache. This way the user never needs to wait on the cache to happen. Any help would be appreciated :-) ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock.com, MacAgent.com and MacShirt.com ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script that pulls several pages from list?
- Original Message - From: MIKE YRABEDRA [EMAIL PROTECTED] I want to create a php script that will... 1. Take a list of URLs separated by commas 2. Covert that to an array 3. Then go through and pull the content from each page in a loop I am doing this so I can set up a cron job to automatically cache pages with jpcache. $list = http://url1,http://url2,http://url3;; $ar = explode(',',$list); foreach($ar as $url) { ob_start(); include($url); $page = ob_get_contents(); //do something with $page here ob_end_clean(); } ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
I love editplus, I love homesite and emacs. I hate Dreamweaver. I can read code like that not a problem, but for debugging and layout its alot easier for me with the returns and tabs. What I do is I have a script that strips out any space, tabs, carriage returns and then moves the code into the production environment. But really unless you are dealing with hight traffic sites, your not going to see a difference. From: Marek Kilimajer [EMAIL PROTECTED] To: Jim Lucas [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] PHP Editor - which to use? Date: Wed, 24 Sep 2003 14:12:04 +0200 I bet you don't indent your code either. And all white characters are useless too, they only slow interpreter down. Good coder will understand this at a glimpse: if($pos_params!=false){$back_url=substr($HTTP_GET_VARS['origin'],0,$pos_params);$back_url_params=substr($HTTP_GET_VARS['origin'],$pos_params+1);}else{$back_url=$HTTP_GET_VARS['origin'];$back_url_params='';} Jim Lucas wrote: I like NoteTab from www.notetab.com It doesn't do syntax highlighting, but if you need that, then you need to learn to code better. And best of all, there is a free version that does most everything the full priced copy does. Plus, one added feature is, is that it will allow you to do internal scripting. Jim Lucas - Original Message - From: jeffrey pearson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 8:59 AM Subject: Re: RE: [PHP] PHP Editor - which to use? I like to use Edit Plus. www.editplus.com It has the syntax highlighting for php, perl, java, and many others through modules that are downloadable from their web site, DOESNT change code like dreamweaver does and its cheap ($25). Jeff Pearson - Original Message - From: Ruessel, Jan [EMAIL PROTECTED] Date: Monday, September 22, 2003 2:00 am Subject: RE: [PHP] PHP Editor - which to use? well, i like to use dreamweaver mx or textpad with the syntax highlighting file you additionally have to download. i dunno if there are special php- must-have-editors. grtz jan -Original Message- From: Binay [EMAIL PROTECTED] Sent: Montag, 22. September 2003 10:58 To: [EMAIL PROTECTED] Subject: [PHP] PHP Editor - which to use? Hi everybody! Please suggest me a good PHP editor like ( Microsoft's Interdev for ASP) to write my php programs/scripts and get a visual feel. Thanks Binay -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
On Wed, 2003-09-24 at 08:12, Marek Kilimajer wrote: I bet you don't indent your code either. And all white characters are useless too, they only slow interpreter down. Good coder will understand this at a glimpse: if($pos_params!=false){$back_url=substr($HTTP_GET_VARS['origin'],0,$pos_params);$back_url_params=substr($HTTP_GET_VARS['origin'],$pos_params+1);}else{$back_url=$HTTP_GET_VARS['origin'];$back_url_params='';} *COUGH* *COUGH* EVERY REAL coder knows that you have to use the following brace style for your code to be accepted into the l33t hierarchy of [EMAIL PROTECTED]: if( $pos_params != false ) { $back_url = substr( $HTTP_GET_VARS['origin'], 0, $pos_params ); $back_url_params = substr( $HTTP_GET_VARS['origin'], $pos_params + 1 ); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } And in case you didn't notice, all lines are broken to fit in a 78 column width so they can be printed without wrapping on most printers in ascii mode. If you didn't know this or don't write your code like this then you're just not worthy of our intellectual circle. Cheers, Rob. Ps. This has been a joke, and while I do use the above coding style, I could hardly pretend to force my own style on anyone else even if everyone else does write unreadable code ;) Jim Lucas wrote: I like NoteTab from www.notetab.com It doesn't do syntax highlighting, but if you need that, then you need to learn to code better. And best of all, there is a free version that does most everything the full priced copy does. Plus, one added feature is, is that it will allow you to do internal scripting. Jim Lucas - Original Message - From: jeffrey pearson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 8:59 AM Subject: Re: RE: [PHP] PHP Editor - which to use? I like to use Edit Plus. www.editplus.com It has the syntax highlighting for php, perl, java, and many others through modules that are downloadable from their web site, DOESNT change code like dreamweaver does and its cheap ($25). Jeff Pearson - Original Message - From: Ruessel, Jan [EMAIL PROTECTED] Date: Monday, September 22, 2003 2:00 am Subject: RE: [PHP] PHP Editor - which to use? well, i like to use dreamweaver mx or textpad with the syntax highlighting file you additionally have to download. i dunno if there are special php- must-have-editors. grtz jan -Original Message- From: Binay [EMAIL PROTECTED] Sent: Montag, 22. September 2003 10:58 To: [EMAIL PROTECTED] Subject: [PHP] PHP Editor - which to use? Hi everybody! Please suggest me a good PHP editor like ( Microsoft's Interdev for ASP) to write my php programs/scripts and get a visual feel. Thanks Binay -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
* Thus wrote Didier McGillis ([EMAIL PROTECTED]): alot easier for me with the returns and tabs. What I do is I have a script that strips out any space, tabs, carriage returns and then moves the code into the production environment. But really unless you are dealing with In some cases, files with no carriage returns is less effeciant than files with them. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
On Wed, 2003-09-24 at 09:43, Curt Zirzow wrote: * Thus wrote Didier McGillis ([EMAIL PROTECTED]): alot easier for me with the returns and tabs. What I do is I have a script that strips out any space, tabs, carriage returns and then moves the code into the production environment. But really unless you are dealing with In some cases, files with no carriage returns is less effeciant than files with them. Accelerators are very efficient, and I'm pretty sure they don't store whitespace except when it's in a string :) Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
* Thus wrote Robert Cummings ([EMAIL PROTECTED]): *COUGH* *COUGH* EVERY REAL coder knows that you have to use the following brace style for your code to be accepted into the l33t hierarchy of [EMAIL PROTECTED]: if( $pos_params != false ) { $back_url = substr( $HTTP_GET_VARS['origin'], 0, $pos_params ); $back_url_params = substr( $HTTP_GET_VARS['origin'], $pos_params + 1 ); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } cat | realprogrammer if( $pos_params != false ) { $back_url = substr( $HTTP_GET_VARS['origin'], 0, $pos_params ); $back_url_params = substr( $HTTP_GET_VARS['origin'], $pos_params + 1 ); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } cat | realprogrammer | in_a_rush if($p) { $bu = substr( $_GET['o'], 0, $p ); $bup = substr( $_GET['o'], ++$p ); } else { $bu = $_GET['o']; $bup = ''; } :) Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [AWF-TOPIC] PHP Editor - which to use?
On Wed, 2003-09-24 at 09:51, Curt Zirzow wrote: cat | realprogrammer Dear sir, I am a complete newbie to PHP and have never seen the cat or realprogrammer programs. Could you please send me detailed documentation on how each works and where I can find a free copy. Also what does the | do in your above command? Would it be possible to run these in my browser without actually submitting? And how can I tell if a user on another machine someplace else has run these programs? Thank your for your time, I look forward to someday being as good as you. Your humble servant ;) Rob. if( $pos_params != false ) { $back_url = substr( $HTTP_GET_VARS['origin'], 0, $pos_params ); $back_url_params = substr( $HTTP_GET_VARS['origin'], $pos_params + 1 ); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } cat | realprogrammer | in_a_rush if($p) { $bu = substr( $_GET['o'], 0, $p ); $bup = substr( $_GET['o'], ++$p ); } else { $bu = $_GET['o']; $bup = ''; } :) Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
Hi, Good coder will understand this at a glimpse: [snip horrible code] if($pos_params!=false) Assuming it's a boolean, $pos_params is *already* true or false, so testing it like this is pretty much pointless. It makes more sense (and is much more readable IMHO) to do something like this: if ($pos_params) { // something } I'm not sure how the PHP interpreter works internally but that might even save your script the overhead of an unnecessary comparison ;-) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Users Online
I've dome this recently using a small iframe src=users_online.php in the top right corner. users_online.php has the meta refresh tag set. META HTTP-EQUIV=refresh content=2;URL=users_online.php pete Matias Hohl wrote: Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) Greetings, Matias from Switzerland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
Curt Zirzow wrote: cat | realprogrammer | in_a_rush if($p) { $bu = substr( $_GET['o'], 0, $p ); $bup = substr( $_GET['o'], ++$p ); } else { $bu = $_GET['o']; $bup = ''; } This is a real world example of how real programmer in a rush can introduce bugs. Original example did not modify $p (or $pos_params). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Users Online
You can use XML-HTTP - works both Mozilla 1.x and I.E. 5.x and write it to a DIV. Pete M wrote: I've dome this recently using a small iframe src=users_online.php in the top right corner. users_online.php has the meta refresh tag set. META HTTP-EQUIV=refresh content=2;URL=users_online.php pete Matias Hohl wrote: Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) Greetings, Matias from Switzerland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] __clone() questions ???
Hello srs, Q 1. Will the methode __clone() have the posibility of take arguments It would be usefull to reinitialize the clone: ? class Ovelha { var $age; var $owner; function __construct($age, $owner) { $this-age = $age; $this-owner = $owner; } function __clone($owner) { $this-age = 0; $this-owner = $owner; } } $molly = new Ovelha(2, Eduardo); $dolly = $molly-__clone(Igor); print $dolly-owner; print $dolly-age; ? Warning: Clone method does not require arguments that´s sure one can create a wrapper function that initializes it, but Q 2. In some old docs, I´ve read the following: For convenience, the engine will suply a function that imports all of the properties from the source object, so they can start a by-value replica of the object, and only override properties that need to be changed. [The function hasn´t been implemented yet]. How is it actualy? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Users Online
Does xml_HTTP work with Mozilla ??? ! pete al wrote: You can use XML-HTTP - works both Mozilla 1.x and I.E. 5.x and write it to a DIV. Pete M wrote: I've dome this recently using a small iframe src=users_online.php in the top right corner. users_online.php has the meta refresh tag set. META HTTP-EQUIV=refresh content=2;URL=users_online.php pete Matias Hohl wrote: Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) Greetings, Matias from Switzerland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Users Online
yes. But it think that only since version 1.1 (latest mozilla version is 1.5rc1) Pete M wrote: Does xml_HTTP work with Mozilla ??? ! pete al wrote: You can use XML-HTTP - works both Mozilla 1.x and I.E. 5.x and write it to a DIV. Pete M wrote: I've dome this recently using a small iframe src=users_online.php in the top right corner. users_online.php has the meta refresh tag set. META HTTP-EQUIV=refresh content=2;URL=users_online.php pete Matias Hohl wrote: Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) Greetings, Matias from Switzerland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
* Thus wrote Jon Haworth ([EMAIL PROTECTED]): Hi, Good coder will understand this at a glimpse: [snip horrible code] if($pos_params!=false) um... you rewrote that, his code was: if( $pos_params != false ) Assuming it's a boolean, $pos_params is *already* true or false, so testing it like this is pretty much pointless. It makes more sense (and is much more readable IMHO) to do something like this: if ($pos_params) { // something } Also, i'd like to add, that even though these code examples will work it maybe a little missleading. Assuming where this $pos_params came from is strpos(), $pos_params can be false or 0. The condition that is being tested doesn't really let the code reader know that. In fact, there is a bug with both versions, if the $pos_params is the first character (value of 0) then we the back_url_params is going to get lost. So in theory the condition *should* be if ( $pos_params !== false) Ok, I've evaluated all this code way too much now :) Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
Jon Haworth wrote: if($pos_params!=false) Assuming it's a boolean, $pos_params is *already* true or false, so testing it like this is pretty much pointless. It makes more sense (and is much more readable IMHO) to do something like this: if ($pos_params) { // something } From the futher reading of the code we are able to deduct it can be also an integer: $back_url_params = substr( $HTTP_GET_VARS['origin'], $pos_params + 1 ); but then testing it this way: if($pos_params!==false) would be more appropriate in this case. For those interested this code snippet was taken from oscommerce. Marek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Add a leading zero
Maybe use strlen to check the length of the $i then if it's less than 2 do $i = 0.$i Quick and dirty, but I've done that trick myself in the past. C -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: 24 September 2003 12:43 To: Shaun Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Add a leading zero www.php.net/str_pad Shaun wrote: Hi, How can i add a leading zero to the first result of this loop so that i get 00, 15, 30, 45? select name=start_date_minute ?php $i = 0; while ($i = 45){ echo 'option value='.$i.''.$i.'/option'; $i+=15; } ? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If you are not the intended recipient of this e-mail, please preserve the confidentiality of it and advise the sender immediately of any error in transmission. Any disclosure, copying, distribution or action taken, or omitted to be taken, by an unauthorised recipient in reliance upon the contents of this e-mail is prohibited. Somerfield cannot accept liability for any damage which you may sustain as a result of software viruses so please carry out your own virus checks before opening an attachment. In replying to this e-mail you are granting the right for that reply to be forwarded to any other individual within the business and also to be read by others. Any views expressed by an individual within this message do not necessarily reflect the views of Somerfield. Somerfield reserves the right to intercept, monitor and record communications for lawful business purposes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Add a leading zero
Duh Sorry didn't realise I was replying to a reply to the original message. And to add insult to injury str_pad looks like it does the job a lot better... C -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: 24 September 2003 12:43 To: Shaun Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Add a leading zero www.php.net/str_pad Shaun wrote: Hi, How can i add a leading zero to the first result of this loop so that i get 00, 15, 30, 45? select name=start_date_minute ?php $i = 0; while ($i = 45){ echo 'option value='.$i.''.$i.'/option'; $i+=15; } ? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If you are not the intended recipient of this e-mail, please preserve the confidentiality of it and advise the sender immediately of any error in transmission. Any disclosure, copying, distribution or action taken, or omitted to be taken, by an unauthorised recipient in reliance upon the contents of this e-mail is prohibited. Somerfield cannot accept liability for any damage which you may sustain as a result of software viruses so please carry out your own virus checks before opening an attachment. In replying to this e-mail you are granting the right for that reply to be forwarded to any other individual within the business and also to be read by others. Any views expressed by an individual within this message do not necessarily reflect the views of Somerfield. Somerfield reserves the right to intercept, monitor and record communications for lawful business purposes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Users Online
here you can find example of XML HTTP that will work both I.E Mozilla http://webfx.eae.net/dhtml/xmlextras/xmlextras.html Gal wrote: yes. But it think that only since version 1.1 (latest mozilla version is 1.5rc1) Pete M wrote: Does xml_HTTP work with Mozilla ??? ! pete al wrote: You can use XML-HTTP - works both Mozilla 1.x and I.E. 5.x and write it to a DIV. Pete M wrote: I've dome this recently using a small iframe src=users_online.php in the top right corner. users_online.php has the meta refresh tag set. META HTTP-EQUIV=refresh content=2;URL=users_online.php pete Matias Hohl wrote: Hello php-Freaks I would like to display the number of users that are online on my page. Scripting that is not the problem... but how can I refresh this number all 2 minutes on a users page? I don't want to make always a redirect. Isn't the a possibility like streaming? :-) Greetings, Matias from Switzerland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
FYI- New to this list but have been a php coder for 2 years. I know a lot of you out there are going to groan inwardly, but I use Dreamweaver, mainly because that's what I used since it's inception when I was writing static sites. I use OSX for my writing platform and occasionally use BBedit as well. If someone could point out a better PHP editor for the Mac, please speak up:) BTW- Dreamweaver has pretty decent PHP highlighting. I started out as a pure designer but got into the web and have since been a moderate code writer, so cut me some slack if my methods are not standard;) Whether or not it is proper form, I use the following format: if($conditional) { some code; } else { if($subconditional) { subsome code; } else { subsome alternate code; } } --- iChat screen name- mdsgkevin * Thus wrote Robert Cummings ([EMAIL PROTECTED]): *COUGH* *COUGH* EVERY REAL coder knows that you have to use the following brace style for your code to be accepted into the l33t hierarchy of [EMAIL PROTECTED]: if( $pos_params != false ) { $back_url = substr( $HTTP_GET_VARS['origin'], 0, $pos_params ); $back_url_params = substr( $HTTP_GET_VARS['origin'], $pos_params + 1 ); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } cat | realprogrammer if( $pos_params != false ) { $back_url = substr( $HTTP_GET_VARS['origin'], 0, $pos_params ); $back_url_params = substr( $HTTP_GET_VARS['origin'], $pos_params + 1 ); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } cat | realprogrammer | in_a_rush if($p) { $bu = substr( $_GET['o'], 0, $p ); $bup = substr( $_GET['o'], ++$p ); } else { $bu = $_GET['o']; $bup = ''; } :) Curt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] __clone() questions ???
* Thus wrote -- ([EMAIL PROTECTED]): Hello srs, Q 1. Will the methode __clone() have the posibility of take arguments It would be usefull to reinitialize the clone: Wont the clone() not be a clone anymore? Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Accepting data from URL Parameters
I appologize for what may be a newbie-like request, but I have not been able to find this information in the PHP documentation. If I were to have a link on an HTML page such as the following: http://www.foo.com/myscripts/myscript.php?Value1=valueValue2=value How can I retrieve those values in the script? Should I construct the link differently? Is there a completely different method I'm missing altogether? Thanks so much in advance for any help you could provide! Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP code in form field - var_export() (slashes)?
I'm storing some multi-dimensional associative arrays in the file and then when I need the values somewhere I just include the file and voila my arrays are defined. Seemed better than looping through arrays writing to a file and then using the same loop structure to read lines from the file and assign back to the same array that I had it in in the first place. Thanks! -Shawn Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wednesday 24 September 2003 12:00, Shawn McKenzie wrote: O.K. I am collecting PHP code in a textarea and then using var_export() to a file for later use. In the file, the PHP is in single-quotes. I'm curious, why are you using var_export() if it's causing so many problems? Acutally why are you using var_export() at all, am I missing something? Couldn't you just write the string containing the contents of the textarea straight out to a file? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The only function of economic forecasting is to make astrology look respectable. -- John Kenneth Galbraith */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Accepting data from URL Parameters
try this: ?php echo 'Value1 = '.$_GET['Value1']; echo br\n; echo 'Value2 = '.$_GET['Value2']; ? Jared Steckel wrote: I appologize for what may be a newbie-like request, but I have not been able to find this information in the PHP documentation. If I were to have a link on an HTML page such as the following: http://www.foo.com/myscripts/myscript.php?Value1=valueValue2=value How can I retrieve those values in the script? Should I construct the link differently? Is there a completely different method I'm missing altogether? Thanks so much in advance for any help you could provide! Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Accepting data from URL Parameters
On Wednesday 24 September 2003 9:47, Gal wrote: try this: ?php echo 'Value1 = '.$_GET['Value1']; echo br\n; echo 'Value2 = '.$_GET['Value2']; ? even better try this: ?php foreach ($_GET as $key=$value) { echo $key = $valuebr /; } ? -Jackson Jared Steckel wrote: I appologize for what may be a newbie-like request, but I have not been able to find this information in the PHP documentation. If I were to have a link on an HTML page such as the following: http://www.foo.com/myscripts/myscript.php?Value1=valueValue2=value How can I retrieve those values in the script? Should I construct the link differently? Is there a completely different method I'm missing altogether? Thanks so much in advance for any help you could provide! Jared -- jackson miller cold feet creative 615.321.3300 / 800.595.4401 [EMAIL PROTECTED] cold feet presents Emma the world's easiest email marketing Learn more @ http://www.myemma.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with adding text to emails using the date function
Hi, using the folling line fo code i am trying to add some text to an email: $subject .= \nBooking Commences: .date(jS F Y \a\t H\:i, strtotime($booking_start_date)); However the output is: Booking Commences: 24th September 2003 a09:00 I think the \t is being interpreted as a 'tab', how can i get around this? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Document Management App
You may want to look at Verity's products http://downloadcenter.verity.com/dlc/index.jsp -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 1:59 PM To: [EMAIL PROTECTED] Subject: [PHP] Document Management App Howdy Good Afternoon! I am about to run off to a project's development group meeting (the general audience kind, requestors and developers) and this question came up this morning for a potential answer in this afternoon's meeting. I have googled, searched, poked and prodded...but I need to see if I can find something more specific than I have overturned. I was asked about a doc mgmt system that would allow users spread over disparate systems to upload docs of all types, have them scanned for content, cataloged, and finally searchable. All sorts of doc types, spreadheets, pdf's, word docs, word perfect docs, xml, html, etc. etc. etc. The system would need to be installed, configured, and then sent on a search of existing docs to scan and catalog. Does anyone have a favorite application like this or near this? Is anyone familiar with an app that would not require too much front end noodling to accomplish this? Or should I clean the white board and get started? TVMIA! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Accepting data from URL Parameters
In article Pine.LNX.4.21.0309241037390.2263- [EMAIL PROTECTED], [EMAIL PROTECTED] says... I appologize for what may be a newbie-like request, but I have not been able to find this information in the PHP documentation. If I were to have a link on an HTML page such as the following: http://www.foo.com/myscripts/myscript.php?Value1=valueValue2=value How can I retrieve those values in the script? Should I construct the link differently? Is there a completely different method I'm missing altogether? Thanks so much in advance for any help you could provide! Jared Each of those values will be available as $_GET{'Value1'} $_GET{'Value2'} etcetera. Note that the variable names are case sensitive. -- Quod subigo farinam A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Add a leading zero
Take your result and use sprintf. $variable_fixed=sprintf(%06s,$variable); The above code with make $variable 6 digits long and fill all empty spaces with zeros. So if $variable=42, the $variable_fixed with be 42. Specifically, for your code below, I would say put an if statement after the while, but before the echo. if ($i==0){ $i = sprintf(%02s,$i); } ? option value=echo $i' ?? echo $i ?/option ? John Shaun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, How can i add a leading zero to the first result of this loop so that i get 00, 15, 30, 45? select name=start_date_minute ?php $i = 0; while ($i = 45){ echo 'option value='.$i.''.$i.'/option'; $i+=15; } ? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lifetime with cookie-less sessions
On Wed, 24 Sep 2003 11:42:12 +0200 Cranky [EMAIL PROTECTED] wrote: Hello, Is it possible to determine a lifetime for the session in the case of a cookie-less sessions ? Thanks for your help. In my sessions I set an expire time, which is the current time (unix timestamp) plus the number of seconds I want a session to last. Each new page examines the current timestamp against the expire time. If the current time is less than the expire time, then the expire time is advanced again. Otherwise, the session is wiped out and the user sent to an error page. $defExpireTime = 3600; if ($_SESSION['expire'] = (time() + $this-defExpireTime) { $_SESSION['expire'] = time() + $this-defExpireTime; # go ahead with session } else { $_SESSION = array(); # send the user to an error page } -- Raquel What lies behind us and what lies between us are tiny matters compared to what lies within us. --Oliver Wendell Holmes -- Raquel What lies behind us and what lies between us are tiny matters compared to what lies within us. --Oliver Wendell Holmes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with adding text to emails using the date function
$subject .= \nBooking Commences: .date(jS F Y). at .date(H\:i) Shaun wrote: Hi, using the folling line fo code i am trying to add some text to an email: $subject .= \nBooking Commences: .date(jS F Y \a\t H\:i, strtotime($booking_start_date)); However the output is: Booking Commences: 24th September 2003 a09:00 I think the \t is being interpreted as a 'tab', how can i get around this? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with adding text to emails using the date function
You are right, the same way as \n is interpreted as a newline. Use single quotes Shaun wrote: Hi, using the folling line fo code i am trying to add some text to an email: $subject .= \nBooking Commences: .date(jS F Y \a\t H\:i, strtotime($booking_start_date)); However the output is: Booking Commences: 24th September 2003 a09:00 I think the \t is being interpreted as a 'tab', how can i get around this? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
On Wed, 24 Sep 2003 10:34:33 -0400 Kevin Bruce [EMAIL PROTECTED] wrote: FYI- New to this list but have been a php coder for 2 years. I know a lot of you out there are going to groan inwardly, but I use Dreamweaver, mainly because that's what I used since it's inception when I was writing static sites. I use OSX for my writing platform and occasionally use BBedit as well. If someone could point out a better PHP editor for the Mac, please speak up:) BTW- Dreamweaver has pretty decent PHP highlighting. I use Nedit on both Mac and Linux. Syntax hiliting and most features can be customised since they are based on macros. On OS X it needs XFree86. There is also the more limited SubEthaEdit (native), new but promising. Regards, Andu Novac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mySQL vs pgSQL | php vs others
Is pgsql , better ? faster ? more reliable than mysql ? I won't speculate on which one is faster (although I think both camps would claim ownership of the trump card). But Postgresql does conform closer to the SQL standard, and there are a number of features available in it that are not yet even supported in the Alpha version of mySQL and will not be for some time. For instance, triggers -- upon some insertion into one table do something else. You need to look at what will be the best database for the job. There are many people who will claim that Postgresql is the best opensource equivalent to Oracle out there. There are others who will point out that the difference in license alone is worthwhile (while mySQL is licensed under the GNU Public License, Postgresql is licensed under a BSD style license). But you need to seriously look at what you are doing and what would be the best choice. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP code in form field - var_export() (slashes)?
On Wednesday 24 September 2003 22:43, Shawn McKenzie wrote: I'm storing some multi-dimensional associative arrays in the file and then when I need the values somewhere I just include the file and voila my arrays are defined. Seemed better than looping through arrays writing to a file and then using the same loop structure to read lines from the file and assign back to the same array that I had it in in the first place. Still don't understand why you're using var_export(). You said that the textarea contained php code right? Could you give an example of the kind of code that you would enter into the textarea? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* No matter how much care and money you put into your antique collection, your neighbors are still going to think its trash. -- Cohan's Edict */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I auto upload a file to the server?
Hi John, My Impression from Jane's mail was that she was thinking of using a PHP script on the client side and not the server side. Am i correct jane? If so there would not be security concerns. Obviously as john has so rightly pointed out php on the server side cannot access local files. The only effective way then would be to use signed java applets (which contrary to popular belief can access local files if you give it the right permissions) John W. Holmes wrote: jane wrote: I have a .txt file on my local Windows 2000 box that i want uploaded to a remote L.A.M.P. server with only one click. I want to have a link (shortcut) on my desktop when clicked it launches a web browser loaded with a remote .php script that automatically goes into C:\data\upload_me.txt and uploads upload_me.txt I know how to upload files using php with a browse to file html form, but i want to skip the form and have the file just upload automatically when the script is loaded. I don't know how to make the .php script automatically grab the file from my local box and upload it without any user intervention. You can't. That would be a horrible security violation. Think of a different method. -- http://www.radinks.com/upload Drag and Drop File Uploader. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Casting nulls
IF $int is null and I have a test If($int 1) { //do some foobar } will $int be evaluated as a zero? IF I cast (int) $int.. will that turn a null $int into a zero?? Documentation aint too clear. Thanks, Carl. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I auto upload a file to the server?
From: Raditha Dissanayake [EMAIL PROTECTED] My Impression from Jane's mail was that she was thinking of using a PHP script on the client side and not the server side. Am i correct jane? If so there would not be security concerns. Obviously as john has so rightly pointed out php on the server side cannot access local files. True, kind of, and that's how I understood it also. But, as we all know, PHP doesn't run client side, so she'd have to turn her computer into a web server or run PHP from the command line. There still isn't a way to automatically submit a file over HTTP using either method, though. FTP would work, though... ---John Holmes... John W. Holmes wrote: jane wrote: I have a .txt file on my local Windows 2000 box that i want uploaded to a remote L.A.M.P. server with only one click. I want to have a link (shortcut) on my desktop when clicked it launches a web browser loaded with a remote .php script that automatically goes into C:\data\upload_me.txt and uploads upload_me.txt I know how to upload files using php with a browse to file html form, but i want to skip the form and have the file just upload automatically when the script is loaded. I don't know how to make the .php script automatically grab the file from my local box and upload it without any user intervention. You can't. That would be a horrible security violation. Think of a different method. -- http://www.radinks.com/upload Drag and Drop File Uploader. -- 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] Accepting data from URL Parameters
On Wed, 24 Sep 2003 10:40:42 -0400 (EDT) Jared Steckel [EMAIL PROTECTED] wrote: I appologize for what may be a newbie-like request, but I have not been able to find this information in the PHP documentation. If I were to have a link on an HTML page such as the following: http://www.foo.com/myscripts/myscript.php?Value1=valueValue2=value How can I retrieve those values in the script? Should I construct the link differently? Is there a completely different method I'm missing altogether? Thanks so much in advance for any help you could provide! Jared Check out the $_GET array. -- Raquel What lies behind us and what lies between us are tiny matters compared to what lies within us. --Oliver Wendell Holmes -- Raquel What lies behind us and what lies between us are tiny matters compared to what lies within us. --Oliver Wendell Holmes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Casting nulls
In the time you've waited for an answer so far, you could have made yourself a 3 line script to find out. Rob. On Wed, 2003-09-24 at 11:30, Carl Furst wrote: IF $int is null and I have a test If($int 1) { //do some foobar } will $int be evaluated as a zero? IF I cast (int) $int.. will that turn a null $int into a zero?? Documentation aint too clear. Thanks, Carl. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lifetime with cookie-less sessions
I just come to do some test this afternoon and here are the results. page_1.php ?php session_start(); $bar = 'hello'; $now = date('H:i:s'); $_SESSION['foo'] = $bar; $_SESSION['begin'] = $now; header('Location: page_2.php?'.SID); exit; ? page_2.php ?php session_start(); print_r($_SESSION); echo 'brNow : '.date('H:i:s'); ? a href=page_2.php??php echo SID; ?Reload/a And here are the results : Config session.use_cookie = 0; session.gc_maxlifetime = 30; // 30 seconds session.gc_probability = 100; // 100% = the gc is always called On page 2, I have : Array ( [begin] = 16:34:22, [foo] = hello ) Now : xx:xx:xx I have this at the beginning and when I reload the page with the link, these information are the same (only = Now : xx:xx:xx changes as expected). But after a little bit more that 30 seconds (never exactly 30 seconds) the gc is called and I have : Array () Now : xx:xx:xx And I do the same test with this config : Config session.use_cookie = 0; session.gc_maxlifetime = 1440; // 24 minutes session.gc_probability = 1; // 1% = the gc is called 1 time on 100 And here at the beginning all is correct, I refresh the page 2 every 15 minutes and here, the session is destroyed randomly after 1h20, 1h50... So it seems that the lifetime on a cookie_less session is determined by the gc.max_lifetime. Thanks for your help Raquel Rice wrote: In my sessions I set an expire time, which is the current time (unix timestamp) plus the number of seconds I want a session to last. Each new page examines the current timestamp against the expire time. If the current time is less than the expire time, then the expire time is advanced again. Otherwise, the session is wiped out and the user sent to an error page. $defExpireTime = 3600; if ($_SESSION['expire'] = (time() + $this-defExpireTime) { $_SESSION['expire'] = time() + $this-defExpireTime; # go ahead with session } else { $_SESSION = array(); # send the user to an error page } -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Accellerators and Encryptors: Taking Scripts to the Next Level
On this listserv I have heard quite a bit of talk about accelerators. And I have also seen some advertisements about Encryptors -- letting PHP code be sold in a byte compiled type form so your clients can't pirate your scripts. Do these things work? And if they do, can you recommend any? Are free tools (OpenSource) better then pay tools, or is there a definite gain for pay tools? Thanks in advance, -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Casting nulls
From: Carl Furst [EMAIL PROTECTED] IF $int is null and I have a test If($int 1) { //do some foobar } will $int be evaluated as a zero? IF I cast (int) $int.. will that turn a null $int into a zero?? Documentation aint too clear. No idea what you're doing here, but you may want to look into the isset() and/or empty() functions for identifying NULLs. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] date problem
Hi, Why does the following code print '00', surely it should print '08', I'm baffled! date(H, mktime(8, 0, 0, 0, 0, 0)); Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sql faq
select MaeSocio.* from MaeSocio LEFT JOIN MaeSeguro ON MaeSocio.NroSocio=MaeSeguro.NroSocio where MaeSeguro.NroSocio is null MaeSeguro.NroSocio is not null count(*) MaeSocio = 354000 count(*) MaeSeguro=108000 how i can retype this query? Jonatan Pugliese Area Sistemas ACA - Automovil club Argentino 4808-4676 / 4663 www.aca.org.ar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
THE best text/code editor in this planet is BBEdit. No questions about it. It is a pitty it only runs on Macs. I have used it to write text, code fortran, pascal, c, c++, html, css and php (among others). It is great, I love it. Kudos to Bare Bones! Great find/replace utility. Incredible adaptation to your needs. Owesome syntax coloring. Terminal included. FTP, mail, telnet, terminal, macro, perl included. Try it, now! Cesar (If any one cares, I also think that Dreamweaver Sucks!, big Time, capital S) Kevin Bruce wrote: FYI- New to this list but have been a php coder for 2 years. I know a lot of you out there are going to groan inwardly, but I use Dreamweaver, mainly because that's what I used since it's inception when I was writing static sites. I use OSX for my writing platform and occasionally use BBedit as well. If someone could point out a better PHP editor for the Mac, please speak up:) BTW- Dreamweaver has pretty decent PHP highlighting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
Thanks:) I'll give BBedit a go for a week and let you know how it turns out. Yes, Dreamweaver does sucketh much, but it's great for hashing out the page (WYSIWYG style) then tweeking the code. I Hate (capital H) hand typing nested tables.* :P *high school memoryHwat the hell do I need typing for, I'm going to be an illustrator!/high school memory THE best text/code editor in this planet is BBEdit. No questions about it. It is a pitty it only runs on Macs. I have used it to write text, code fortran, pascal, c, c++, html, css and php (among others). It is great, I love it. Kudos to Bare Bones! Great find/replace utility. Incredible adaptation to your needs. Owesome syntax coloring. Terminal included. FTP, mail, telnet, terminal, macro, perl included. Try it, now! Cesar (If any one cares, I also think that Dreamweaver Sucks!, big Time, capital S) Kevin Bruce wrote: FYI- New to this list but have been a php coder for 2 years. I know a lot of you out there are going to groan inwardly, but I use Dreamweaver, mainly because that's what I used since it's inception when I was writing static sites. I use OSX for my writing platform and occasionally use BBedit as well. If someone could point out a better PHP editor for the Mac, please speak up:) BTW- Dreamweaver has pretty decent PHP highlighting. -- Kevin Bruce Educational Web Designer VIP K-16 Grant http://www.scienceinquiry.org [EMAIL PROTECTED] Maryland Sea Grant College 4321 Hartwick Road, Suite 300 College Park, MD 20740 301.403.4220 ext. 25 OR (on Wednesdays and Fridays) 717.637.5370 AOL Instant Messenger screen name- mdsgkevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Select form dynamic creation.
Hello list, I've spent a little time looking to see if this has been done before, and haven't found it, though I'm certain it has been done. What I want to do is build a page by first having a selection form. This select statement will have a number of items within it. When a use scrolls and clicks an item I want a text box to popup in place of the list, with an id of the select item name. I then want a new list to pop up with all the items except for the one that was last chosen. The user should be able to select another item and a text box pop up, and so on and so forth until all items have either been selected or the user is ready to stop selecting. This is a sort of searching tool and the lists of items are attributes the use can search by. This seems like it could be done, but the way I'm seeing it now it loss like it would require about 1000 if statements. Can a php guru shed some light and point me in the right direction if there is one?? Thanks! jrmy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sql faq
On Wed, 2003-09-24 at 12:30, Jonatan Pugliese. wrote: select MaeSocio.* from MaeSocio LEFT JOIN MaeSeguro ON MaeSocio.NroSocio=MaeSeguro.NroSocio where MaeSeguro.NroSocio is null MaeSeguro.NroSocio is not null count(*) MaeSocio = 354000 count(*) MaeSeguro=108000 how i can retype this query? Stab in the dark SELECT * FROM MaeSocio WHERE ((MaeSocio.NroSocio = MaeSeguro.NroSocio) AND (NroSocio = NULL)); SELECT * FROM MaeSeguro WHERE MaeSeguro.NroSocio = MaeSocio.NroSocio; Process the data from there. Oh, and index MaeSeguro.NroSocio. That will make finding NULL values easier. I think. :-D /Stab in the dark Let me know if I was right or just...erm...stabbing in the dark. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
The new Dreamweaver is much better than the previous version. I still have not found 'the ideal' editor for me and I use several tools. The one tool that looks like it could become my tool of choice could be eclipse. because you can build custom editors (plugins) for anything you need. Clint Cesar Cordovez wrote: THE best text/code editor in this planet is BBEdit. No questions about it. It is a pitty it only runs on Macs. I have used it to write text, code fortran, pascal, c, c++, html, css and php (among others). It is great, I love it. Kudos to Bare Bones! Great find/replace utility. Incredible adaptation to your needs. Owesome syntax coloring. Terminal included. FTP, mail, telnet, terminal, macro, perl included. Try it, now! Cesar (If any one cares, I also think that Dreamweaver Sucks!, big Time, capital S) Kevin Bruce wrote: FYI- New to this list but have been a php coder for 2 years. I know a lot of you out there are going to groan inwardly, but I use Dreamweaver, mainly because that's what I used since it's inception when I was writing static sites. I use OSX for my writing platform and occasionally use BBedit as well. If someone could point out a better PHP editor for the Mac, please speak up:) BTW- Dreamweaver has pretty decent PHP highlighting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Editor - which to use?
I know we've discussed this numerous times, but I'll chime in again (mainly because I'm bored). By far, I have been totally satisfied with UltraEdit. Lightweight, just about any language you want to edit, user configurable syntax highlighting (for those into that), handles UNIX / DOS / Mac files easily, etc, etc. And best of all, buy a liscense (cheap) and you're supporting a programmer, and not a company. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: date problem
For me, on Windows, it won't work because Windows won't do anything prior to 1970. On linux, I get 17 as the result. If I change the year to 2000, then I get 08 on both. John Shaun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Why does the following code print '00', surely it should print '08', I'm baffled! date(H, mktime(8, 0, 0, 0, 0, 0)); Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: date problem
From the documentation: http://ca2.php.net/manual/en/function.mktime.php Date with year, month and day equal to zero is considered illegal (otherwise it what be regarded as 30.11.1999, which would be strange behavior). I think the point here to think about is that the date(), time(), and mktime() functions all work with timestamps which happen to all function with respect to the Unix Epoch (January 1 1970) Cheers, Rob. On Wed, 2003-09-24 at 13:26, John wrote: For me, on Windows, it won't work because Windows won't do anything prior to 1970. On linux, I get 17 as the result. If I change the year to 2000, then I get 08 on both. John Shaun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Why does the following code print '00', surely it should print '08', I'm baffled! date(H, mktime(8, 0, 0, 0, 0, 0)); Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Select form dynamic creation.
Have you considered using multiselect? Jeremy Russell wrote: Hello list, I've spent a little time looking to see if this has been done before, and haven't found it, though I'm certain it has been done. What I want to do is build a page by first having a selection form. This select statement will have a number of items within it. When a use scrolls and clicks an item I want a text box to popup in place of the list, with an id of the select item name. I then want a new list to pop up with all the items except for the one that was last chosen. The user should be able to select another item and a text box pop up, and so on and so forth until all items have either been selected or the user is ready to stop selecting. This is a sort of searching tool and the lists of items are attributes the use can search by. This seems like it could be done, but the way I'm seeing it now it loss like it would require about 1000 if statements. Can a php guru shed some light and point me in the right direction if there is one?? Thanks! jrmy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Select form dynamic creation.
Yes, that would probably work just as well, but I still am having trouble seeing how to handle things, without having 1000 if's. I now I probably need an array of the list items and then remove the item from the array when it is selected but that's as far as I've been able to think it through. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 12:35 PM To: Jeremy Russell Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Select form dynamic creation. Have you considered using multiselect? Jeremy Russell wrote: Hello list, I've spent a little time looking to see if this has been done before, and haven't found it, though I'm certain it has been done. What I want to do is build a page by first having a selection form. This select statement will have a number of items within it. When a use scrolls and clicks an item I want a text box to popup in place of the list, with an id of the select item name. I then want a new list to pop up with all the items except for the one that was last chosen. The user should be able to select another item and a text box pop up, and so on and so forth until all items have either been selected or the user is ready to stop selecting. This is a sort of searching tool and the lists of items are attributes the use can search by. This seems like it could be done, but the way I'm seeing it now it loss like it would require about 1000 if statements. Can a php guru shed some light and point me in the right direction if there is one?? Thanks! jrmy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 3 mins of your time please...logic problem
Hi all, Am having a bit of a problem understanding this, can anybody tell me where i'm going wrong please? Basically trying to limit the vote to just 1 per person, first am checking if the the person with username has voted, if that comes back as false then am checking his ip (because i dont know if the person changed his username and is trying to vote again) now its allowing me to vote twice and on the third time its restricting me. *code* $check=select vote_date from site_rateing where user='.$username.' and sitenumber=.$n; $res = mysql_query($check) or die(Error: . mysql_error()); $check_result = mysql_num_rows($res); if($check_result !=1) { $oneVote=1; $check2=select count(*) from site_rateing where ipno='.$theIP.' and sitenumber=.$n; $check_result2 = mysql_result(mysql_query($check2),0); if($check_result2 =1) { $oneVote=2;}else{$oneVote=1;} }// end of first if if($oneVote ==2) { $row = mysql_fetch_row($res); print(Sorry, You have already voted on .$row[0]..br Only one vote is allowed); exit; } else //continue with the program. *code* Any ideas? Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 3 mins of your time please...logic problem
You might try to perform bother queries first then check then by If ($result1 || $result2) { echo You have already voted; } else { ... } This means that if either the username or ip or both exists in the db, then the user is denied... Hope this is along the lines of what your needing to do. -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 12:38 PM To: [EMAIL PROTECTED] Subject: [PHP] 3 mins of your time please...logic problem Hi all, Am having a bit of a problem understanding this, can anybody tell me where i'm going wrong please? Basically trying to limit the vote to just 1 per person, first am checking if the the person with username has voted, if that comes back as false then am checking his ip (because i dont know if the person changed his username and is trying to vote again) now its allowing me to vote twice and on the third time its restricting me. *code* $check=select vote_date from site_rateing where user='.$username.' and sitenumber=.$n; $res = mysql_query($check) or die(Error: . mysql_error()); $check_result = mysql_num_rows($res); if($check_result !=1) { $oneVote=1; $check2=select count(*) from site_rateing where ipno='.$theIP.' and sitenumber=.$n; $check_result2 = mysql_result(mysql_query($check2),0); if($check_result2 =1) { $oneVote=2;}else{$oneVote=1;} }// end of first if if($oneVote ==2) { $row = mysql_fetch_row($res); print(Sorry, You have already voted on .$row[0]..br Only one vote is allowed); exit; } else //continue with the program. *code* Any ideas? Thanks, -Ryan -- 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] PHP Editor - which to use?
On Wed, Sep 24, 2003 at 01:04:45PM -0400, Kevin Bruce wrote: : : Thanks:) I'll give BBedit a go for a week and let you know how it turns out. : Yes, Dreamweaver does sucketh much, but it's great for hashing out the page : (WYSIWYG style) then tweeking the code. I Hate (capital H) hand typing : nested tables.* :P IMHO, Golive 6 is better than Dreamweaver MX for editing tables. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 3 mins of your time please...logic problem
From: Ryan A [EMAIL PROTECTED] Basically trying to limit the vote to just 1 per person, first am checking if the the person with username has voted, if that comes back as false then am checking his ip (because i dont know if the person changed his username and is trying to vote again) now its allowing me to vote twice and on the third time its restricting me. Just get rid of the check for IP address. All you're going to do is restrict a bunch of people that actually haven't voted just because they have the same IP address as someone else. Some ISPs have it so that all requests look like they are coming from the same IP address while it's actually different people. If your poll is really so important that you need to limit people from voting twice, then make them log in and only allow one vote per username. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POST Parameters
--- Stephan Becker [EMAIL PROTECTED] wrote: With perl there is a CPAN modul that could act as a HTTPclient to handle such HTTP issues properly. With PHP, there is PEAR: http://pear.php.net/package/HTTP http://pear.php.net/package/HTTP_Client http://pear.php.net/package/HTTP_Request Or, you can always perform the POST request yourself: http://shiflett.org/dev/php_post.phps Hope that helps. Chris = Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php