RE: [PHP] Representing microtime() values

2007-11-26 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] Create PDFs with a strict layout automatically

2007-11-26 Thread Brady Mitchell
David Christopher Zentgraf wrote: I'll certainly play around with it to see what it can do, but right of the bat it seems that templates aren't supported the way I would like them to. Importing a PDF is possible, but apparently they can only be treated like images. I had a similar situation whe

Re: [PHP] Representing microtime() values

2007-11-26 Thread tedd
At 9:30 PM +0200 11/26/07, Tomi Kaistila wrote: 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: htt

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

2007-11-26 Thread David Christopher Zentgraf
On 27 Nov 2007, at 12:25, Bastien Koert wrote: you could also look at http://www.digitaljunkies.ca/dompdf/ Looks alright, but I'm wondering whether the results might be more accurate by laying the PDF out "by hand", instead of going through an intermediary step with CSS? I was also looking

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

2007-11-26 Thread Bastien Koert
you could also look at http://www.digitaljunkies.ca/dompdf/ bastien> CC: php-general@lists.php.net> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> Date: Tue, 27 Nov 2007 12:16:45 +0900> Subject: Re: [PHP] Create PDFs with a strict layout automatically> > On 27 Nov 2007, at 11:51, Chris wrote

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

2007-11-26 Thread tedd
At 12:16 PM +0900 11/27/07, David Christopher Zentgraf wrote: On 27 Nov 2007, at 11:51, Chris wrote: There are a few packages you can use. http://pear.php.net/package/File_PDF http://www.fpdf.org/ are two I know of, I'm sure there are more. Thanks! The built-in PDFlib functions didn't seem

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

2007-11-26 Thread tedd
At 11:46 AM +0900 11/27/07, David Christopher Zentgraf wrote: Hi, I want to offer visitors of my site the possibility of downloading printable, foldable pocket guides for certain things that come out of my database. The problem is that items will be entered into the database very frequently,

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

2007-11-26 Thread David Christopher Zentgraf
On 27 Nov 2007, at 11:51, Chris wrote: There are a few packages you can use. http://pear.php.net/package/File_PDF http://www.fpdf.org/ are two I know of, I'm sure there are more. Thanks! The built-in PDFlib functions didn't seem to appealing, but FPDF looks pretty good. I'll certainly play

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

2007-11-26 Thread Chris
David Christopher Zentgraf wrote: Hi, I want to offer visitors of my site the possibility of downloading printable, foldable pocket guides for certain things that come out of my database. The problem is that items will be entered into the database very frequently, so I need to automate the pr

[PHP] Create PDFs with a strict layout automatically

2007-11-26 Thread David Christopher Zentgraf
Hi, I want to offer visitors of my site the possibility of downloading printable, foldable pocket guides for certain things that come out of my database. The problem is that items will be entered into the database very frequently, so I need to automate the process of creating these guides

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

2007-11-26 Thread Jose Toroscani Hernandez
All .php files are displayed in 10 seconds (aprox). Example: test.php hello world 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. Toroscani

Re: [PHP] SimpleXML error

2007-11-26 Thread Casey
I'm not sure, but try casting $xml->title to string, like this: $title = (string) $xml->title; On Nov 26, 2007, at 1:44 PM, Skip Evans <[EMAIL PROTECTED]> wrote: Hey all, I have some XML files I need to parse and then display (they have HTML formatting in them as well). They contain the

[PHP] SimpleXML error

2007-11-26 Thread Skip Evans
Hey all, I have some XML files I need to parse and then display (they have HTML formatting in them as well). They contain the following: Document DTD 20031113//EN" "galeeBkdoc.dtd"> 214-215 Thomas Jefferson and the Revision of the Virginia Laws I am then attempting to extract the t

Re: [PHP] Emailing dilemma

2007-11-26 Thread Miles Thompson
George, Had this problem a year ago, although I'm not using PEAR. Have a look at http://ca3.php.net/manual/en/function.mail.php and this down in the additional_parameters(optional) section: "For example, this can be used to set the envelope sender address when using sendmail with the *-f* sendmai

[PHP] Re: dgettext vs. xgettext

2007-11-26 Thread news_yodpeirs
No ideas? Am I the only one using different domains with dgettext? What's the sense of it if you can't get the translations apart? Any hint is welcome ... <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hi! > > I'm using dgettext() with different domains in one set of script

Re: [PHP] URL Parsing...

2007-11-26 Thread Jochem Maas
Richard Heyes wrote: > Chris wrote: >> Richard Heyes wrote: well if you take a string (filename) and wish to change the end of it somone then I don't think str_replace() is the correct function. what's to say a script doesn't exist called 'my.cfm.php'? >>> >>> How does this

[PHP] Representing microtime() values

2007-11-26 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. It concerns the values that are being returned to me by the microtime() function. When I run a simple line, e.g. print microtime(true); or var_dump(m

[PHP] Emailing dilemma

2007-11-26 Thread George Pitcher
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 an 'Out of Office' status, it gets bounced back to my server instead of to the user at the uni

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

2007-11-26 Thread William Betts
Below is a quick example. This isn't the best way to do it, just another way. I personally would convert them to integers then compare instead of doing it the way I'm doing it below. = "10.0.0.0") && ($ip <= "10.255.255.255")) || (($ip >= "192.168.0.0") && ($ip <= "192.168.255.255"))

Re: [PHP] session_destroy AND reload a page

2007-11-26 Thread Philip Thompson
On Nov 26, 2007 12:45 AM, Chris <[EMAIL PROTECTED]> wrote: > Ronald Wiplinger wrote: > > If my user wants to logout, I want that the session will be destroyed > > and that he must start with the first page again (index.php) and a new > > session. > > > > Whatever I try he always gets the old sessi

Re: [PHP] URL Parsing...

2007-11-26 Thread Richard Heyes
Chris wrote: Richard Heyes wrote: well if you take a string (filename) and wish to change the end of it somone then I don't think str_replace() is the correct function. what's to say a script doesn't exist called 'my.cfm.php'? How does this: /\.cfm$/ take into account that? $ in regex's

Re: [PHP] Code Critique Please :)

2007-11-26 Thread Martin Alterisio
2007/11/21, Simeon F. Willbanks <[EMAIL PROTECTED]>: > > Hello, > > I am trying to increase my knowledge and understanding of OO and OO > Design Patterns. I'd like to request a critique of a program that > extracts MySQL table information and translates it into XML. In the > program, I tried to a

Re: [PHP] Code Critique Please :)

2007-11-26 Thread Philip Thompson
On Nov 22, 2007 11:52 AM, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Thu, 2007-11-22 at 12:46 -0500, Oscar Gosdinski wrote: > > > > There is something that i always wonder about Singleton pattern in > > PHP, do you really have a benefit using this pattern in PHP? The idea > > behind this patt

Re: [PHP] how do i get a printout of original multipart post data

2007-11-26 Thread Robert . Degen
If you're with linux try netcat (nc) at listening mode. Something like (not exactly) nc -vtlp 80 and then submut against any localhost url. greetings - Ursprüngliche Nachricht - Von: Olav Mørkrid <[EMAIL PROTECTED]> Datum: Montag, November 26, 2007 1:52 pm Betreff: [PHP] how do i

[PHP] how do i get a printout of original multipart post data

2007-11-26 Thread Olav Mørkrid
hello how can i get a raw and untouched printout of a multipart/form-data POST? i need this to analyze what certain user agents do wrong when uploading files. what happens is that php just fails to put files into $_FILES, and gives no way of seeing the original posting and exactly what is wrong

Re: [PHP] Session cookie doesn't work

2007-11-26 Thread metastable
Hey Teck, If the session works when you append the session id to the URL, I would think that the session_save_path is ok and writable. You can assure yourself that it is indeed the case, by going to your session.save_path and checking out the contents of the session files there. Better practice

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

2007-11-26 Thread Jochem Maas
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 going to ['be able to'] read my answers: This message was created a

Re: [PHP] Session cookie doesn't work

2007-11-26 Thread Teck
Thanks Stijn for your advice. I wonder if my "session.save_path /var/lib/php4" is correct. Who should be the owner of the directory? Is there any permission settings I need to care about? I also consider "session.cookie_path /". After searching, it means cookies are avaiable for all the d

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

2007-11-26 Thread Jochem Maas
Ronald Wiplinger wrote: > I use $aa=$_SERVER["REMOTE_ADDR"]; > > and > > if(($aa=="192.168.2.108") || ($aa=="192.168.2.34")) { > $aa="61.64.101.101";// for testing put in a public IP > } > > > However, I would like to cover all private IPs (192.168.x.x and 10.x.x.x > and 172.??.x.x).

Re: [PHP] Session cookie doesn't work

2007-11-26 Thread metastable
Hey, Your session will expire, regardless of the call to session_set_cookie_params. If you're looking to propagate a session across time, you should look at keeping your session data in a database (google: session_set_save_handler, there's a good tutorial on the zend site), then calling a tab

[PHP] Session cookie doesn't work

2007-11-26 Thread Teck
Hi, I'm working to use cookie to maintain session data across multiple pages in PHP4.42. I have the following two scripts, where I think the second file outputs a data in a session variable. file 1 - test_1.php # Go next ## fi

Re: [PHP] question regarding type hinting parameters of php functions

2007-11-26 Thread T . Lensselink
On Mon, 26 Nov 2007 10:29:40 +0100, Dirk Thomas / 4wd media <[EMAIL PROTECTED]> wrote: > Hi, > > i have tried a current snapshot of PHP 5.3 and have a question regarding > type hinting. > > For example when using the function > "array_slice(array $array, int $offset, int $length)" > with a non-in

[PHP] question regarding type hinting parameters of php functions

2007-11-26 Thread Dirk Thomas / 4wd media
Hi, i have tried a current snapshot of PHP 5.3 and have a question regarding type hinting. For example when using the function "array_slice(array $array, int $offset, int $length)" with a non-integer length parameter, what is the desired behavior? When calling "array_slice($array, 0, (float