RE: [PHP] escaping ?
this should work $contents = str_replace(?xml version=\1.0\?, , $contents); btw. a welformed xml documented uses a space between 1.0 and ? -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 10, 2002 11:07 PM To: 'Steven Jarvis'; [EMAIL PROTECTED] Subject: RE: [PHP] escaping ? what about this? $contents = str_replace('?xml version=1.0?'.'', '', $contents); -Original Message- From: Steven Jarvis [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 09, 2002 8:46 AM To: [EMAIL PROTECTED] Subject: [PHP] escaping ? I'm trying to do some string replaces on XML files to import them into a prprietary db that doesn't understand XML. I need to strip the XML tags out of the file. However, when I use this line: $contents = str_replace('?xml version=1.0?', '', $contents); The ? in the string ends my php block. I know there's an easy answer to this, and I'm probably just suffering from Friday afternoon burnout, but can someone let me know how to escape those so that I can search for them in the string? thanks, Steven -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mime emails
http://php.resourceindex.com/detail/00896.html GOOGLE is the ultimate programmers tool. And i used this some time ago... :) -Original Message- From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 9:23 AM To: php-list Subject: [PHP] mime emails hey.. does anyone know of any good classes / functions for handling mime emails? i am writing a mail checker, and was wondering if there are any pre-written mime email handling classes out there... thanks! Regards, Kunal Jhunjhunwala Minds think with ideas, not information. No amount of data, bandwidth, or processing power can substitute for inspired thought. - Clifford Stoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] modDb Contribution
unusual?? Don't know ... but i never ever saw a request like this on the list before, if that is what you mean. But the ppl on this list are mostly developers and most of them including me. We don't buy we make :) (at least we try to :) I understand your frustration. But what you could do: 1 try to sell it to various host which provide nuke support. There are several noted on the nuke site. 2 release a limited version. 3 release a full version but demand a link to your site (more traffic could mean more customers 4 contribute to the open source soceity 5 try to sell it to a developer 1. If want to sell this is the place to do it! 2. Very difficult, and mostly annoy ppl 3. Nice thought but usually ppl don't give credit where the credit belongs 4. YEAH!!! :) 5. We need a demo first with some example coding in how to use it, things like that (btw i am not interrested i don't use nuke) I think that this are your options HTH Jerry -Original Message- From: Vincent - D. Ertner [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 11:55 PM To: php Subject: [PHP] modDb Contribution Hi PHPers, in late 2001 I had a customer that was interested in a kind of universal (my)SQL module for PHPNuke / phpWebsite. Thus I ordered the development and - as fair as life is - the customer went straight into bankruptcy. Now I have a first beta of modDb - as we call it - and almost no need to push it further. At least - kind fellows - the programmers offered to do some additional work on modDb. Now ... to keep a long story short ... which is the best way to bring this to a kind of happy end? Where could I contribute it? On the one hand I would love to contribute it under GPL - on the other hand it cost something ... Please let me in on your thoughts about this matter! Thanx in advance ... is it unusual to ask this kind of question? Please let me know ... -- Cheers, Vince ''' ô¿ô - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!
This is what we call a BUG Report it on http://bugs.php.net thx -Original Message- From: * RzE: [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 1:44 PM To: PHP General Mailinglist Subject: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!! Hi folks, I don't know if everyone ever knew this, but I haven't been able to find anything about this, anywhere... odbc_execute has a very dangerous 'feature'. I would like to call it a bug, because someone has implemented it on purpose I should call it a feature... odbc_execute takes two arguments; the odbc result-ID, and an array containing the parameters for this statement. So far so good. Works perfectly. In the parameters you can put any data. Any data! So you can enter characters like eg. , *, %... you name it. You can also enter single quotes ('). Nice. Noop... not nice. If you put a single quote at the start of the parameter and at the end PHP does something very scary... it reads the _file_(!) and stores it in the database. So if you would have a parameter: 'myname' you would get an error telling you that the file myname couldn't be opened. But... if you use this parameter: '/etc/passwd' No problem! The contents of your password file is stored in the database. Any file readable for your webserver can be 'used' this way. Any file! So, imagine you have some site containing a textarea input in the form, some user can easily type: '/etc/passwd' and then submit the form. When you also have the possibility on this site for the user to take a look at the data he entered (and this is a very common feature), he gets to see the contents of your password file. And he can do this with any file(). As long as it's readable for the webserver, users can very easily get the contents of the file! And... is it documented? NO Nowhere. Not the mailinglists, not the documentation, not the bugreport, not even in the sources itself. It's just there! Some security huh?! -- * RzE: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Stripping the first line of a file
Use $aFile=file(FILENAME); //$aFile[0] contains the unwanted line echo $aFile[1]; // displays line 2 echo $aFile[n]; // displays line n where n is an positieve interger and not greater then the number of lines in the file http://www.php.net/manual/en/function.file.php HTH Jerry -Original Message- From: Scott [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 4:02 PM To: [EMAIL PROTECTED] Subject: [PHP] Stripping the first line of a file Hi, I want to be able to open a file and then strip the first line of it off. Example, the first line contains the names for tables in a database and all I need is from the second line on. if I fopen a file can I strip the line or should I process it and then drop the data from the first row? Thanks, -Scott -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Stripping the first line of a file
Yes there is! Try reading the manual? http://www.php.net/printf printf (%-5.5s,$fields[14]); for the other function to make a line exactly 255 char long? Do you have the perl Example? HTH Jerry -Original Message- From: Scott [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 4:22 PM To: Jerry Verhoef (UGBI) Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Stripping the first line of a file Thank you! Works. I have a few more questions! I am working on converting a program from perl to PHP as it is the new language of choice at our office. I have been using printf statements in perl to format data. Is there a similar funtion in php? Here is an example from the perl program: printf NEW(%-5.5s,$fields[14]); This will print exactly 5 characters, I also use this format to make sure the lines are exactly 255 characters long: printf NEW(%-193.193s); Is there something similar in php. Thanks for everyone's help and patience. -Scott On Fri, 8 Feb 2002, Jerry Verhoef (UGBI) wrote: $aFile=file(FILENAME); //$aFile[0] contains the unwanted line echo $aFile[1]; // displays line 2 echo $aFile[n]; // displays line n where n is an positieve interger and not greater then the number of lines in the file -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Stripping the first line of a file
printf NEW (%-193.193s); printf (%-193.193s,VARIABLE); HTH -Original Message- From: Jerry Verhoef (UGBI) [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 4:35 PM To: 'Scott'; Jerry Verhoef (UGBI) Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Stripping the first line of a file Yes there is! Try reading the manual? http://www.php.net/printf printf (%-5.5s,$fields[14]); for the other function to make a line exactly 255 char long? Do you have the perl Example? HTH Jerry -Original Message- From: Scott [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 4:22 PM To: Jerry Verhoef (UGBI) Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Stripping the first line of a file Thank you! Works. I have a few more questions! I am working on converting a program from perl to PHP as it is the new language of choice at our office. I have been using printf statements in perl to format data. Is there a similar funtion in php? Here is an example from the perl program: printf NEW (%-5.5s,$fields[14]); This will print exactly 5 characters, I also use this format to make sure the lines are exactly 255 characters long: printf NEW (%-193.193s); Is there something similar in php. Thanks for everyone's help and patience. -Scott On Fri, 8 Feb 2002, Jerry Verhoef (UGBI) wrote: $aFile=file(FILENAME); //$aFile[0] contains the unwanted line echo $aFile[1]; // displays line 2 echo $aFile[n]; // displays line n where n is an positieve interger and not greater then the number of lines in the file -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] check this new site
LOL And i just thought it looked like spam Sorry my mistake :) -Original Message- From: JSheble [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 5:09 PM To: php list Subject: Re: [PHP] check this new site looks like every other SLashdot, PHP-Nuke or PHP-Mutant web site out there with,just a lot less content... At 07:52 AM 2/8/2002 -0800, Sagar Chand wrote: hi all out there, just tell me howz this new site www.linuxfornerds.com A site meant for ardent linux lovers but every one r invited to post any views on any open source software. so get ur voice out /sagar __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Seams not to be possible
$glacer[0]=test; $category[0]=glacer; echo ${$category[0]}[0]; echo returns test. That is what you wanted to do?? -Original Message- From: Aric Caley [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 4:46 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Seams not to be possible maybe you could use eval(): eval(echo \$ . $field); - Original Message - From: Andy [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 2:57 AM Subject: Seams not to be possible This was just an error in my explenation I ment categories. Meanwhile I tryed var vars, but it does not work for any reason?!?!? My code looks like: $field = $categories[0].[0]; echo $field;// returns glacier[0] echo 'var '.$$field.'br'; // returns bluddy nothing echo $categories[0]; // returns glacier echo $glacier[0];// returns 110 Does anybody know how to get the 110 out of the array? Thanx for any help, Andy Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I have a tricky array question. My app is passing via post a array variable called glacier. Now I am checking for the content of this array. Because there are more of those arrays, I am getting all the names out of a db. How is it possible to get the value and keep the name of the array dynamic? e.g: Array name passed by post is: $glacier // contains e.g. $glacier[0] = testname Array with category names coming out of db is: $category // contains e.g. $category[0] = glacier echo $categories[0]; // returns glacier echo $glacier[0]; // returns testname I tryed $categories[0][0] but it returns only the first letter of glacier (g) Any ideas?? Thanx, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Convert 24hr to 12hr
RTFM http://www.mysql.com/doc/D/a/Date_and_time_functions.html select date_format(DATEFIELD,%r) from TABLE or select time_format(TIMEFIELD,%r) from TABLE Look in the manual for more options... MUCH MORE :) Anyone know the difference between %h: 01-12 hour notation and %I: 01-12 hour notation ? Kind regards, Jerry -Original Message- From: Gary [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 3:44 AM To: [EMAIL PROTECTED] Subject: [PHP] Convert 24hr to 12hr Hello All, Can someone please RTFM me so I can convert MySQL 24 hour time to 12 hour time. TIA gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Sending files to the user...?
Your are on the right track. Using the Header function is the way to do it. But I guess you forget to take a look at the manual page. There are all questions that you ask answered :) So take a look http://www.php.net/manual/en/function.header.php . in short: RFC: http://www.w3.org/Protocols/rfc2616/rfc2616 Force download: header(Content-type: application/pdf); header(Content-Disposition: attachment; filename=downloaded.pdf); /* ... output pdf file ... */ Kind Regards, Jerry -Original Message- From: Alan McFarlane [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 1:36 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Sending files to the user...? Oh, and BTW, after sending the file, I will be redirecting the user to a different page... Alan McFarlane [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The problem: How to I send a file to the user? Sounds simple but, assume I have a 'daily report' option from my main web page. When the user clicks on it, they are taken to the file 'generate_report.php' (sample included). Now, this code should generate the report, compress it if required and send it ot the user - i.e. a dialog box opens asking the user to open/save/run the incoming file. Question is, how? - I've toyed with Content-Disposition but I'm not sure of any reference materials for this. (Perhaps someone knows the RFC) The code: ?php /* file: generate_report.php */ // build the report $report = xml...; /* basically an xml document // compress if possible if (extension_loaded(zlib) (strlen($report) 1024)) { $report = gzcompress($report); $compress = true; } else { $compressed = false; } $length = strlen($report);// I presume this can handle binary data //header( something ); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How do I find double values in an associative array
http://www.php.net/manual/en/function.array-count-values.php Jerry I feel like a manual... -Original Message- From: Rainer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 2:51 PM To: [EMAIL PROTECTED] Subject: [PHP] How do I find double values in an associative array Hello group, Can anybody tell me how I easily compare values in an associative array? I would like to find double values I have for instance an array like: $foo['key1'] = 'abc'; $foo['key2'] = 'def'; $foo['key3'] = 'abc'; $foo['key4'] = 'ghi'; and I want to get the value 'abc' ... Please send me an email ([EMAIL PROTECTED]) because my newsgroups doesn't always work properly! Thanx, Rainer. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] whic OS is under?
http://www.php.net/manual/en/function.php-uname.php Take a look at the example there -Original Message- From: Ivo Stoykov [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 2:45 PM To: [EMAIL PROTECTED] Subject: [PHP] whic OS is under? Hi group: Is there a way to guess which OS the script is running? I couldn't find anything in the manual about this. Thank you Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ReFilling mySQL Database with CSV file!!
First structure only second data only Don't forget to check the check box for complete inserts and extended inserts reload in new db. create the DB upload the 1 file and then the second file Done -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 1:01 PM To: [EMAIL PROTECTED] Subject: [PHP] ReFilling mySQL Database with CSV file!! I have to shift my site to a new location. I have enormous records in many tables in my database which will be needed 2 be shifted to. The 'phpMyAdmin' at my site allows me make dumps of the Data in the CSV format. I haven't done this before. These are the options it gives me : 1. Structure only 2. Structure and data 3. Data only 4. CSV for Ms Excel data 5. CSV data : Fields terminated by; Fields enclosed by Fields escaped by / Lines terminated by \r\n 6. Save as file Can someone please tell me exactly which option should i be choosing? And also, once i have chosen that and saved the lot of .csv files on my computer. What is going to be the process to re-fill the new Database It's new tables with the data in the saved .csv File? Thanks, T. Edison Jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Making your include files invisible (header() in if loop)
Or even better put them outside your www root. -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 4:19 PM To: qartis Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Making your include files invisible (header() in if loop) On Thursday, January 31, 2002, at 11:50 PM, qartis wrote: I wanted to hide the existance of my include files by making them 'invisible': give a 404 error when requested. This worked, but the files that were including were obviously 404ing too. So I decided to use $PHP_SELF and check whether the script's PHP_SELF was it's filename, which would mean that it was being accessed directly, as opposed to being included. Just don't name any of your real files include! If you have access to your web server, you can easily set a directive in httpd.conf (assuming you're using Apache) to deny any file serve request with the following line: Files ~ \.inc$ Order allow,deny Deny from all /Files Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] A real simple question...
Take a look at exec() passthru() system() Keep in mind that the webserver usally runs as User nobody or an equivilant of that. So this user should have rights to run the program. Kind Regards, Jerry Verhoef -Original Message- From: Liam MacKenzie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP] A real simple question... Hey everyone, Got a question... How to I run a program and print it's output into a document? For instance, I have a program called ftpusers and when run from a shell like this: /usr/local/misc/ftpusers It will display a plain text list of people connected to my server. How do I get PHP to call that program and print it's output into a webpage? Thanks for your help! Liam The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How can I decrypt a password I previously coded with md5()?
Not MD5 is a hash code not an encryption! Jerry Verhoef -Original Message- From: Jose [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:51 AM To: [EMAIL PROTECTED] Subject: [PHP] How can I decrypt a password I previously coded with md5()? I'm making a proyect in php, and I have some doubts about the md5. I encript a password with it, but I don't know how to decrypt it again. Thanks. -- -- -- Jose Fco. ( [EMAIL PROTECTED] ). OLINET, S.L. Teléfono: 952207135 - Fax: 952207600 Avda. Juan Sebastián Elcano, 39-41. 29017 Málaga. -- -- -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How can I decrypt a password I previously coded with md5()?
Take a look at the mcrypt libary http://www.php.net/manual/en/ref.mcrypt.php Jerry Verhoef -Original Message- From: Jose [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 11:10 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] How can I decrypt a password I previously coded with md5()? Then how can I encrypt the password? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] POST 2X
I think I speak for everone: HUH Maybe some more info? A piece of code? Some clear infomation on what is going wrong and when does this happen? And what action is happening two times? kind regards, Jerry Verhoef -Original Message- From: M-H-d [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 12:15 PM To: [EMAIL PROTECTED] Subject: [PHP] POST 2X I've a problem with my script. When i use POST method it's reply the same action for two times, when i check my script everything ok. Anyone can help me ?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] POST 2X
There is nothing strange in this script. Except for this. header(Refresh: 0;url=failed2.php); Could this be the problem? This is a redirect but couldn't you use a header(Location: failed2.php); If this isn't the problem. Maybe you can post the script which makes the request (the script with the form) Jerry Verhoef -Original Message- From: Miftakhul Huda [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 12:45 PM To: Jerry Verhoef (UGBI) Subject: Re: [PHP] POST 2X I grab this from my Apache access log : 10.0.7.7 - - [25/Jan/2002:08:13:21 +0700] POST /komplain/kirimform.php HTTP/1.1 200 1469 10.0.7.7 - - [25/Jan/2002:08:13:21 +0700] POST /komplain/kirimform.php HTTP/1.1 200 1469 10.0.7.17 - - [25/Jan/2002:09:02:52 +0700] POST /komplain/kirimform.php HTTP/1.1 200 1473 10.0.7.17 - - [25/Jan/2002:09:02:52 +0700] POST /komplain/kirimform.php HTTP/1.1 200 1473 And this is my script : ? session_start(); $connect = mysql_connect (localhost,user,passwd) or die (Could not connect); $db = mysql_select_db(whodha, $connect) or die (Database Error, please contact your Administrator.); $sql=select * from aa_auth where user='$username' and passwd=PASSWORD('$password'); $query=mysql_query($sql,$connect); $num=mysql_num_rows($query); if ($num != 1 ) { session_unset(); session_destroy(); header(Refresh: 0;url=failed2.php); } else { ? html head titleSave Data/title /head body ? $year =date ( Y); $mnt =date ( m); $day =date ( d); $tanggal=$year.-.$mnt.-.$day; $jam = date ( H); $menit =date ( i); $detik =date ( s); $minggu= date(w); $times = $jam.:.$menit.:.$detik; if (@$definisi==){ $definisi=N/A; } else { $definisi=$definisi; } $sql=insert into komplain (tanggal,operator, shift, user_nama, masalah, definisi, ket_mas, status, cat_stat, jam, no_telp) values ('$tanggal','$nama','$shift','$namaplgn','$masalah','$definisi ','$catmas','$ status','$catps','$times','$telpfax'); mysql_query($sql,$connect); // } echo p align='center'; echo font size='+3'Terimakasih, $nama, telah mengisi trouble ticket./fontbrbr; echo Pilih font color='blue'Isi Ulang/font untuk mengisi form lagi, atau font color='blue'View Data/font untuk melihat data.; ? br |nbsp;a href=main.php onmousemove=window.status='Isi Ulang';return true onmouseout=window.status='Save Data';return true;Isi Ulang/anbsp; |nbsp;a href=view.php onmousemove=window.status='Data Komplain';return true onmouseout=window.status='Save Data';return true;View Data/anbsp;| ? include (footer.html); ? /body /html ? } ? - Original Message - From: Jerry Verhoef (UGBI) [EMAIL PROTECTED] To: 'M-H-d' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 6:29 PM Subject: RE: [PHP] POST 2X I think I speak for everone: HUH Maybe some more info? A piece of code? Some clear infomation on what is going wrong and when does this happen? And what action is happening two times? kind regards, Jerry Verhoef The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Novice question - Please Help
Take a look at split, explode -Original Message- From: brendan conroy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 1:10 PM To: [EMAIL PROTECTED] Subject: [PHP] Novice question - Please Help Hi, thanks for reading this. Ive looked at every php site and cant find an answer, youre my last hope!(ok so its not that serious, but pretty close!). Could someone please email me and tell me how to split a string into different arrays and save what they were split on? Also I cant get the sizeof function to work no matter what syntax i use, i think ive tried them all, do you have to include a library or something in your program to make it work? Thanks a million, this isint a frivilous question, I looked everywhere before i came here, thanks, Bren _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] session data vs cookie data
-Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 3:30 PM To: PHP Subject: [PHP] session data vs cookie data I have read elsewhere that depending on Cookie data for site authentication is false economy, because Cookie data can be spoofed. True I'm designing a login that auto-fills a person's name into a field for authentication (based on their $user_id, which is stored in the cookie), then they enter a password below that name and the fields are checked against data stored in MySQL. Standard authentication system. But from that point onward, I'd like to use a session variable that establishes the user's legitimacy as having logged in, using the cookie to store the SESSID. Barring the user spoofing the SESSID in the cookie, could someone easily fake legitimacy? I would think not, since the session data ($logged_in = 1 or something similar) is not stored in the cookie but rather on the server. But I just want to confirm. It is possible to steal a session because a session_id is usually based on a cookie. So I always store the IP, HTTP_X_FORWARD and USER_AGENT in the session. And check them every page. kind regards, Jerry I should mention that I have register_globals = off in php.ini (4.1.0 on Linux). Thanks, Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] session data vs cookie data
When that happens a user has to relogin. No data will be lost. Jerry -Original Message- From: Michael Kimsal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 3:53 PM To: Jerry Verhoef Cc: PHP Subject: Re: [PHP] session data vs cookie data Jerry Verhoef wrote: It is possible to steal a session because a session_id is usually based on a cookie. So I always store the IP, HTTP_X_FORWARD and USER_AGENT in the session. And check them every page. kind regards, Jerry Do you null the user if the IP changes? IPs can change during a user's session, so I wouldn't base the validity of the session solely based on IP. Michael Kimsal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Select box won't display in Netscape 4.xx
Did you forget the FORM /FORM tags? Jerry -Original Message- From: Martin Schichl [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 9:57 AM To: Edwin Boersma; [EMAIL PROTECTED] Subject: Re: [PHP] Select box won't display in Netscape 4.xx Dear Edwin! Yes, I have had this problem before ... My problem was, that I a line in my style sheets, which could not be solved by NS. (I think it was border?) Yours, Martin I'm developing a website for multiple browsers. In Netscape 4.xx (both Win98 and Linux versions), the php-scripts display the select boxes in my forms only as plain text. I cannot make any selections. In other browsers (NS 6 and IE5), it works fine. Anyone seen this behavior before? - Dipl.-Ing. Martin Schichl SCC Software, Communication Consulting GmbH Co KEG Grottenhofstr. 3, A-8053 Graz Tel. +43/(0)316/265-205, Fax +43/(0)316/265-234 [EMAIL PROTECTED], http://scc.co.at -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] RESOLVED(maybe):Warning: Cannot send session cookie
mysql_query($query) or die(mysql_error($link_identifier)); die stops the script. Or if you want a more subtile way you can try this $result_identifier=@mysql_query($query); if (!$result_identifier) { // Do some nice error handeling } Jerry Verhoef -Original Message- From: David Jackson [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 4:09 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] RESOLVED(maybe):Warning: Cannot send session cookie All -- It appears that the problem was a table design problems, my primary index wasn't set to auto-increment? So I was trying to insert records with duplicate keys !! This of course leads to another question, how do I return SQL error messages to the browser? Thanks, David -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] php code beautifier
What is a code beautifier? -Original Message- From: George Nicolae [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 1:47 AM To: [EMAIL PROTECTED] Subject: [PHP] php code beautifier do you know if exist a php code beautifier for win32? pls tell me the address. -- Best regards, George Nicolae IT Manager ___ X-Playin - Professional Web Design www.x-playin.f2s.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Modify someone else's session register
No Maybe you should consider database option or flat files to give info from one user to the another? Jerry Verhoef -Original Message- From: Alex Vargas [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 3:23 AM To: [EMAIL PROTECTED] Subject: [PHP] Modify someone else's session register Hi. Let's suppose I have 3 users in my site, each of them generating their respective session variables. Assuming I have a session variable named $variable, I'll end up in the server with 3 values: $variable_1, $variable_2 and $variable_3. My question is: is there a way I can change let's say the variable of the second user when the third user is running the php script? Can I access (and change) the session registers generated by the users? Thanks for your help, Alex. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Modify someone else's session register
this is an option but it will surely break easily. I am not completly sure, but i think that sessions variables are write to the session handler at the end of the script. (maybe one of guru's can clarify this?) But if this is true consider this: user 1: is running a script/requesting a page user 2: is writing to the session variables of user 1 user 1: script is ending and writing the session variables to the session handler. And writes over the modified session variables. Jerry Verhoef -Original Message- From: Dave Brotherstone [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 9:54 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Modify someone else's session register Not really, but you could... You would somehow have to get the session id from user 2 to user 3 (this would depend how your site worked). Then you could access the session variables - it depends how your sessions are stored. If they were stored in a database, then you could read them (by default they're in /tmp, in a fairly easy to follow format). I probably wouldn't recommend changing the variables in there (/tmp) though - but you could if they were held in a database. I believe you can change the session handler in order to do this, but I've never done it. Dave. -Original Message- From: Alex Vargas [mailto:[EMAIL PROTECTED]] Sent: 28 December 2001 02:23 To: [EMAIL PROTECTED] Subject: [PHP] Modify someone else's session register Hi. Let's suppose I have 3 users in my site, each of them generating their respective session variables. Assuming I have a session variable named $variable, I'll end up in the server with 3 values: $variable_1, $variable_2 and $variable_3. My question is: is there a way I can change let's say the variable of the second user when the third user is running the php script? Can I access (and change) the session registers generated by the users? Thanks for your help, Alex. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] backtracing of includes
Don't think that a option like this exists. But maybe you should consider using include_once or require_once Also before you define the function use the function_exist() and if the function already exists don't redecleare it. Jerry Verhoef -Original Message- From: Henning Sprang [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 2:24 PM To: [EMAIL PROTECTED] Subject: [PHP] backtracing of includes Hy, I would like to know if there is a way to get information on the include hierarchy of files in php, especially to find out where which file is included and trace back the line from some file until the first called php file. My special case here and now is that I get an error that some function is already declared and cannot be declared again because of this. I know i must have included the file with that function somewhere already, but as i have lots of nested includes I have trouble right now to find the place where ist already happens. I know I can prevent those things in future by using things as require_once and so on, and i can search through all the code, making yself a map on paper to see which file includes what, but what i really want to know is, if i can ask some function to tell me where the function which makes the error stated above and from where the file is included, and from where this file again is include, going as far back until i have my first-called php file. I hope you can understand what i mean, henning -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Generate Alphabet
Sorry for the late reply but maybe you should take a look at the function range. from the manual: foreach(range('a', 'z') as $letter) { echo $letter; } Jerry -Original Message- From: Daniel Harik [mailto:[EMAIL PROTECTED]] Sent: Monday, December 24, 2001 7:01 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Generate Alphabet Hello Fred, Tuesday, December 25, 2001, 7:55:16 PM, you wrote: F for ($Character = 65; $Character 91; $Character++) F { F echo chr($Character); F } F Fred F Daniel Harik [EMAIL PROTECTED] wrote in message F [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello Guys, Just a stupid question how can i make php show from a-z with a for loop, don't want to make 26 hard coded links Thank You very much -- Best regards, Daniel mailto:[EMAIL PROTECTED] Thank you -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Create a table with more than 1 column
I would have done it a different way, but it would look something like that this code has not been tested and is guaranteed to have bugs :) but it just to get you started on a different approach. $ultletra = ''; $row = 'tr'; while($resultado = $query-dados()) { $curletra = $resultado['letra']; if($counter++%3==0) { $row .= /trtr\n; } $row .= sprintf(\ntd\nimg src=\img/letras/%s.gif\ width=\24\ height=\24\\n/td,$curletra); $row .= sprintf(tda href=\interna.php?cat=%scelebID=%s\%s/a/td\n,urlencode($resultado[N ome_Categoria]),urlecode($resultado[CelebI D ]),$resultado['Nome_Artistico']) ; } while($counter++%30) $row .= sprintf(tdnbsp;/tdtdnbsp;/td); $row.=/tr; == Jerry Verhoef -Original Message- From: Miles Thompson [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 27, 2001 4:20 PM To: Rodrigo Peres; PHP Subject: Re: [PHP] Create a table with more than 1 column Rodrigo, Nice looking page. I'm not going to try and fix your logic, because you've approached it somewhat differently than I would. Here's my logic or pseudocode ... Set max_columns to 3 Set a letter variable While I have results While column_count is less than max_columns or letter is the same as old_letter Create a cell, fill it with data, echo it to screen Increment the column counter Set old_letter to this letter Otherwise Close the row, echo it Start a new row, echo it Reset column counter Set a letter variable That's roughly it. I've skipped putting in the cell for the letter graphic, you may want to do that in the Otherwise block. I've also skipped creation of the initial row, which would be done outside the while loop. I know this can be improved upon to make it more robust, but let's hope it gets you to your goal. Merry Christmas - Miles Thompson On Thursday 27 December 2001 10:22 am, Rodrigo Peres wrote: Hi list, I am in a big trouble. My deadline is coming and I couldn't solve my problem yet! I have this script that outputs a table that can be seen at http://www.celebnet.com.br/abc.php $ultletra = ''; $row = ''; while($resultado = $query-dados()) { $curletra = $resultado['letra']; if($curletra != $ultletra) { if (!empty($row)) { $row .= /tr\n; } $row .= tr\ntd\nimg src=\img/letras/$curletra.gif\ width=\24\ height=\24\\n/td\n/tr\n; } $row .= tda href=\interna.php?cat=$resultado[Nome_Categoria]celebID=$resultado[CelebI D ]\.$resultado['Nome_Artistico']./a/td\n; $ultletra = $curletra; } if (!empty($row)) { $row .= tr\n; } SQL is: SELECT categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico, lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN celebridades ON categorias.CategoriaID=celebridades.Categoria WHERE CategoriaID='1' ORDER BY Nome_Artistico My problem is that I need to modify the script to output a 3 column table. I have tried everything but nothing works, and I've tried also all url about PHP that i could found. Please I'll appreciate any help. Thank's in advance and happy new year to all!!! Rodrigo Peres (Brazil) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Mommy, is it true that...?
Ermmm are we forgetting the sprintf function? That is doing exactly what you are trying (and succedding) to accomplish if ($delete $id) $sql=sprintf(delete from tbl where id = %d,$id); Personally I also use a small extra security if ($delete $check==md5(SECURITYWORD . $delete)) $sql=sprintf(delete from tbl where id = %d,$delete); This makes sure that the person is using the correct path. Jerry -Original Message- From: Jaime Bozza [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 7:32 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Mommy, is it true that...? Another way I validate input is by using settype(); For instance: settype($id, integer); I use addslashes and settype on all data coming from a browser that ends up being using in a query. (abs will convert negative numbers, which may be what you want, but then again. G) Jaime Bozza -Original Message- From: Nathan Cassano [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 11:34 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Mommy, is it true that...? One thing that I do know is dangerous is deleting rows based on an integer field with an unprocessed value; Example: Delete row script ? if($delete $id){ delete from mytable where id = $id; } ? By simply appending an all inclusive sql clause. $id = 21421 or 1 = 1; Ca-Boom! The entire table has been deleted. Don't you feel dumb! Instead process the input. $id = abs($id); -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 5:40 PM To: [EMAIL PROTECTED] Subject: [PHP] Mommy, is it true that...? 2. Please enter your age: 25; drop database mysql Does this actually work? I've read at least a dozen articles telling people to get it in their blood not to trust users and addslashes to any king incoming data, as well as pass it as strings to mysql (insert into person set age='$age' instead of insert into person set age =$age). So I decided I had to test this: I wrote the code exactly as in the example; I provided the exact dangerous input (well, to be honest, I tried a select instead of drop mysql). When I tried it, the presumably dangerous situation degraded into a trivial MySQL error. It went something like You have an error near '; select 1+1'. Did you ever actually try this? Does it work on your system? Thanks in advance for the input! Bogdan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] arrays
Maybe you should take a look at XSL http://www.w3schools.com/xsl/ http://www.w3.org/Style/XSL/ -Original Message- From: php dood [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 2:04 AM To: [EMAIL PROTECTED] Subject: [PHP] arrays I'm trying to figure out how to parse an xml document, and convert it into html... i know how to parse in simple xml stuff for example easyeasy/easy is pretty easy to parse in, and i know how to code that, but when you start adding flags that i'm going to need variables for, example easy does=1 it=2easy/easy is not so easy. *** paste sample xml *** report gmt_date=1206082001 unix_date=992001907.00 location city=11531 forecast day_sequence=1 day_of_week=6 daylight=D date=060801 high_temp=24.78 low_temp=14.51 sky_desc=3 precip_desc=* temp_desc=8 air_desc=* uv_index=7 wind_speed=18.51 wind_dir=270 humidity=48 dew_point=12.01 comfort=25.28 rainfall=* snowfall=* precip_prob=0 icon=2 / forecast day_sequence=2 day_of_week=7 daylight=D date=060901 high_temp=20.34 low_temp=13.68 sky_desc=1 precip_desc=* temp_desc=7 air_desc=20 uv_index=7 wind_speed=18.51 wind_dir=270 humidity=57 dew_point=9.23 comfort=19.23 rainfall=* snowfall=* precip_prob=2 icon=1 / forecast day_sequence=3 day_of_week=1 daylight=D date=061001 high_temp=20.35 low_temp=12.01 sky_desc=3 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=56 dew_point=9.80 comfort=* rainfall=* snowfall=* precip_prob=1 icon=2 / forecast day_sequence=4 day_of_week=2 daylight=D date=061101 high_temp=20.34 low_temp=12.02 sky_desc=3 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=57 dew_point=10.34 comfort=* rainfall=* snowfall=* precip_prob=1 icon=2 / forecast day_sequence=5 day_of_week=3 daylight=D date=061201 high_temp=22.01 low_temp=13.12 sky_desc=3 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=55 dew_point=11.45 comfort=* rainfall=* snowfall=* precip_prob=1 icon=2 / forecast day_sequence=6 day_of_week=4 daylight=D date=061301 high_temp=23.12 low_temp=13.12 sky_desc=7 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=46 dew_point=9.79 comfort=* rainfall=* snowfall=* precip_prob=2 icon=2 / forecast day_sequence=7 day_of_week=5 daylight=D date=061401 high_temp=23.12 low_temp=13.68 sky_desc=7 precip_desc=* temp_desc=7 air_desc=* uv_index=7 wind_speed=* wind_dir=* humidity=49 dew_point=10.34 comfort=* rainfall=* snowfall=* precip_prob=3 icon=2 / /location -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP / SSL
I am sorry to say. But it is bullshit wot you are saying. I am quite sure that a 256 bit encryption can cracked (brute force way) by the big players (US, MS, etc) within a reasonable time say 2 or 3 months! And yes you can buy computers or clusters for 100.000 $. And they are 100 more likely 1000 times as fast as a PII 266. But if you take a look at the distributed.net project. They are working for the past 4 years to hack (bruteforce) the rc5-64. The distributed.net combined power is 90.427 MKeys/sec (that are 17.000 Athlon 1400 PC). This is an average the current power is 196.231 MKeys/sec (36.720 Atlon 1400). And keep in mind that distributed.net project is a bruteforce attempt on 64 Bit encryption! So is a 256 bit encryption safe? Yes. and No. Yes: it is quite safe for a bruteforce attempt, it will take about 30 years for distributed.net. No: Most secure encryption methods have sort cuts to hack the code, atleast for DES, Blowfish and several other popular encryption methods. So what should we use? Banking companies demand a 128 bit encryption (in the Netherlands, other countries don't know). For my CMS I am satisfied with an 40 bit encryption. It is a matter of a risk/cost evalution. How much risk is there and if an anomaly occurs how much does it cost me? My advise always use atleast 40(128 is better :) ) bit SSL3 encryption, because SSL2 and lower have some bugs which make it possible to steal a session between users and server. Jerry -Original Message- From: TD - Sales International Holland B.V. [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 7:05 PM To: Jon Farmer; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] PHP / SSL On Thursday 20 December 2001 15:37, Jon Farmer stuffed this into my mailbox: 256 bit encryption should be crackable by not too much more people than Microsoft, the US government, China and perhaps some others with shitloads of money that CAN dissapear (within reasonable time). Else there will be questions. Personally I found it hard to believe as well. But I'm told that you can have the same power for like $ 100.000,- by buying the best price/performance now. Make no mistake, those machines only need a mainboard, cpu, cooler, powersupply and a network card. Even better, we're thinking about x86 hardware (you and me) be appearantly there is hardware on the market that was specifically crafted to decrypt stuff brute force. One of those would probably match like a 100 or maybe even a 1000 of the P-II 266 distributed.net has. Now if you're sure you can make $ 200.000,- by the credit card numbers/other info you gain from cracking it, it is already worth the effort. Btw, an Athlon 1400 does 5,3 MKeys per SECOND (RC5-64)!! and those are damn cheap... I urge you strongly to advise against that. Although it might be possible to downgrade your encryption to 40bit I'd like to make you aware of the fact that DES which is 56 bit encryption if I'm not mistaken was cracked several times by brute force in UNDER 22 hours by the distributed.net people (www.distributed.net). Therefore I would NOT consider 40 bits encryption safe and I feel obligated to make you aware of that. You are warned now :-) so do as you please. Erm, yeah true but by their own admission they used the equivalant of 16 PII 266Mhz machines to accomplish this. If you think someone is going to want your data and has those kinda resources available then yeah go for higher. However if thats your worry where are you going to stop in the length of your key? If your that paranoid then it shouldn't be using public networks in the first place!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Login Script
Line 10 is? $sid (login($user, $pass)); --- missing = -Original Message- From: Necro [mailto:[EMAIL PROTECTED]] Sent: Friday, December 21, 2001 1:40 PM To: [EMAIL PROTECTED] Subject: [PHP] Login Script Lo all, I am trying to get the following script to work.. ? if ($HTTP_POST_VARS[action] == 1) { checklogin($HTTP_POST_VARS[user_name], $HTTP_POST_VARS[password]); exit; } function checklogin($user, $pass) { $sid (login($user, $pass)); if ($sid != -1) { header(Location: http://localhost/hq.php?sid=$sid;); } else { header(Location: http://localhost/error.php;); } } function login($user, $pass) { $db = zoner2; $SQL = SELECT * FROM users WHERE user_name='.$user.' AND password='.$pass.'; $connection = db_connect(); $query = mysql_db_query($db, $SQL, $connection); if (mysql_num_rows($query) != 1) { return -1; } $row = mysql_fetch_array($query); $user_id = $row[user_id]; $sid = md5(blah blah.$user_id.$time()); $remip = REMOTE_ADDR(); $ttime = date(YmdHis); $SQL2 = INSERT INTO details ; $SQL2 = $SQL2 . (user_id, sid, ttime, remip) VALUES ; $SQL2 = $SQL2 . ('$user_id','$sid','$ttime','$remip') ; ### $result2 = mysql_db_query($db,$SQL2,$connection); if (!$result2) { echo(ERROR: . mysql_error() . \n$SQL\n); mysql_close($cid); exit; } ### SetCookie(TheLoginCookie, $user_id:$sid:$ip, time()+3600); return $sid; } ? But every time I open the login page and try to login I get the following error. Fatal error: Call to undefined function: () in d:\htdocs\web\login1.inc on line 10 Can anyone explain why this is?? Thankyou. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Limit script memory usage !!
There is a setting in de php.ini called memory_limit. Remember it is in bytes! Jerry -Original Message- From: Nicolas Guilhot [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 4:09 PM To: Php General MailingList Subject: [PHP] Limit script memory usage !! Hi all, I need to limit the amount of memory that a script can use. Is there a function that I can use to tell the script to die if its memory usage becomes greater than $MAX_MEMORY ! Or maybe, I could use a cron job to monitor processes and kill them if they become too big ? Thanks for your help. Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Arrays/Hashes
You forgot the printf method printf(Some text %sBR\n,$myhash['mykey']); Jerry -Original Message- From: jimtronic [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 5:59 PM To: TD - Sales International Holland B.V. Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Arrays/Hashes I've noticed this, too. There are at least two things you can do to make them work... print(Some text {$myhash['mykey']}BR\n) or print(Some text .$myhash['mykey'].BR\n) jim Hey there, sortta simple question... Is it just me or can't you access hashes within strings? This works... print(Some text $myarray[0]BR\n); This doesn't print(Some text $myhash['mykey']BR\n); i'm asking in relation to databases (not that that matters). If i fetch a row from the database I can use the $array[0], [1], etc in the print statements if i use mysql_fetch_array (oh sorry, u people call it associative arrays instead of hashes, my mistake) i can't access $array['fieldname'] from within a print statement but I CAN do $DBID = $resultarray['idfieldname']; and then use $DBID. regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: max # of characters for links to work in emails?
The maximum allowed of characters in a domain name is 3 (www) + 64 (domainname) + 3 (tld) = 70 chars. So if you try to limit it within the 70 chars you should be safe. Jerry -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 6:10 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: max # of characters for links to work in emails? a good guess would be every email client does it differnetly. unfort Id have to say try it yourself. Id imagine its long enough that you shouldnt have to worry about it, but I could be wrong. -- Chris Lee [EMAIL PROTECTED] Tom Churm [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi, i'm working on an eCard project and somehow need to find out what the reasonable limit is on characters for urls in email bodies (normal text, not mime). i know that some mail clients will cut off urls that are too long or else throw a line break in the middle of them--thus rendering them 'unclickable'. and this is exactly what i wanna avoid. anyone have any advice to offer in this area? muchos gracias, tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: MySQL Native Function in PHP Query Not Working?
LAST_INSERT_ID() only works in a select. This should be the correct syntax, but MySQL 3.xx.xx doesnot support SubQueries. I believe that MySQL 4 does or will in the near future. SELECT * FROM table WHERE aid=(SELECT LAST_INSERT_ID()) Jerry Verhoef -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 6:45 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: MySQL Native Function in PHP Query Not Working? that command doesnt even work from the mysql command prompt for me, Ive never used LAST_INSERT_ID(), but it dont work for me. try it on your mysql command prompt. -- Chris Lee [EMAIL PROTECTED] Ise [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Can someone explain to me why the below SQL query when executed with the PHP mysql functions does not work? (it returns nothing) SELECT * FROM table WHERE aid=LAST_INSERT_ID() If I replace the MySQL function LAST_INSERT_ID() with a integer, it works fine so its not the query. Further, I was returned results on the above query when I ran it directly from a MySQL client. Does PHP not support certain MySQL native functions? Thanks, Michael Caplan Institute for Social Ecology http://www.social-ecology.org/ 1118 Maple Hill Road Plainfield, VT, 05667 USA Tel.: 1 (514) 421-3515 General Tel. / Fax.: 1 (802) 454-8493 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: max # of characters for links to work in emails?
There are even more variants possible. But I am trying to get into the minds of the programmers of the Email clients, what THEY would consider the biggest allowed URL. But of course an URL could be bigger (2kb if my memory serves me correctly) And the Question was: max # of characters for links to work in emails? And my answers is: Stay within the 70 chars and you should be safe Jerry Verhoef -Original Message- From: Richard Black [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 9:50 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: max # of characters for links to work in emails? Don't think thats necessarily true - what about news.bbc.co.uk or games.yahoo.com. Neither of them fits into the spec you described there... Richy -Original Message- From: Jerry Verhoef (UGBI) [SMTP:[EMAIL PROTECTED]] Sent: 19 December 2001 08:41 To: 'Chris Lee'; [EMAIL PROTECTED]; '[EMAIL PROTECTED]' Subject:RE: [PHP] Re: max # of characters for links to work in emails? The maximum allowed of characters in a domain name is 3 (www) + 64 (domainname) + 3 (tld) = 70 chars. So if you try to limit it within the 70 chars you should be safe. Jerry -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 6:10 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: max # of characters for links to work in emails? a good guess would be every email client does it differnetly. unfort Id have to say try it yourself. Id imagine its long enough that you shouldnt have to worry about it, but I could be wrong. -- Chris Lee [EMAIL PROTECTED] Tom Churm [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi, i'm working on an eCard project and somehow need to find out what the reasonable limit is on characters for urls in email bodies (normal text, not mime). i know that some mail clients will cut off urls that are too long or else throw a line break in the middle of them--thus rendering them 'unclickable'. and this is exactly what i wanna avoid. anyone have any advice to offer in this area? muchos gracias, tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: Re: [PHP] Passing through Array's to another script
Maybe you should take a look at serialize and unserialize? http://nl.php.net/manual/nl/function.serialize.php http://nl.php.net/manual/nl/function.unserialize.php With serialize you translate a variable to a string. With unserialize you translate it back to the original variable Jerry Verhoef -Original Message- From: TD - Sales International Holland B.V. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 10:03 PM To: [EMAIL PROTECTED] Subject: Fwd: Re: [PHP] Passing through Array's to another script -- Forwarded Message -- Subject: Re: [PHP] Passing through Array's to another script Date: Tue, 18 Dec 2001 22:01:53 +0100 From: TD - Sales International Holland B.V. [EMAIL PROTECTED] To: gkin [EMAIL PROTECTED] On Tuesday 18 December 2001 14:43, you wrote: Ok I'm a newbie but there some things I think I can point out. why does your ACTION have a GET method URL??? the ?xtabel should be filled in by the form not by you. Second you can't access arrays like print($xtabel) that will only print the constant Array not the values in there, you're gonna need a loop for that. I think the best solution for you would be to create sessions and register the array within the session. And like I said, making a POST form with a GET URL attached to it makes no sense to me at all. What you could try, but I'm guessing here is the following. print(FORM METHOD=POST ACTION=\script.php\\n); $val = current($xtabel); print(INPUT TYPE=HIDDEN NAME=xtabel[] VALUE=\$val\\n); /* You need the [] at xtabel cuz else the older value will be overwritten, this will make it clear to PHP that it's an array/hash*/ while ($val = next($xtabel) { print(INPUT TYPE=HIDDEN NAME=xtabel[] VALUE=\$val\\n); } print(INPUT TYPE=SUBMIT NAME=SUBMIT\n); print(/FORM); I HAVE NOT!!! tested this but I think it might work. Since I didn't check it might have some typos, you'll have to try I'm low on time and like I said I'm new to this also, so no guarentees :-). Kind regards I want to pass through an array with content to another script. The array is correctly filled with data. To do this I use the following code: FORM METHOD='post' ACTION='script.php?xtabel = ? print($xtabel); ?' The content of the array is not recognised in the script.php. What is the best way to do this? --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: problem finding out original filename while using php to upload.
You could also use the function getimagesize this will tell what kind of image it is, and if it is not an image it will return false. GD LIB is NOT needed for getimagesize. Kind Regards, Jerry Verhoef -Original Message- From: Daniel Grace [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 6:52 AM To: [EMAIL PROTECTED] Subject: Re: problem finding out original filename while using php to upload. Neil M [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am using php to upload image files. heres my code .. ? if (is_uploaded_file($photo_file)) { clearstatcache (); $size = filesize ( $photo_file ) ; if ( $size 1024000 ) { print (BR ERROR - File is too big ! File uploads should be below 1024 k ( 1mb ) BR); exit ; } move_uploaded_file($photo_file, $upload_path$check_nick-nickname); } else { echo BR ERROR : File upload was not successfull , please try again !BR; } ? -- the problem is that when i look for the original filename ( e.g. myphoto.gif ) , $photo_file contains a random file name like 383hr93php As i mentioned , its image files i am uploading , how do i know what type of image the file was ? like .jpg , .png etc. Any help appreciatted , i am really stuck on this ;0) Thanks Neil M $photo_file will map to the name of the temporary file on the server's HD -- it is NOT the name of the original file. You'll want to use $photo_file_name to determine the original filename, or better yet, $photo_file_type to determine the content type. (a gif is image/gif, for instance). See http://www.php.net/manual/en/features.file-upload.php -- Daniel Grace echo make_witty_sig($foo) . \n; The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]