php-general Digest 29 May 2006 23:08:43 -0000 Issue 4155

2006-05-29 Thread php-general-digest-help
php-general Digest 29 May 2006 23:08:43 - Issue 4155 Topics (messages 237021 through 237047): Re: MMS Gateway + PHP 237021 by: Rabin Vincent 237022 by: Jochem Maas Re: Best way to save reports, comments and suggestions welcome 237023 by: Ryan A 237025 by:

[PHP] MMS Gateway + PHP

2006-05-29 Thread kartikay malhotra
Hi All, I've a typical problem. I'm using Mbuni MMS gateway. This gateaway provides a method of forwarding an incoming MMS file to a HTTP Server, where it could be uploaded. I run a PHP script on the server, to dump the MMS into a database. Now I do not have a typical HTML form to upload the

Re: [PHP] MMS Gateway + PHP

2006-05-29 Thread Rabin Vincent
On 5/29/06, kartikay malhotra [EMAIL PROTECTED] wrote: I've a typical problem. I'm using Mbuni MMS gateway. This gateaway provides a method of forwarding an incoming MMS file to a HTTP Server, where it could be uploaded. I run a PHP script on the server, to dump the MMS into a database. Now I

Re: [PHP] MMS Gateway + PHP

2006-05-29 Thread Jochem Maas
kartikay malhotra wrote: Hi All, I've a typical problem. I'm using Mbuni MMS gateway. This gateaway provides a method of forwarding an incoming MMS file to a HTTP Server, where it could be uploaded. I run a PHP script on the server, to dump the MMS into a database. Now I do not have a

Re: [PHP] Best way to save reports, comments and suggestions welcome

2006-05-29 Thread Ryan A
Hey Robert, I have to write a kind of logging script which will keep records of how long a person used the site and its functions, so far this is what I have come up with: ... Presuming you know when they logged out or can calculate it: user_id login_time timestamp

Re: [PHP] [NOT PHP] good javascript list?

2006-05-29 Thread Jo�o C�ndido de Souza Neto
Hi Paul. I subscribe myself in this javascript list but i cant´t access the list by Outlook Express. Could you told me wath can i do? Thanks. Paul Novitski [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] At 11:37 AM 5/27/2006, tedd wrote: I'm looking for a recommendation for a

Re: [PHP] Best way to save reports, comments and suggestions welcome

2006-05-29 Thread Robert Cummings
On Mon, 2006-05-29 at 08:55, Ryan A wrote: Regardless of how you determine the end of the logged in time, you shouldn't track all the different sums in every entry since that's redundant. You don't even need the extra data since the database will happily allow you to perform the SUMs

Re: [PHP] Best way to save reports, comments and suggestions welcome

2006-05-29 Thread Ryan A
Hey Rob, I have done very little SUM queries with time, can you give me a quick example or any site where i can find a few sample queries? This is basic MySQL so you should RTFM, and generally should be asking on a MySQL list :) Hehehe, true... Dont really like the MySql

Re: [PHP] problems with regex

2006-05-29 Thread Adam Zey
Merlin wrote: thank you, that worked excellent! Merlin Dave Goodchild schrieb: On 27/05/06, Merlin [EMAIL PROTECTED] wrote: Hi there, I am somehow lost when it comes to regex. I am trying to remove ! and ? characters from a string. Could somebody please help me to get a working regex

[PHP] pager problem again

2006-05-29 Thread Ross
http://scottishsocialnetworks.org/editor.phps http://scottishsocialnetworks.org/editor.php I am using this pager class and I cannot seem to get the syntax right for adding the search string, area and service types to the url. http://www.firepages.com.au/php_pagination_class.htm Here is the

[PHP] pop-up window in php???

2006-05-29 Thread siavash1979
Hi all, Is there anyway to have a pop-up window to ask are you sure? yes / no in php? I know you can do it in Javascript, but I'm not sure what's the best way to implement it in php. I want the page to do nothing if no is pressed. any help would be appreciated. thanks, Siavash -- PHP General

[PHP] Re: pop-up window in php???

2006-05-29 Thread Adam Zey
[EMAIL PROTECTED] wrote: Hi all, Is there anyway to have a pop-up window to ask are you sure? yes / no in php? I know you can do it in Javascript, but I'm not sure what's the best way to implement it in php. I want the page to do nothing if no is pressed. any help would be appreciated.

Re: [PHP] pop-up window in php???

2006-05-29 Thread Andrei
Not related to PHP, but u hava javascript confirm function or prompt (if you need input also). Andy [EMAIL PROTECTED] wrote: Hi all, Is there anyway to have a pop-up window to ask are you sure? yes / no in php? I know you can do it in Javascript, but I'm not sure what's the best

[PHP] Metric Conversion Library

2006-05-29 Thread Tod Thomas
Before I write my own, is there a php math library that will perform US to metric conversions and the like? Thanks - Tod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pop-up window in php???

2006-05-29 Thread siavash1979
ok, maybe I didn't make my question too clear. I was mostly wondering if there is a way to do it in PHP rather than Javascript. I would prefer only using php. and from the answers I got, I take it that there is no way of doing it in PHP. thanks, Siavash Quoting Andrei [EMAIL PROTECTED]:

Re: [PHP] pop-up window in php???

2006-05-29 Thread Adam Zey
[EMAIL PROTECTED] wrote: ok, maybe I didn't make my question too clear. I was mostly wondering if there is a way to do it in PHP rather than Javascript. I would prefer only using php. and from the answers I got, I take it that there is no way of doing it in PHP. thanks, Siavash Quoting

Re: [PHP] pop-up window in php???

2006-05-29 Thread Lester Caine
[EMAIL PROTECTED] wrote: ok, maybe I didn't make my question too clear. I was mostly wondering if there is a way to do it in PHP rather than Javascript. I would prefer only using php. and from the answers I got, I take it that there is no way of doing it in PHP. All that PHP can do is

Re: [PHP] pop-up window in php???

2006-05-29 Thread siavash1979
Quoting Lester Caine [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: ok, maybe I didn't make my question too clear. I was mostly wondering if there is a way to do it in PHP rather than Javascript. I would prefer only using php. and from the answers I got, I take it that there is no way

[PHP] Better method than stristr

2006-05-29 Thread Steven Osborn
Can someone please advise a faster solution to do what I'm doing below? All I need to be able to do is determine if any of the strings in the array are contained in $q. The method I have works, but I'm sure its not the most efficient way to do it. $dirtyWord =

Re: [PHP] Better method than stristr

2006-05-29 Thread Jochem Maas
Steven Osborn wrote: Can someone please advise a faster solution to do what I'm doing below? All I need to be able to do is determine if any of the strings in the array are contained in $q. The method I have works, but I'm sure its not the most efficient way to do it.

Re: [PHP] pop-up window in php???

2006-05-29 Thread Paul Novitski
At 11:03 AM 5/29/2006, [EMAIL PROTECTED] wrote: Is there anyway to have a pop-up window to ask are you sure? yes / no in php? I know you can do it in Javascript, but I'm not sure what's the best way to implement it in php. I want the page to do nothing if no is pressed. With all due respect

Re: [PHP] Generating thumbnails from tiff images

2006-05-29 Thread mbneto
by package I mean an external program (outside apache). On 5/25/06, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] I'd like to use GD instead of ImageMagick beacuse I would not want to install extra packages if I can. [/snip] GD is an extra package.

[PHP] number_format

2006-05-29 Thread Jo�o C�ndido de Souza Neto
Hi. I´m having some troubles with the number_format function. When i run a number_format(3000,2,,,.) if returns correctly, but when i try to run number_format(300,2,,,.) it returns the value formatted but with two spaces before. Anyone knows how can i avoid this? Thanks. -- PHP General

[PHP] Code check

2006-05-29 Thread Paul Goepfert
Hi all, I wrote a php script that creates options for select boxes. What this script does is selects tomorrows date. However I have tested the code when the day is the last day of the month and the script blows up. Instead of displaying June it displays January and repeats the months 12 times I

Re: [PHP] Code check

2006-05-29 Thread D. Dante Lorenso
Paul Goepfert wrote: ... What this script does is selects tomorrows date... Here is a one-line way to find the month and day of tomorrow: ?php list($tomorrow_month, $tomorrow_day) = split(':', date('m:d', time()+86400)); ? Test that ... I just wrote it off the top of my head. Maybe that

[PHP] Re: Better method than stristr

2006-05-29 Thread Adam Zey
Steven Osborn wrote: Can someone please advise a faster solution to do what I'm doing below? All I need to be able to do is determine if any of the strings in the array are contained in $q. The method I have works, but I'm sure its not the most efficient way to do it.

[PHP] Blacklisted using mail()

2006-05-29 Thread Peter Lauri
Hi, I have been having problems that I am being classed as spam server if I use the mail() function to send out mail to people who are using my system (notifications etc). How can I avoid this? Anyone with experience? Best regards, Peter Lauri -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Better method than stristr

2006-05-29 Thread Robert Cummings
On Mon, 2006-05-29 at 15:48, Jochem Maas wrote: Steven Osborn wrote: Can someone please advise a faster solution to do what I'm doing below? All I need to be able to do is determine if any of the strings in the array are contained in $q. The method I have works, but I'm

RE: [PHP] pop-up window in php???

2006-05-29 Thread Jay Blanchard
[snip] However, PHP can download a page with input fields disabled that includes a div styled to look like a dialog box with a couple of submit buttons labeled YES NO. Submitting YES will request the same page from PHP but without the dialog div and with user interface fields enabled; NO

Re: [PHP] Better method than stristr

2006-05-29 Thread tedd
At 2:27 PM -0500 5/29/06, Steven Osborn wrote: Can someone please advise a faster solution to do what I'm doing below? All I need to be able to do is determine if any of the strings in the array are contained in $q. The method I have works, but I'm sure its not the most efficient way to do

RE: [PHP] pop-up window in php???

2006-05-29 Thread tedd
At 6:38 PM -0500 5/29/06, Jay Blanchard wrote: [snip] However, PHP can download a page with input fields disabled that includes a div styled to look like a dialog box with a couple of submit buttons labeled YES NO. Submitting YES will request the same page from PHP but without the dialog div

RE: [PHP] pop-up window in php???

2006-05-29 Thread Paul Novitski
At 04:38 PM 5/29/2006, Jay Blanchard wrote: [snip] However, PHP can download a page with input fields disabled that includes a div styled to look like a dialog box with a couple of submit buttons labeled YES NO. Submitting YES will request the same page from PHP but without the dialog div and

RE: [PHP] pop-up window in php???

2006-05-29 Thread Paul Novitski
At 05:04 PM 5/29/2006, tedd wrote: This really isn't any different than a page calling itself, or another page, where the result looks like a pop-up dialog box. That's right. Add the dialog form to the markup and position it absolutely to appear centered a bit down from the top of the

RE: [PHP] pop-up window in php???

2006-05-29 Thread Jay Blanchard
[snip] I'm not aware that PHP can ask a browser to open a second window without using JavaScript. What I'm suggesting would LOOK like a second window appearing on top of the primary window, then going away, when it would actually be a single page cleverly styled. [/snip] PHP could not open a

Re: [PHP] Better method than stristr

2006-05-29 Thread Richard Lynch
On Mon, May 29, 2006 2:27 pm, Steven Osborn wrote: Can someone please advise a faster solution to do what I'm doing below? All I need to be able to do is determine if any of the strings in the array are contained in $q. The method I have works, but I'm sure its not the most

Re: [PHP] pop-up window in php???

2006-05-29 Thread Richard Lynch
On Mon, May 29, 2006 1:03 pm, [EMAIL PROTECTED] wrote: Is there anyway to have a pop-up window to ask are you sure? yes / no in php? I know you can do it in Javascript, but I'm not sure what's the best way to implement it in php. I want the page to do nothing if no is pressed. The only way

Re: [PHP] Blacklisted using mail()

2006-05-29 Thread Richard Lynch
On Mon, May 29, 2006 12:53 pm, Peter Lauri wrote: I have been having problems that I am being classed as spam server if I use the mail() function to send out mail to people who are using my system (notifications etc). How can I avoid this? Anyone with experience? #1. Stop sending HTML

Re: [PHP] problems with regex

2006-05-29 Thread Richard Lynch
On Sat, May 27, 2006 8:58 am, Merlin wrote: I am somehow lost when it comes to regex. I am trying to remove ! and ? characters from a string. Could somebody please help me to get a working regex running for that? I tried: $str = preg_replace('/\!\?\./', ' ', $str); An alternative: $str =

Re: [PHP] Fatal error: Call to undefined function mysql_create_db()

2006-05-29 Thread Richard Lynch
This function is deprecated, and you ought to use mysql_query() to send the CREATE DB sql anyway -- So the book is either out-dated or just plain bad. If the function doesn't exist, then you either don't have MySQL extension to PHP installed, or your ISP has removed that function. On Sat, May

Re: [PHP] anti SQL injection method in php manual.

2006-05-29 Thread Richard Lynch
On Fri, May 26, 2006 10:39 am, Dotan Cohen wrote: What is the purpose of the sprintf? If it were using %d on integers I could see the point, but as we're talking about %s strings, what is the advantage to using sprintf? None, really. How does this differ from: $query = SELECT * FROM users

Re: [PHP] weird characters problem

2006-05-29 Thread Richard Lynch
On Fri, May 26, 2006 9:13 am, Angelo Zanetti wrote: I have a situation where people enter values into a textfield can include the following: 1 ! 2 @ 3 # 4 $ 5 % 6 ^ 7 8 * 9 ( 10 ) 11 ; 12 : 13 14 ' 15 ? 16 - 17 _ 18 now once the move to another page and then come back to the page where

Re: [PHP] Including Functions; one file or many?

2006-05-29 Thread Richard Lynch
You do NOT want one function per file. Dog-slow. You *MIGHT* want to group a bunch of functions logically into one file, breaking up a monster file into several files. On Fri, May 26, 2006 3:02 am, Mark Kelly wrote: Hi I'm writing a set of db abstraction functions for an internal app which

Re: [PHP] Including Functions; one file or many?

2006-05-29 Thread Richard Lynch
On Fri, May 26, 2006 9:46 am, Mark Kelly wrote: On Friday 26 May 2006 14:56, Matt Carlson wrote: One note on include files. Usually it's best practice to not name them .inc Name them .inc.php so that they cannot be opened by a webbrowser, thus giving more information to a potential

Re: [PHP] Question about set_time_out and shell_exec

2006-05-29 Thread Richard Lynch
On Wed, May 24, 2006 11:26 am, Suhas wrote: I am trying to write a script which will avoid browser timeout problem and in that process I have created 2 files FILE1.php: set_time_out(1); echo shell_exec(/usr/local/bin/php -f FILE2.php ); FILE2.php: @mail($to,$sub,$msg); sleep(60);

Re: [PHP] Serialize

2006-05-29 Thread Richard Lynch
On Wed, May 24, 2006 4:50 am, [EMAIL PROTECTED] wrote: Is a serialized array a safe string to insert into a mysql text field? Or is a function such as mysql_real_escape_string always needed? Assume that a Bad Guy is smart enough to get SOMETHING in there to mess you up, even if you serialize

Re: [PHP] captcha or other recommendations

2006-05-29 Thread Richard Lynch
On Wed, May 24, 2006 3:30 am, Angelo Zanetti wrote: I've been playing with captcha for one of my sites. It works well but have had a few issues integrating it into the site and sometimes it appears not to work/show the textfield and graphic. Anyway are there any other suggestions for

Re: [PHP] Can a script run twice?

2006-05-29 Thread Richard Lynch
On Wed, May 24, 2006 12:45 am, Lester Caine wrote: I found while trying to track things. The original problem *IS* that PHP can run two copies of a script in parallel and the second copy does NOT see the 'locking' in place on the first copy. I had always thought that PHP was sequential, but

Re: [PHP] how include works?

2006-05-29 Thread Richard Lynch
On Tue, May 23, 2006 6:19 pm, Mindaugas L wrote: can anybody explain how require works, and what's the difference between _once and regular? What's going on when php file is processed? In manual is written just, that it's readed once if include_once. What does to mean readed? Thank You

Re: [PHP] How to disable PHP's POST caching?

2006-05-29 Thread Richard Lynch
On Tue, May 23, 2006 5:23 pm, Adam Zey wrote: why is port 80 a requirement - HTTP can technically over any port. It must be accessible to any client, no matter what sort of firewall or proxy they go through. The only way to absolutely assure that is, as far as I know, to use port 80. It is

RE: [PHP] pop-up window in php???

2006-05-29 Thread Paul Novitski
At 06:25 PM 5/29/2006, Jay Blanchard wrote: [snip] I'm not aware that PHP can ask a browser to open a second window without using JavaScript. What I'm suggesting would LOOK like a second window appearing on top of the primary window, then going away, when it would actually be a single page