[PHP] Clear file or write to file erasing all old content

2002-12-29 Thread Noodle Snacks
I can't seem to figure out how to write to a file deleting the old content. Sorry I can't find which function/functions to RTFM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Clear file or write to file erasing all old content

2002-12-29 Thread Noodle Snacks
Thanks, Its just one of those things I miss sometimes... Jason Perkins [EMAIL PROTECTED] wrote in message news:r01050400-1023-A17E17A81BC511D7B4D4000393D5F61C@[192.168.1.3]... on 12/30/02 at 6:02 PM, Noodle Snacks [EMAIL PROTECTED] wrote: I can't seem to figure out how to write to a file

[PHP] Timing mySQL query time.

2002-12-23 Thread Noodle Snacks
Is there a built in php function for mysql that I can use to time the last query? or do I have to take the microtime before and after then substract the first from the last? I want to time how long my queries take -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Timing mySQL query time.

2002-12-23 Thread Noodle Snacks
Can I do that on the fly? Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Why not just get the query times from the mysql general query log? On Tue, 24 Dec 2002, Noodle Snacks wrote: Is there a built in php function for mysql that I

Re: [PHP] Updating GD

2002-12-17 Thread Noodle Snacks
Cool, Just thought it might be a config / code issue or something. Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tuesday 17 December 2002 10:19, Noodle Snacks wrote: PHP is telling me that I need GD 2.0 or later. This is on a newly i

[PHP] Updating GD

2002-12-16 Thread Noodle Snacks
PHP is telling me that I need GD 2.0 or later. This is on a newly installed mandrake 9 distro. Could this be a configuration issue? or do I need to figure out how to update GD? I get these errors: Warning: imagecreatetruecolor(): requires GD 2.0 or later in

[PHP] Language codes to textual languages.

2002-11-30 Thread Noodle Snacks
Via $_SERVER['HTTP_ACCEPT_LANGUAGE'] you can get the default language of a browser (usually). Does anyone know of a list that has the conversion from say: en-au to Australia or en-us to U.S.A? -- JJ Harrison [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Ip address as 32bit int?

2002-11-22 Thread Noodle Snacks
Is it easy enough to change a formated IP addy (eg 192.168.0.1) to the 32bit unsigned int that computers use? the reason I ask is because it is alot more efficient space wise in a db to be storing a 32bit number rather that a char or varchar field. Or am I going to run into trouble because all

[PHP] FAQ a good idea?

2002-11-22 Thread Noodle Snacks
I think this group should have a regularly posted faq that outlines common problems such as register globals. I would be glad to help write it etc if anyone else would like an input. I wrote this in response to the millions of register global questions and the message with the subject Be Nice to

Re: [PHP] FAQ a good idea?

2002-11-22 Thread Noodle Snacks
o:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 6:53 AM To: Noodle Snacks Cc: [EMAIL PROTECTED] Subject: Re: [PHP] FAQ a good idea? there is a bunch of info everywhere on the web. One should have better means to find these, but at the end, that is what others do here - answer question

[PHP] Re: echoing date of first and last day of current week.

2002-11-19 Thread Noodle Snacks
] Noodle Snacks [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I want to get the unix timestamps of the first and last days of this week... Currently I have this: echo 'Words for the week from '.date('jS F Y',strtotime(last sunday)).' to '.date('jS F Y',s

[PHP] Re: problems with PHP code (Please help!)

2002-11-19 Thread Noodle Snacks
It it better that you use a subject that is related to the problem eg. Email Script not working after server upgrade -- JJ Harrison [EMAIL PROTECTED] `Yan Grossman [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear Friends, I run some PHP scripts to deal

[PHP] echoing date of first and last day of current week.

2002-11-17 Thread Noodle Snacks
I want to get the unix timestamps of the first and last days of this week... Currently I have this: echo 'Words for the week from '.date('jS F Y',strtotime(last sunday)).' to '.date('jS F Y',strtotime (next saturday)).'.br'; on saturday this showed the 10th to 23rd... Is there a good way to do

[PHP] Re: Trouble with switch statements

2002-11-16 Thread Noodle Snacks
This appears to be a register globals problem replace switch($select) with switch($_GET['select']). For information on register globals and why it has been turned off in later releases see this pagee: http://www.php.net/manual/en/security.registerglobals.php There is nothing syntactically

[PHP] Re: Get the string in between two other strings

2002-10-17 Thread Noodle Snacks
Cameron Cooke [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Hi, I need a function to get a string in between two other strings. So you would give the function the string to search and then you pass the first string and last string, and the function will return the string in

[PHP] E-Commerce interfacing...

2002-10-17 Thread Noodle Snacks
What is a good service to process credit card numbers for an E-Commerce site? To be specific I mean an easy interface with a PHP based system (maybe even sample code) eg works well with curl... and second any personal recommendations... -- JJ Harrison [EMAIL PROTECTED] -- PHP General

[PHP] netscape http user agent pattern thing.

2002-10-16 Thread Noodle Snacks
I am just finish off a site. An of course the css rendered really badly with netscape... Fixed that with the: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] netscape user agent name...

2002-10-16 Thread Noodle Snacks
Accidently hit the send shortcut... I am just finish off a site. An of course the css rendered really badly with netscape... Fixed that with the: style type='text/css' @import url(style_sheets/?=$skin[0][0]?); /style trick. One or two of the images looks really bad with the simpler css. I am

[PHP] regular expression

2002-10-15 Thread Noodle Snacks
what would be a simple regular expression for a href=anythinghere? for future reference are there any good references for them? -- JJ Harrison [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: regular expression

2002-10-15 Thread Noodle Snacks
Thanks. Ns_andy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... perl: preg_match '/a\s*href/s*=/s*[\']?[^\']+[\']?/i' or eregi 'a[ ]*href[ ]*=[ ]*[\']?[^\']+[\']?' -- Regards, Noodle Snacks [EMAIL PROTECTED] wrote in message [EMAIL PROTECTE

[PHP] Re: Odd request

2002-10-12 Thread Noodle Snacks
Shawn McKenzie [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Probably a question for the php dev team, but here it goes. I want to display an external page in an iframe and have the iframe auto sized to fit the content without having scroll bars. I've tried

Re: [PHP] How to do Date Calculation

2002-10-10 Thread Noodle Snacks
Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thursday 10 October 2002 18:37, Jack wrote: Dear all I'm trying to make a script which will show the month before current month! Is there anyway i can do this? Example : Current

Re: [PHP] Animation in PHP

2002-10-10 Thread Noodle Snacks
Daniel Masson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED] ... No way man !! hai , I want to create an animated line in php from (x,y) to (x1,y1).will php support animation.if so how do i go about in doing this.how do i draw a char so that it

[PHP] shouldn't $_SERVER['PHP_SELF'] include the get info?

2002-09-26 Thread Noodle Snacks
I was using a redirect using $_SERVER['PHP_SELF'] from the previous page (a login for a site) and it didn't include this from the url: ?aid=12. shouldn't it? It caused a SQL error. (which I have included a catch for so the error will be friendly) instead of the variable to be:

[PHP] Re: shouldn't $_SERVER['PHP_SELF'] include the get info?

2002-09-26 Thread Noodle Snacks
Erwin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Noodle Snacks wrote: [snipped] It is supposed to be like that...the PHP_SELF points to this file, and the filename has no arguments, thus the PHP_SELF variable don't have them either. You w

[PHP] Re: shouldn't $_SERVER['PHP_SELF'] include the get info?

2002-09-26 Thread Noodle Snacks
Erwin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Noodle Snacks wrote: Erwin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Noodle Snacks wrote: [snipped] It is supposed to be like that...the