Re: [PHP] Where to insert a phrase in the right place

2007-04-10 Thread Jan Brucek
Hi, it seems that you set the $_SESSION['greeted'] variable and do not unset it anywhere. If user wants to log-in, and his credentials are OK, you then create session and set this varaible you want. If it isn't OK, you need to unset the variable or/and destroy the session so that the variable

Re: [PHP] ribs (rsync) problem

2007-04-10 Thread Chris
Sebe wrote: anyone here using the ribs php rsync script? There is a google group for it http://www.rustyparts.com/ribs.php So ask there. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] redirect http to https

2007-04-10 Thread Chris
?php if($_SERVER['SERVER_PORT'] !== $encport || $_SERVER['HTTPS'] !== on) {header(Location: https://.$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']);exit;} ? Very bad solution. Don't just tell us it's bad, explain why (even with an RTFM or URL to look at)... nobody learns from an answer

[PHP] Re: 0x9f54

2007-04-10 Thread Man-wai Chang
On the other hand, I remember you talked about the type of that column to be char(2). Have you specified what encoding it's using? Moreover, I hope you're not using legacy encoding like Big5 or GB. Use Unicode (UTF-8) if your database is a brand new one. Unfortunately, I am still using

[PHP] Re: 0x9f54

2007-04-10 Thread Man-wai Chang
Well, show us a part of your code. Do var_dump($value) before you enter it into the database, and see if it still says 0x9f54. The error: string(2) Duplicate entry '' for key 1 -- .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org / v \ Simplicity is Beauty! May the Force

[PHP] Re: 0x9f54

2007-04-10 Thread Man-wai Chang
screenshot of the error: -- .~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Ubuntu 6.10) Linux 2.6.20.6 ^ ^ 19:25:01 up 3 days 2:16 1 user load average: 1.03 1.08 1.08 news://news.3home.net

Re: [PHP] SimpleXML end of element/tag error

2007-04-10 Thread Don Don
the code section is displayed below $xml = simplexml_load_file($_POST['feedurl']); foreach($xml-TT as $TT) { foreach($TT-TOTS as $TOTS) { $cnt++; foreach($TT-TOTS[$cnt]-attributes() as $a = $b) // problematic line. {

Re: [PHP] keeping credit card info in session

2007-04-10 Thread Eric Butera
On 4/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks a lot every one. These are great replies. I guess I should have explained a bit more about what I'm doing. first of all, this is not my site, it's for a client of mine. second, I did suggest using a paypal API or a paid site to take

Re: [PHP] Session Authentication

2007-04-10 Thread tedd
At 7:07 PM +0200 4/9/07, Tijnema ! wrote: On 4/9/07, tedd [EMAIL PROTECTED] wrote: At 5:55 PM +0200 4/9/07, Tijnema ! wrote: Cookies are old, so in the time they were introduced, today it is possible to create and modify cookies with some good tools. These tools are illegal, I don't

Re: [PHP] mysql if empty

2007-04-10 Thread tedd
At 10:18 PM +0100 4/9/07, [EMAIL PROTECTED] wrote: If I search for something in mysql that returns an empty result I cant get it to return No result found always returns Found even though the recoed does not exist... $sql = SELECT Client FROM booked WHERE Name = 'larry'; $result =

Re: [PHP] Re: keeping credit card info in session

2007-04-10 Thread itoctopus
Encryption is a mandatory part of PCI compliance... -- itoctopus - http://www.itoctopus.com Jim King [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does encrypting credit card information really do any good? You have to store the keys somewhere to decrypt the data to use it. As

Re: [PHP] Question on Portfoilo's

2007-04-10 Thread clive
Larry Garfield wrote: This is why one should work on an open source project. Much easier to show off legally. :-) unfortunately we aren't all fortunate enough to work for an open source project and earn a living, except Paul of course. Regards, Clive. {No electrons were harmed in the

Re: [PHP] MD5 bot Question

2007-04-10 Thread tedd
At 8:10 PM -0400 4/9/07, Robert Cummings wrote: On Mon, 2007-04-09 at 17:14 -0400, tedd wrote: At 4:39 PM -0400 4/9/07, Robert Cummings wrote: On Mon, 2007-04-09 at 22:27 +0200, Tijnema ! wrote: This is exactly what tedd did in his last arrow example. He edited the header of the GIF

Re: [PHP] redirect http to https

2007-04-10 Thread Zoltán Németh
I have separate document roots for the http and the https stuff, say htdocs and htdocs-secure - this can be done with apache configuration then I need only to put a single redirecting line into the htdocs/index.php like ?php header(Location: https://my.server.com/;); ? and that's all greets

Re: [PHP] MD5 bot Question

2007-04-10 Thread Ólafur Waage
You were talking about an OCR reader for the arrows to see what letters it is pointing to. If the arrow would be at a random location in the actual image, the arrow being not an arrow but ie. a man pointing and the arm being flexible (so even if the man himself would move around randomly, the arm

Re: [PHP] MD5 bot Question

2007-04-10 Thread tedd
At 10:46 PM +0100 4/9/07, Tijnema ! wrote: On 4/9/07, tedd [EMAIL PROTECTED] wrote: It doesn't need to be complicated, just random placed pixels on the image from a selection of colors would provide millions of permutations. Cheers, tedd But then OCR would still work, as when somebody scans

[PHP] Dates and different time zones

2007-04-10 Thread Niklas Karlsson
Hello, I am creating an international site that is going to get used in both American and Europe. And I wonder how to handle the different time zones, because I want the date and time to be correct after the place your using the application. I now have the date_default_timezone_set() to

Re: [PHP] redirect http to https

2007-04-10 Thread Jason Karns
On 4/10/07, Zoltán Németh [EMAIL PROTECTED] wrote: I have separate document roots for the http and the https stuff, say htdocs and htdocs-secure - this can be done with apache configuration then I need only to put a single redirecting line into the htdocs/index.php like ?php header(Location:

Re: [PHP] keeping credit card info in session

2007-04-10 Thread tedd
At 8:05 AM -0400 4/10/07, Eric Butera wrote: Did you know sessions are just plain text files sitting on the webserver in most cases? So by putting a credit card in the session it is actually just cleartext for people to read. Yes, all files reside somewhere. Session files reside on the

RE: [PHP] Dates and different time zones

2007-04-10 Thread Jay Blanchard
[snip] So a wonder who to handle different time zones? Have any of your experience of this? [/snip] The server lives in one time zone and therefore cannot handle multiples unless there is some new widget available for this. There are a couple of methods available; 1. Use JavaScript to capture

[PHP] Decoding from unknown charsets (inc. ks_c_5601-1987)

2007-04-10 Thread Edward Kay
I have an app that stores email messages in a database. The app and DB are UTF-8 but obviously the emails can be in a variety of character sets. Most can be converted easily using mb_convert_encoding or iconv but I have some emails encoded as ks_c_5601-1987, which neither of these two functions

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Davey
Niklas Karlsson wrote: I am creating an international site that is going to get used in both American and Europe. And I wonder how to handle the different time zones, because I want the date and time to be correct after the place your using the application. I now have the

[PHP] Re: keeping credit card info in session

2007-04-10 Thread Jim King
itocopus: I stand corrected! This document is the PCI self-assessment questionnaire for smaller merchants: https://www.pcisecuritystandards.org/pdfs/pci_saq_v1-0.pdf It lays out the requirements in detail (including encryption/ truncation) in one place and should answer all of the OP's

[PHP] Location of .so files on Linux box

2007-04-10 Thread Miles Thompson
This probably belongs in php-install, but here goes. Where should extension files be located? In php.ini the default entry for extension_dir is: extension_dir= ./ That's fine, but relative to which directory (locations in parentheses)? Where php.ini is located? (/usr/share/lib) Where

Re: [PHP] Dates and different time zones

2007-04-10 Thread Satyam
- Original Message - From: Richard Davey [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, April 10, 2007 3:43 PM Subject: Re: [PHP] Dates and different time zones Niklas Karlsson wrote: I am creating an international site that is going to get used in both American

Re: [PHP] Dates and different time zones

2007-04-10 Thread Lester Caine
Satyam wrote: Store all of your dates as GMT. Perform all date based calculations around GMT also, and then offset the values for localised display only. This way you only need to store the GMT offsets for each user, i.e. GMT+1 or GMT-8 when it comes to displaying the dates to them. The

[PHP] Outlook task via email

2007-04-10 Thread Chris Boget
I've done some searching on Google but haven't been able to come up with anything helpful. Has anyone on the list done any work on sending an Outlook Task as part of an email? Or does anyone know of a good resource that shows how this can be done? I'm going to be using PHP's mail() to

[PHP] uk date to mysql date and back again

2007-04-10 Thread Ross
I have made a very messy function for this that splits the string up does all kinds of stuff but I was wondering if anyone has a 1 or 2 line function for gettting a uk date dd/mm/ (it is a string)to mysql version -MM-DD and then back again. ta, R. -- PHP General Mailing List

Re: [PHP] uk date to mysql date and back again

2007-04-10 Thread Stut
Ross wrote: I have made a very messy function for this that splits the string up does all kinds of stuff but I was wondering if anyone has a 1 or 2 line function for gettting a uk date dd/mm/ (it is a string)to mysql version -MM-DD and then back again. Assuming you can guarantee

Re: [PHP] uk date to mysql date and back again

2007-04-10 Thread Jan Brucek
Hi, maybe what you are looking for are functions strtotime() and date(). Since PHP5.1 you can also define timezone through date_default_timezone_set(). J. Ross wrote: I have made a very messy function for this that splits the string up does all kinds of stuff but I was wondering if anyone

Re: [PHP] uk date to mysql date and back again

2007-04-10 Thread Zoltán Németh
2007. 04. 10, kedd keltezéssel 15.59-kor Ross ezt írta: I have made a very messy function for this that splits the string up does all kinds of stuff but I was wondering if anyone has a 1 or 2 line function for gettting a uk date dd/mm/ (it is a string)to mysql version -MM-DD what

Re: [PHP] Location of .so files on Linux box

2007-04-10 Thread Børge Holen
On Tuesday 10 April 2007 15:24, Miles Thompson wrote: This probably belongs in php-install, but here goes. Where should extension files be located? In php.ini the default entry for extension_dir is: extension_dir= ./ That's fine, but relative to which directory (locations in

Re: [PHP] Dates and different time zones

2007-04-10 Thread Satyam
- Original Message - From: Lester Caine [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, April 10, 2007 4:37 PM Subject: Re: [PHP] Dates and different time zones Satyam wrote: Store all of your dates as GMT. Perform all date based calculations around GMT also, and

Re: [PHP] MD5 bot Question

2007-04-10 Thread tedd
At 12:55 PM + 4/10/07, Ólafur Waage wrote: You were talking about an OCR reader for the arrows to see what letters it is pointing to. If the arrow would be at a random location in the actual image, the arrow being not an arrow but ie. a man pointing and the arm being flexible (so even if the

[PHP] Re: uk date to mysql date and back again

2007-04-10 Thread Ross
Thanks all. Was not aware of the array_reverse() function. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Dates and different time zones

2007-04-10 Thread Niklas Karlsson
Thanks for good answers. Okay, so I should set the default time zone to central GMT time, and then save GMT offset for every user. This sounds realistic, because I don't think that I need to correct the time for users that doesn't login. So, if I now have the GMT offset for every user, how do I

Re: [PHP] Re: 0x9f54

2007-04-10 Thread Seak, Teng-Fong
Man-wai Chang wrote: On the other hand, I remember you talked about the type of that column to be char(2). Have you specified what encoding it's using? Moreover, I hope you're not using legacy encoding like Big5 or GB. Use Unicode (UTF-8) if your database is a brand new one.

Re: [PHP] Re: 0x9f54

2007-04-10 Thread Seak, Teng-Fong
Seak, Teng-Fong wrote: Anyway, you should look at the positive side of using Unicode instead of the dinosaur encoding, sorry, I mean Big5 :p Hard drives (and RAM) nowadays are getting real big, string size should be I wanted to mean: string size should NOT be considered . :p

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Davey
Niklas Karlsson wrote: Okay, so I should set the default time zone to central GMT time, and then save GMT offset for every user. This sounds realistic, because I don't think that I need to correct the time for users that doesn't login. So, if I now have the GMT offset for every user, how do I

Re: [PHP] Dates and different time zones

2007-04-10 Thread Lester Caine
Satyam wrote: Of cause the major fault with this is that it can only display the CURRENT time offset. You *ALSO* need the users Daylight Saving Zone as well. This has been giving us great fun since the winter dates and times need a different offset to the summer ones. Something that

Re: [PHP] Dates and different time zones

2007-04-10 Thread Satyam
- Original Message - From: Niklas Karlsson [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, April 10, 2007 5:32 PM Subject: RE: [PHP] Dates and different time zones Thanks for good answers. Okay, so I should set the default time zone to central GMT time, and then save

Re: [PHP] Dates and different time zones

2007-04-10 Thread Satyam
You are totally right, I am sorry. I would hate to miss my plane or train due to such mistake. Satyam - Original Message - From: Lester Caine [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, April 10, 2007 6:29 PM Subject: Re: [PHP] Dates and different time zones

Re: [PHP] mysql if empty

2007-04-10 Thread Jim Lucas
[EMAIL PROTECTED] wrote: If I search for something in mysql that returns an empty result I cant get it to return No result found always returns Found even though the recoed does not exist... $sql = SELECT Client FROM booked WHERE Name = 'larry'; $result = mysql_query($sql); if ($result ==

Re: [PHP] MD5 bot Question

2007-04-10 Thread Robert Cummings
On Tue, 2007-04-10 at 08:47 -0400, tedd wrote: At 8:10 PM -0400 4/9/07, Robert Cummings wrote: On Mon, 2007-04-09 at 17:14 -0400, tedd wrote: At 4:39 PM -0400 4/9/07, Robert Cummings wrote: On Mon, 2007-04-09 at 22:27 +0200, Tijnema ! wrote: This is exactly what tedd did in his

Re: [PHP] MD5 bot Question

2007-04-10 Thread Robert Cummings
On Tue, 2007-04-10 at 13:13 -0400, Robert Cummings wrote: On Tue, 2007-04-10 at 08:47 -0400, tedd wrote: Rob: Your use of metaphor is quite colorful, but if you if change a single pixel in an image, then you change the MD5 signature -- that is what I was talking about -- and that

RE: [PHP] Question about OO design

2007-04-10 Thread Chris W. Parker
On Monday, April 09, 2007 4:24 PM Jochem Maas mailto:[EMAIL PROTECTED] said: Ok. I see what you're saying. If I populate all that data during the constructor why would I ever call the function again right? you could refresh the data if needed - but basically the idea is to cut down the user

[PHP] Oputting Forms Within a Class

2007-04-10 Thread CK
Hi All, Experimenting with OOP PHP,please be gentle. Attempting to output a form within a class: From calculator.php: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta

Re: [PHP] Oputting Forms Within a Class

2007-04-10 Thread Brad Bonkoski
CK wrote: Hi All, Experimenting with OOP PHP,please be gentle. Attempting to output a form within a class: From calculator.php: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml;

[PHP] coding MySQL error traps [WAS: mysql if empty]

2007-04-10 Thread Paul Novitski
$sql = SELECT Client FROM booked WHERE Name = 'larry'; $result = mysql_query($sql) OR die('[MYSQL ERROR] - ['.mysql_errno().']br /'.mysql_error()); while ( list($client) = mysql_fetch_row($result) ) { echo {$client}br /\n; } I agree with this logic overall. The above is of

Re: [PHP] coding MySQL error traps [WAS: mysql if empty]

2007-04-10 Thread Jim Lucas
Paul Novitski wrote: $sql = SELECT Client FROM booked WHERE Name = 'larry'; $result = mysql_query($sql) OR die('[MYSQL ERROR] - ['.mysql_errno().']br /'.mysql_error()); while ( list($client) = mysql_fetch_row($result) ) { echo {$client}br /\n; } I agree with this logic overall.

Re: [PHP] Oputting Forms Within a Class

2007-04-10 Thread Richard Davey
CK wrote: private function buildInt(){ !--Script 10.1- calculator.php-- form action=calculator.php method=post //Form elements omitted for brevity /form } } ? This is returned to the browser: Parse error: syntax error, unexpected '' in

Re: [PHP] Oputting Forms Within a Class

2007-04-10 Thread Davi
Em Terça 10 Abril 2007 14:49, CK escreveu: Hi All, Experimenting with OOP PHP,please be gentle. Attempting to output a form within a class: From calculator.php: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html

[PHP] Array remove function?

2007-04-10 Thread Tijnema !
Hi, Is there currently a function that removes a key/value from an array? I use this code right now: function array_remove($array,$remove,$remove_value = true) { foreach($array as $key = $value) { if($remove_value $value != $remove) {

Re: [PHP] Array remove function?

2007-04-10 Thread Richard Lynch
http://php.net/unset On Tue, April 10, 2007 2:49 pm, Tijnema ! wrote: Hi, Is there currently a function that removes a key/value from an array? I use this code right now: function array_remove($array,$remove,$remove_value = true) { foreach($array as $key = $value) {

Re: [PHP] Array remove function?

2007-04-10 Thread Tijnema !
On 4/10/07, Richard Lynch [EMAIL PROTECTED] wrote: http://php.net/unset That works when you know the key, but will that work when you only know the value? Tijnema On Tue, April 10, 2007 2:49 pm, Tijnema ! wrote: Hi, Is there currently a function that removes a key/value from an array?

Re: [PHP] MD5 bot Question

2007-04-10 Thread tedd
At 1:17 PM -0400 4/10/07, Robert Cummings wrote: -snip- That should have read: ... since no subset of... Oh well, now it makes sense ! :-) Actually, I see exactly what you are saying. If you take a small portion of a file and MD5 it, it will give you a signature. If I simply change a

Re: [PHP] MD5 bot Question

2007-04-10 Thread Tijnema !
On 4/10/07, tedd [EMAIL PROTECTED] wrote: At 1:17 PM -0400 4/10/07, Robert Cummings wrote: -snip- That should have read: ... since no subset of... Oh well, now it makes sense ! :-) Actually, I see exactly what you are saying. If you take a small portion of a file and MD5 it, it will give you

[PHP] PHP Directory List Script Files over 2 GB

2007-04-10 Thread Robert M
Hello everyone My OS information is PHP Version 5.1.6 Apache/2.2.2 (Fedora) Fedora Core 5 Kernel 2.6.20-1.2307.fc5 I am having some trouble with a script that displays files within a directory. the script does not appear to be displaying large files and the date thaty is displayed on these

RE: [PHP] Array remove function?

2007-04-10 Thread Daevid Vincent
While that is true, you need to know the key, you could do something like this, which I think is more efficient than your way... foreach($array as $key = $value) { if ($value == $remove) { unset($array[$key]); //if you know there is only one hit,

RE: [PHP] Array remove function?

2007-04-10 Thread Buesching, Logan J
Something along these lines? $flipped=array_flip($arr); unset($flipped[$val]) return array_flip($flipped); From the manual of array_flip: If a value has several occurrences, the latest key will be used as its values, and all others will be lost. -Logan -Original Message- From: Tijnema

Re: [PHP] Array remove function?

2007-04-10 Thread Lori Lay
Tijnema ! wrote: On 4/10/07, Richard Lynch [EMAIL PROTECTED] wrote: http://php.net/unset That works when you know the key, but will that work when you only know the value? Tijnema Use array_search() and unset()? Lori On Tue, April 10, 2007 2:49 pm, Tijnema ! wrote: Hi, Is there

[PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread revDAVE
I apologize in advance, however I know almost nothing about PHP - ( but I am trying to learn now)... I am wondering if it is possible to create a PHP page that can: 1 - Get the contents of everything in its own folder at the same level ( just list sub folders filenames - not their contents) 2

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread Brad Bonkoski
revDAVE wrote: I apologize in advance, however I know almost nothing about PHP - ( but I am trying to learn now)... I am wondering if it is possible to create a PHP page that can: 1 - Get the contents of everything in its own folder at the same level ( just list sub folders filenames - not

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread Tijnema !
On 4/10/07, revDAVE [EMAIL PROTECTED] wrote: I apologize in advance, however I know almost nothing about PHP - ( but I am trying to learn now)... I am wondering if it is possible to create a PHP page that can: 1 - Get the contents of everything in its own folder at the same level ( just list

RE: [PHP] Array remove function?

2007-04-10 Thread Daevid Vincent
OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) -Original Message- From: Lori Lay [mailto:[EMAIL PROTECTED] Use array_search() and unset()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Array remove function?

2007-04-10 Thread tg-php
Unset works, but if he's trying to do a search and remove in one function, unset is a step removed from that criteria (missing the 'search' part). Looking at the array functions, I see some potential. # array_remove(array(1=2,2=3),2,true); // array (2=3) // Keep all but where values = 2

Re: [PHP] Array remove function?

2007-04-10 Thread Tijnema !
On 4/10/07, Daevid Vincent [EMAIL PROTECTED] wrote: OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) -Original Message- From: Lori Lay [mailto:[EMAIL PROTECTED] Use array_search() and unset()? Interesting, I didn't thought of that :) But

Re: [PHP] Array remove function?

2007-04-10 Thread Lori Lay
Tijnema ! wrote: On 4/10/07, Daevid Vincent [EMAIL PROTECTED] wrote: OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) -Original Message- From: Lori Lay [mailto:[EMAIL PROTECTED] Use array_search() and unset()? Interesting, I didn't thought

[PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Otto Wyss
I don't know if I should ask this question here or in the JavaScript group. I'll try it here since people usually are more helpful. I've an array of file names $files = getFiles ($d); but would like to use this array in a JavaScript array. How can I copy this $files into a JavaScript

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread revDAVE
On 4/10/2007 1:13 PM, Tijnema ! [EMAIL PROTECTED] wrote: http://www.php.net/manual/en/function.scandir.php 2 - List/ display the contents on the same Web-page http://www.php.net/manual/en/function.file-get-contents.php WOW COOL - That was quick - thanks Tijnema Brad! From here:

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread Tijnema !
On 4/10/07, revDAVE [EMAIL PROTECTED] wrote: On 4/10/2007 1:13 PM, Tijnema ! [EMAIL PROTECTED] wrote: http://www.php.net/manual/en/function.scandir.php 2 - List/ display the contents on the same Web-page http://www.php.net/manual/en/function.file-get-contents.php WOW COOL - That was

RE: [PHP] PHP Directory List Script Files over 2 GB

2007-04-10 Thread Buesching, Logan J
I didn't take too much time to look at this, but I believe that where you see: --- sprintf(_f('%s',%d, . --- Try and change that to: --- sprintf(_f('%s',%u, . --- From what information you provided, it seems that this is what would work. -Logan -Original Message- From:

RE: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Buesching, Logan J
Something along the lines of the following: script type=text/javascript var myArray=new Array(); ?php $files=getFiles($d); foreach ($files as $key=$val) { ? myArray[?php echo $key;?]=?php echo $val;?; ?php } ? /script

Re: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Jochem Maas
Otto Wyss wrote: I don't know if I should ask this question here or in the JavaScript group. I'll try it here since people usually are more helpful. I've an array of file names $files = getFiles ($d); but would like to use this array in a JavaScript array. How can I copy this $files

Re: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Otto Wyss
Jochem Maas wrote: // if you have this available: http://php.net/manual/en/function.json-encode.php echo json_encode($files); I thought there might be a solution with Json but couldn't locate it. I prefer it versus the iteration, thanks. Sometimes solutions are so simple if one knows them.

RE: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Peter Lauri
Check www.php.net/json You can use the encode function there. Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Otto Wyss [mailto:[EMAIL PROTECTED] Sent: Tuesday, April

Re: [PHP] Array remove function?

2007-04-10 Thread Richard Lynch
http://php.net/array_flip followed up an unset, followed by another array_flip, I guess... Why in the world you'd architect the array with a value when you need to unset by value in the first place is beyond me, though... On Tue, April 10, 2007 2:52 pm, Tijnema ! wrote: On 4/10/07, Richard

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread tg-php
In addition to the suggestions made, check out opendir() too. It may be a little simpler for what you're doing. Not sure. Remember, the beauty of PHP is that there's almost always a fuction or two already made that do what you want. Even some semi-obscure stuff. So always scan through the

[PHP] Firefox and Crafting Tables

2007-04-10 Thread gryffyn
http://wow.crafterstome.com/recipes/enchanting.html http://wow.crafterstome.com/special/burning-crusade-faction-recipes.html Firefox: Firefox changes to help memory allocation (all these take place in about:config.. enter that on your address bar): right-click and create a boolean entry

[PHP] Re: Curious Problem with $_POST

2007-04-10 Thread Steve
Is it possible that your zip file is bigger than your max filesize allots? Most likely isn't the problem, but worth doublechecking. Stephen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have a form for uploading files. It is intended to upload photos. I have it listed at the end.

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 11:49 am, Satyam wrote: You are totally right, I am sorry. I would hate to miss my plane or train due to such mistake. Can somebody with way more karma than me put in an RFC to just NUKE daylight savings? Pretty please? Thanks! Whatever alleged benefits there are,

Re: [PHP] Curious Problem with $_POST

2007-04-10 Thread Richard Lynch
print_r($_FILES) may be more useful that $_POST On Mon, April 9, 2007 7:53 pm, Stephen wrote: I have a form for uploading files. It is intended to upload photos. I have it listed at the end. When I upload a jpg everything is fine. The $_POST variable is populated as expected. If I upload

[PHP] OT Apologies.. Re: [PHP] Firefox and Crafting Tables

2007-04-10 Thread tg-php
Just glad this wasn't my grociey list or something worse. hah.. sent to the wrong address, my apologies. But for anyone looking for some good tradeskill craft recipe lists for World of Warcraft or for ways to help their Firefox be a little nicer on memory usage, there ya go. *shame* -TG =

Re: [PHP] Array remove function?

2007-04-10 Thread M.Sokolewicz
Lori Lay wrote: Tijnema ! wrote: On 4/10/07, Daevid Vincent [EMAIL PROTECTED] wrote: OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) -Original Message- From: Lori Lay [mailto:[EMAIL PROTECTED] Use array_search() and unset()? Interesting,

Re: [PHP] Array remove function?

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 3:22 pm, Tijnema ! wrote: On 4/10/07, Daevid Vincent [EMAIL PROTECTED] wrote: OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) -Original Message- From: Lori Lay [mailto:[EMAIL PROTECTED] Use array_search() and

[PHP] IF loop

2007-04-10 Thread Ron Piggott
Would someone help me tweak the IF statement below? I am trying to assign a value to $seasonal_greeting on Good Friday, Saturday and Easter Sunday. We had added an extra day's worth of seconds to $Easter_Sunday wondering if this is why it didn't work on Easter Sunday. Where I am at today

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 11:38 am, Satyam wrote: In PHP dates are stored as seconds from an arbitrary zero set at Jan 1st, 1970, so does MySql with date/time values though it shows them formatted but nitpick: I don't think MySQL uses Unix timestamp internally, as it's quite capable of storing a

Re: [PHP] Oputting Forms Within a Class

2007-04-10 Thread CK
Hi, Your suggestion borders the MVC design pattern, which I've used within flash, groovy. Also, the following document illustrated an interesting solution, what are your thoughts? 7. Print form elements' defaults with helper functions.

Re: [PHP] Re: MySQL exceptions

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 6:34 pm, Davi wrote: Em Segunda 09 Abril 2007 21:21, itoctopus escreveu: Use the @ in front of the statement and then check the result if it's valid. -- itoctopus - http://www.itoctopus.com I already use it, but I believe that try-catch would be _more_ useful...

Re: [PHP] Decoding from unknown charsets (inc. ks_c_5601-1987)

2007-04-10 Thread Richard Lynch
Short term, you could simply base64 encode them so that at least they go in as something you can do something with later... On Tue, April 10, 2007 8:27 am, Edward Kay wrote: I have an app that stores email messages in a database. The app and DB are UTF-8 but obviously the emails can be in a

Re: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Paul Novitski
At 4/10/2007 01:36 PM, Otto Wyss wrote: I've an array of file names $files = getFiles ($d); but would like to use this array in a JavaScript array. How can I copy this $files into a JavaScript variable? As I'm sure you know, you can't literally copy the values from PHP into the

Re: [PHP] Location of .so files on Linux box

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 8:24 am, Miles Thompson wrote: This probably belongs in php-install, but here goes. Where should extension files be located? Yes. :-) They should go wherever it makes sense on your setup. In php.ini the default entry for extension_dir is: extension_dir= ./

Re: [PHP] IF loop

2007-04-10 Thread Richard Davey
Ron Piggott wrote: $good_Friday = easter_date($current_year)-24*3600*2; $Easter_Sunday = easter_date($current_year)*60*60*24; easter_date() returns a Unix timestamp. In the above code, you are taking this timestamp, then multiplying it by 60, then again by 60, then again by 24. If the Unix

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread JM Guillermin
http://www.php.net/readdir ?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != . $file != ..) { echo $file\n; } } closedir($handle); } ? cheers jmg - Original Message - From: revDAVE [EMAIL PROTECTED] To:

Re: [PHP] Where to insert a phrase in the right place

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 2:51 pm, Mário Gamito wrote: I'm making this site that was static and now has some dynamic features, so it's a little bit patched :) If you care to visit http://www.telbit.pt/2/login.php you'll notice that the word Welcome is already present, and only should be after

Re: [PHP] Array remove function?

2007-04-10 Thread Paul Novitski
At 4/10/2007 03:09 PM, M.Sokolewicz wrote: Such a function is inherently a Bad Idea (tm). array-values are not unique. Array keys are. So unless you want to emulate the way array_flip works (bad idea (tm)), I'd say: leave it be. Whoever owns that trademark has totally got to be the

Re: [PHP] Bind IP with fsockopen

2007-04-10 Thread chris
Im having trouble converting this snippet to use the bind_socket function. my original code is.. ? $domain = 'internet.co.uk'; $fs = fsockopen('dac.nic.uk', 2043, $errno, $errstr, 60); if (!$fs) { fclose($fs); } else { fputs($fs, $domain\r\n); $line = fgets($fs, 1024); echo $line; } ? I

Re: [PHP] Array remove function?

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 5:39 pm, Paul Novitski wrote: values. If both keys and values are unique, I'd consider (if only briefly) maintaining two arrays, one a flipped version of the other, so I could look up key/value pairs using either node. I do this all the time for small/medium arrays.

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread revDAVE
Thanks to ALL ... Brad - Tijnema - TG - Richard and JMG! With a little fooling around - I actually got exactly what I wanted!!! Boy that was fun! And thanks for the incredibly quick responses! -- Thanks - RevDave [EMAIL PROTECTED] [db-lists] -- PHP General Mailing List

Re: [PHP] redirect http to https

2007-04-10 Thread Richard Lynch
On Mon, April 9, 2007 8:38 am, Martin Marques wrote: Ben Liu escribió: What's the prescribed method for redirecting a user forcibly to from the non-SSL secured version of a page to the SSL-secured version? Is this handled at the web server level or at the script level. I found this by

  1   2   >