php-general Digest 27 Nov 2007 14:14:02 -0000 Issue 5150

2007-11-27 Thread php-general-digest-help
php-general Digest 27 Nov 2007 14:14:02 - Issue 5150 Topics (messages 265039 through 265065): PHP file slow, same file in HTML faster 265039 by: Jose Toroscani Hernandez 265056 by: Colin Guthrie Create PDFs with a strict layout automatically 265040 by: David

Re: [PHP] Create PDFs with a strict layout automatically

2007-11-27 Thread David Christopher Zentgraf
On 27 Nov 2007, at 14:09, Brady Mitchell wrote: I had a similar situation where I needed to fill in the blanks on an existing PDF file. I used the createFDF function from http://koivi.com/fill-pdf-form-fields in combination with pdftk (http://www.accesspdf.com/pdftk/) to merge the fdf data

[PHP] Convertig xml into array

2007-11-27 Thread Dave Goodchild
Hi guys. I have the following XML file which I want to convert into a multidimensional array. I am using PHP5 so don't want to use SimpleXML as apparently there are issues with sessions and after conversion I want to pass this array into the session. Any ideas on the best and cleanest way to do

RE: [PHP] Representing microtime() values

2007-11-27 Thread Zoltán Németh
2007. 11. 27, kedd keltezéssel 09.46-kor Tomi Kaistila ezt írta: Hi everyone Here's a small problem that I haven't been able to figure out and hence I figured I'd post and see if anyone can explain this to me. -snip- How exactly does PHP handle these values internally? Does anyone know?

Re: [PHP] Create PDFs with a strict layout automatically

2007-11-27 Thread Brady Mitchell
David Christopher Zentgraf wrote: Thanks, but by now I'm pretty much sold on the idea of FPDF and creating PDFs on the fly, inserting data I need as I go. Is there any advantage using pdftk? The only advantage would be that others could create the PDFs and give them to you. I used this setup

Re: [PHP] Create PDFs with a strict layout automatically

2007-11-27 Thread David Christopher Zentgraf
On 27 Nov 2007, at 17:57, Brady Mitchell wrote: FPDF is a great way to go - I've used it for other projects. Thought I'd share this method so you'd have more options. :) Very much appreciated. :o) I do want to include graphics dynamically as well, not just form data, so I think your

Re: [PHP] Create PDFs with a strict layout automatically

2007-11-27 Thread Brady Mitchell
David Christopher Zentgraf wrote: On 27 Nov 2007, at 17:57, Brady Mitchell wrote: FPDF is a great way to go - I've used it for other projects. Thought I'd share this method so you'd have more options. :) Very much appreciated. :o) I do want to include graphics dynamically as well, not just

[PHP] Re: PHP file slow, same file in HTML faster

2007-11-27 Thread Colin Guthrie
Jose Toroscani Hernandez wrote: All .php files are displayed in 10 seconds (aprox). Example: test.php htmlbodyhello world/body/html But, the same file with extension html (test.html), is displayed in 1 second. The system is: - RHEL 5 - PHP 5.1 - Apache I apreciate your help.

RE: [PHP] Representing microtime() values

2007-11-27 Thread Tomi Kaistila
Hi everyone Here's a small problem that I haven't been able to figure out and hence I figured I'd post and see if anyone can explain this to me. -snip- How exactly does PHP handle these values internally? Does anyone know? Tomi: Try this: http://www.webbytedd.com/b/timed/

RE: [PHP] Convertig xml into array

2007-11-27 Thread Edward Kay
-Original Message- From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: 27 November 2007 08:36 To: PHP General list Subject: [PHP] Convertig xml into array Hi guys. I have the following XML file which I want to convert into a multidimensional array. I am using PHP5 so don't want

[PHP] Re: Convertig xml into array

2007-11-27 Thread Colin Guthrie
Edward Kay wrote: -Original Message- From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: 27 November 2007 08:36 To: PHP General list Subject: [PHP] Convertig xml into array Hi guys. I have the following XML file which I want to convert into a multidimensional array. I am using

[PHP] Gallery Script

2007-11-27 Thread Tom Chubb
Hi all, I have a working gallery script which reads a directory then shows all thumbnails, each linking to the full size image. I'm trying to change it so that the page shows an image (fullsize) then links to the previous/next images in the sequence then all the thumbnails below (the bit that's

[PHP] Re: Gallery Script

2007-11-27 Thread Colin Guthrie
Tom Chubb wrote: Hi all, I have a working gallery script which reads a directory then shows all thumbnails, each linking to the full size image. I'm trying to change it so that the page shows an image (fullsize) then links to the previous/next images in the sequence then all the thumbnails

Re: [PHP] Re: Gallery Script

2007-11-27 Thread Tom Chubb
On 27/11/2007, Colin Guthrie [EMAIL PROTECTED] wrote: Tom Chubb wrote: Hi all, I have a working gallery script which reads a directory then shows all thumbnails, each linking to the full size image. I'm trying to change it so that the page shows an image (fullsize) then links to the

[PHP] Newbie asks about multi-lingual website strategies

2007-11-27 Thread Jeff Benetti
I'm a noob so keep the comments to a noob's level please. I am doing a website and my client wants the bulk of the text to be bilingual (French and English). The last site I did used php and mysql so I am getting comfortable with that technology. Typically I am using a single php file and my

Re: [PHP] Re: Gallery Script

2007-11-27 Thread Tom Chubb
On 27/11/2007, Andrew Peterson [EMAIL PROTECTED] wrote: I'm assuming that everytime you page refreshes, it pulls in ALL the contents of the directory? If you are, you could dynamically create the Prev/Next buttons. When you create the link for each individual pictures, you could add the prev

RE: [PHP] Emailing dilemma

2007-11-27 Thread George Pitcher
Miles, I see that tha manual talks about a trusted sender list (/etc/mail/trusted-users). Do you know if there is something similar for a Windows NT server? Cheers George -Original Message- From: Miles Thompson [mailto:[EMAIL PROTECTED] Sent: 26 November 2007 8:44 pm To: PHP List

Re: [PHP] How to ask if private IP?

2007-11-27 Thread Philip Thompson
On Nov 26, 2007 6:08 AM, Jochem Maas [EMAIL PROTECTED] wrote: Ronald, I really dont care if my email doesn't reach you, making normal people jump through hoops because you want to avoid spam is not the right way to do things, next time I'll remember not to answer your questions as your not

Re: [PHP] Newbie asks about multi-lingual website strategies

2007-11-27 Thread Jason Pruim
On Nov 27, 2007, at 8:37 AM, Jeff Benetti wrote: I'm a noob so keep the comments to a noob's level please. I am doing a website and my client wants the bulk of the text to be bilingual (French and English). The last site I did used php and mysql so I am getting comfortable with that

RE: [PHP] Emailing dilemma

2007-11-27 Thread Andrés Robinet
You could try the following headers (they might also cause trouble to the antispam soft, but I'd give it a try) // Replies delivered to the user Reply-To: [EMAIL PROTECTED] // Bounces delivered to the user Return-Path: [EMAIL PROTECTED] // Errors delivered to the user Errors-To: [EMAIL PROTECTED]

[PHP] any phpers in or around Rotterdam, Holland looking for a job?

2007-11-27 Thread Jochem Maas
please contact me off list :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Newbie asks about multi-lingual website strategies

2007-11-27 Thread Andrés Robinet
We use something similar to the following define('DEFAULT_LANG_ID', 'en'); function getLanguageId() { // Allow for language id override in $_GET, $_POST and $_COOKIE $req_lang_id = $_REQUEST['lang_id']; // Retrieve the one stored in the session if any $sess_lang_id =

Re: [PHP] Emailing dilemma

2007-11-27 Thread Miles Thompson
On Nov 26, 2007 3:21 PM, George Pitcher [EMAIL PROTECTED] wrote: Hi, I have almost 30 websites that use PEAR::Mail to send emails on behalf of users at universities (one site for each) to lecturers at the same university. The problem I have is that if a lecturer sets

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
Jeff Benetti wrote: I'm a noob so keep the comments to a noob's level please. I am doing a website and my client wants the bulk of the text to be bilingual (French and English). The last site I did used php and mysql so I am getting comfortable with that technology. Typically I am using a

Re: [PHP] Newbie asks about multi-lingual website strategies

2007-11-27 Thread Jochem Maas
your all missing something, namely that the browser can tell you what it's preferred language is (which you can use to select a language in the event no language has yet been determined for the current session). you do this by parsing the value of the HTTP_ACCEPT_LANGUAGE request header.

[PHP] Couple of IMAP questions

2007-11-27 Thread Al
I writing a script to fetch bounced emails from a dedicated mailbox. $mbox = imap_open($addr, $user, $pw); I've got a simple foreach(){ $bodyStr = imap_body($mbox, $num); ... $hdrStr = imap_fetchheader($mbox, $num); Using 110/pop3 is incredibly slow. The php documentation implies that

[PHP] Nested include/require not working in 5.2

2007-11-27 Thread Mike Yrabedra
I am not able to use includes or requires in nested files using php 5.2.3 (osx) Including or Requiring files directly works. Including files, that also have includes in them, does not. Say you have this... -TopDirectory --index.php (contains include(includes/top.php); ) --includes (folder)

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Jochem Maas
Mike Yrabedra wrote: I am not able to use includes or requires in nested files using php 5.2.3 (osx) Including or Requiring files directly works. Including files, that also have includes in them, does not. Say you have this... -TopDirectory --index.php (contains

RE: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Bastien Koert
My approach to multi lang abilities uses the following db structure base_name is the input field name and the basic raw label for the field lang_1 lang_2 ... lang_12 prompt_1 prompt_2 ... prompt_12 since i currently need to support 12 languages in the initial concept when the user signs

[PHP] CVS TO ICAL

2007-11-27 Thread Mohamed Jama
Hey Guys just wondering if there is a away to convert a cvs to ical file or how to import from mysql to ical format? M. Jama big:interactive 91 Princedale Road Holland Park London W11 4NS Email: [EMAIL PROTECTED] Direct: +44 (0)20 7313 2262 www.biggroup.co.uk

Re: [PHP] CVS TO ICAL

2007-11-27 Thread Wolf
cvs to ical from google: http://www.google.com/search?q=convert%3A+cvs+to+icalie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a mysql to ical from google:

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Mike Yrabedra
on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote: Mike Yrabedra wrote: I am not able to use includes or requires in nested files using php 5.2.3 (osx) Including or Requiring files directly works. Including files, that also have includes in them, does not. Say you have

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Mike Yrabedra
on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote: Mike Yrabedra wrote: I am not able to use includes or requires in nested files using php 5.2.3 (osx) Including or Requiring

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Wolf
Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote: Mike Yrabedra wrote: I am not able to use includes or requires in nested

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Mike Yrabedra
on 11/27/07 1:53 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote: Mike Yrabedra wrote: I

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Wolf
Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote: Mike Yrabedra wrote: I am not able to use includes or requires in nested files using php 5.2.3 (osx) Including or Requiring files directly works. Including files, that

[PHP] Question about authenticating people...

2007-11-27 Thread Jason Pruim
The subject might be a little misleading... But I couldn't think of how better to describe it in a small sentence :) What I'm wondering is, I have a program that accesses a database and displays the info in that database... I know, nothing revolutionary about it... I plan on setting up a

[PHP] Re: dgettext vs. xgettext

2007-11-27 Thread news_yodpeirs
So long, I solved it by myself. As I'm only using dgettext() and the domain always is represented by a constant, I simply collect all php-files, then preg_match_all() occurences of dgettext() (with domain in mind), put the texts in the different corresponding files and, as I'm on the way,

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Stut
Mike Yrabedra wrote: on 11/27/07 1:53 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 11:46 AM, Jochem Maas at [EMAIL PROTECTED] wrote: Mike

Re: [PHP] Performance question for table updating

2007-11-27 Thread Andrew Ballard
On Nov 24, 2007 2:32 AM, Jon Westcot [EMAIL PROTECTED] wrote: Hi all: For those who've been following the saga, I'm working on an application that needs to load a data file consisting of approximately 29,000 to 35,000 records in it (and not short ones, either) into several tables.

Re: [PHP] Question about authenticating people...

2007-11-27 Thread Stut
Jason Pruim wrote: The subject might be a little misleading... But I couldn't think of how better to describe it in a small sentence :) What I'm wondering is, I have a program that accesses a database and displays the info in that database... I know, nothing revolutionary about it... I plan

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Wolf
Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 1:53 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 11:46 AM, Jochem Maas at

Re: [PHP] Question about authenticating people...

2007-11-27 Thread Stut
Jason Pruim wrote: On Nov 27, 2007, at 3:48 PM, Stut wrote: Jason Pruim wrote: The subject might be a little misleading... But I couldn't think of how better to describe it in a small sentence :) What I'm wondering is, I have a program that accesses a database and displays the info in that

Re: [PHP] Question about authenticating people...

2007-11-27 Thread Jason Pruim
On Nov 27, 2007, at 3:56 PM, Stut wrote: Jason Pruim wrote: On Nov 27, 2007, at 3:48 PM, Stut wrote: Jason Pruim wrote: The subject might be a little misleading... But I couldn't think of how better to describe it in a small sentence :) What I'm wondering is, I have a program that accesses

Re: [PHP] Question about authenticating people...

2007-11-27 Thread Jason Pruim
On Nov 27, 2007, at 3:48 PM, Stut wrote: Jason Pruim wrote: The subject might be a little misleading... But I couldn't think of how better to describe it in a small sentence :) What I'm wondering is, I have a program that accesses a database and displays the info in that database... I

[PHP] problem with url_fopen on free hosting environment

2007-11-27 Thread Samuel Vogel
Hey guys, I am running an free hosting environment and do have some trouble with allow_url_fopen. Right now we prohibit this, but it's requested by many of our users. The problem is something like to following script, which calls itself over and over again, being run on our server: ?php

Re: [PHP] Newbie asks about multi-lingual website strategies

2007-11-27 Thread tedd
At 9:37 AM -0400 11/27/07, Jeff Benetti wrote: Any any and all comments are welcome, it will be a learning curve no matter which route I take so a little advice on the best direction pros cons would be great. Thanks, Jeff Jeff: If it were me, I wouldn't use any problematic browser detects

Re: [PHP] Newbie asks about multi-lingual website strategies

2007-11-27 Thread Jochem Maas
tedd wrote: At 9:37 AM -0400 11/27/07, Jeff Benetti wrote: Any any and all comments are welcome, it will be a learning curve no matter which route I take so a little advice on the best direction pros cons would be great. Thanks, Jeff Jeff: If it were me, I wouldn't use any

[PHP] Curl doesn't handle memory stream

2007-11-27 Thread Peter Smit
Hello, I've got quite a strange problem with the curl library. The following code does output Content||\Content instead of Content|example.orgoutput|\Content $c = curl_init(http://example.com;); $st = fopen(php://memory, r+); curl_setopt($c, CURLOPT_FILE, $st); if(!curl_exec($c)) die (error:

RE: [PHP] Question about authenticating people...

2007-11-27 Thread Bastien Koert
adding a client name to the login process might make that easier and it forces a sort of 2 factor authentication making the database 'hopefully' harder to crack bastien From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Tue, 27 Nov 2007 15:30:32 -0500 Subject: [PHP] Question about

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
Jochem Maas wrote: tedd wrote: At 9:37 AM -0400 11/27/07, Jeff Benetti wrote: Any any and all comments are welcome, it will be a learning curve no matter which route I take so a little advice on the best direction pros cons would be great. Thanks, Jeff Jeff: If it were me, I wouldn't

Re: [PHP] Nested include/require not working in 5.2

2007-11-27 Thread Mike Yrabedra
on 11/27/07 3:49 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 1:53 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL PROTECTED] wrote: on 11/27/07 1:43 PM, Wolf at [EMAIL PROTECTED] wrote: Mike Yrabedra [EMAIL

Re: [PHP] Question about authenticating people...

2007-11-27 Thread Stut
Jason Pruim wrote: Just for my own curiosity, why do you think sessions are evil? I haven't found a better way to store my variables between different pages... Other then always posting them in either $_POST or $_GET each time... But that can add up quite a bit on a complicated site though...

Re: [PHP] Newbie asks about multi-lingual website strategies

2007-11-27 Thread tedd
At 11:05 PM +0100 11/27/07, Jochem Maas wrote: tedd wrote: If it were me, I wouldn't use any problematic browser detects schemes (they don't work) or any of that high-thought stuff -- it's beyond me. whether it's beyond you or not only you can judge, but I disagree that it's problematic.

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
tedd wrote: At 11:05 PM +0100 11/27/07, Jochem Maas wrote: tedd wrote: If it were me, I wouldn't use any problematic browser detects schemes (they don't work) or any of that high-thought stuff -- it's beyond me. whether it's beyond you or not only you can judge, but I disagree that it's

Re: [PHP] Couple of IMAP questions

2007-11-27 Thread Chris
Al wrote: I writing a script to fetch bounced emails from a dedicated mailbox. $mbox = imap_open($addr, $user, $pw); I've got a simple foreach(){ $bodyStr = imap_body($mbox, $num); ... $hdrStr = imap_fetchheader($mbox, $num); Using 110/pop3 is incredibly slow. Is it slow if you

[PHP] extended imap flags

2007-11-27 Thread Raphael Pigulla
Hello, I am currently playing around with PHPs IMAP functions. I noticed that imap_headers() recognizes extended IMAP flags - not sure what the proper technical term would be - such as MDNSent [1] or nonjunk (a proprietary Thunderbird flag I suppose). By recognize I mean they simply show up

RE: [PHP] problem with url_fopen on free hosting environment

2007-11-27 Thread Andrés Robinet
I might be wrong but I think your problem goes beyond allowing URLs in fopen. A user could just as well use cURL to build a self-calling script. You might need to put a filter on apache on the number of requests (what's the version of apache?). The usual problem with allowing URLs in fopen and in

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Jochem Maas
Colin Guthrie wrote: tedd wrote: ... Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. IE and FF both offer a UI to input the user's preferred language, it's an HTTP standard thing and nothign to do with user agents string parsing. It uses the Accept-Language header

RE: [PHP] Emailing dilemma

2007-11-27 Thread George Pitcher
Hi Rob, You could try the following headers (they might also cause trouble to the antispam soft, but I'd give it a try) // Replies delivered to the user Reply-To: [EMAIL PROTECTED] // Bounces delivered to the user Return-Path: [EMAIL PROTECTED] // Errors delivered to the user Errors-To:

[PHP] Can I create flash via php?

2007-11-27 Thread Ronald Wiplinger
I want to create flash animations via a web page. Is it possible? What do I need. I do not want to use Windows bye Ronald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Can I create flash via php?

2007-11-27 Thread Jay Blanchard
[snip] I want to create flash animations via a web page. Is it possible? What do I need. I do not want to use Windows [/snip] STFW http://www.google.com/search?hl=enq=create+flash+using+PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Can I create flash via php?

2007-11-27 Thread Warren Vail
Have you checked out ming? http://ming.sourceforge.net/ Warren Vail -Original Message- From: Ronald Wiplinger [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 27, 2007 7:50 PM To: PHP General list Subject: [PHP] Can I create flash via php? I want to create flash animations via a web

[PHP] Array Slice without loosing index

2007-11-27 Thread Jeffery Fernandez
Hi all, I am wanting to retain the array indexes after it being sliced. Here is what I have so far. if ($user_count $group_count) { for ($i = 0; $i $user_count; $i+=$group_count) { $output = array_slice($properties['users'], $i, $group_count);

[PHP] Import contacts from GMX and Web.de with PHP

2007-11-27 Thread Merlin Morgenstern
Hi there, I would to provide the users of an internet community I am running the oportunity to import their adress books. As this seems to be a more complex script and others might have done it before, I am searching for a script that does that. I already found one that can do this for

Re: [PHP] Array Slice without loosing index [SOLVED]

2007-11-27 Thread Jeffery Fernandez
oops me bad.. I just needed the last (4th) parameter added. cheers, Jeffery On Wed, 28 Nov 2007 04:59:35 pm Jeffery Fernandez wrote: Hi all, I am wanting to retain the array indexes after it being sliced. Here is what I have so far. if ($user_count $group_count) { for ($i = 0; $i

RE: [PHP] Array Slice without loosing index

2007-11-27 Thread Andrés Robinet
Notice that the fourth parameter of array_slice will only work in PHP 5, and not for string keys. There's no associative array slicing function that I know of (it would be a good idea for PHP to incorporate one), so I use the following two, which work for numeric or string keys, and work for PHP 4