Re: [PHP] bit wise math? Is there a function to easily return the bits?

2007-01-26 Thread Satyam
pre?php $n = 7; for ($i = 1; $i $n;$i =1) if ($i $n) $a[] = $i; // put it in an array or do whatever, $i contains the parts. var_dump($a); ? /pre - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Jon Anderson [EMAIL PROTECTED] Cc: blackwater dev

Re: [PHP] Send Email to Mobiles

2007-01-26 Thread clive
Marcelo Ferrufino Murillo wrote: Hi guys, I need to send a email to mobiles I don´t know if I have to use the function mail( ) or if I have to use other one. Thanks your help if your intention is to send the mobile phone a sms, then you are going to have to use a gateway company of sorts,

Re: [PHP] Re: php from address

2007-01-26 Thread Chantal Rosmuller
On Thursday 25 January 2007 18:51, M.Sokolewicz wrote: Chantal Rosmuller wrote: Hi everyone, In November I sent a mail to this list asking how to get the mail From header right, I solved that but I still have a problem. The solution was using the -f option like this: $frommail =

[PHP] PHP 5.2.0 + qmail problem

2007-01-26 Thread Bc. Radek Krejca
Hello, I had to change my mailserver from sendmail to qmail. After it I saw that the mail generated by function mail() has 2 newlines in body except 1. I have this konfiguration on server with php4xx and no problem is there. Also if I change back sendmail so it is working too. The

[PHP] Ongoing encoding issues

2007-01-26 Thread Dave Goodchild
Hi all, I posted a question a couple of days ago regarding a web app I have wherein users are able to indicated prices and concessions via a text field, and the resulting encoding issues I have experienced, the main one being seeing the pound sign as £ if viewing the results in a browser with

[PHP] php javascript interaction

2007-01-26 Thread William Stokes
Hello, I need some advice on how to learn Javascript and PHP interaction. Any good tutorials on the web would be most welcome. I particulary need to learn how to pass JS user input/choices to PHP. My current problem is how to ask user confirmation over his actions on a web form after POST.

[PHP] two php.ini on the same server

2007-01-26 Thread phpdevster
Hi i am trying to run two Apache server on the same machine and that is work fine but the problem is how to create separate php.ini for each Apache server . is that possible ??

Re: [PHP] Ongoing encoding issues

2007-01-26 Thread Jochem Maas
Dave Goodchild wrote: Hi all, I posted a question a couple of days ago regarding a web app I have wherein users are able to indicated prices and concessions via a text field, and the resulting encoding issues I have experienced, the main one being seeing the pound sign as £ if viewing the

[PHP] Re: two php.ini on the same server

2007-01-26 Thread Colin Guthrie
phpdevster wrote: Hi i am trying to run two Apache server on the same machine and that is work fine but the problem is how to create separate php.ini for each Apache server . is that possible ?? It would be easy to do with a chrooted setup, but I'm sure there are other ways too. Also,

Re: [PHP] Ongoing encoding issues

2007-01-26 Thread Frank Arensmeier
Hi Dave. I don't think you are able to detect your users character encoding with php only (at least not rock-solid). Just some days ago, there was a discussion about that issue (at least concerning Safari) on the Apple web dev mailing list. Have a look at:

Re: [PHP] bit wise math? Is there a function to easily return the bits?

2007-01-26 Thread Satyam
- Original Message - From: Satyam [EMAIL PROTECTED] pre?php $n = 7; for ($i = 1; $i $n;$i =1) if ($i $n) $a[] = $i; // put it in an array or do whatever, $i contains the parts. Sorry, the above fails for numbers which are powers of two, it should have

Re: [PHP] Ongoing encoding issues

2007-01-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-26 14:29:52 +0100: I don't think you are able to detect your users character encoding with php only (at least not rock-solid). Just some days ago, there was a discussion about that issue (at least concerning Safari) on the Apple web dev mailing list. Have

[PHP] Re: two php.ini on the same server

2007-01-26 Thread zerof
phpdevster escreveu: Hi i am trying to run two Apache server on the same machine and that is work fine but the problem is how to create separate php.ini for each Apache server . is that possible ?? Two usual possibilities: 1) To install two Apache Services ( Windows environment ) Apache

Re: [PHP] retrieve all the groups a user is memberOf from active directory?

2007-01-26 Thread Bing Du
On Thu, January 25, 2007 3:07 pm, Bing Du wrote: Sorry if the top is not closely PHP related. But I need to accomplish it using PHP. I can query the attribute 'memberOf' of a user from the active directory server with no problem. The challenge I'm facing now is how to obtain all the

[PHP] php code to upload a url correctly

2007-01-26 Thread Corden James (RW3) CMMC Manchester
I have a form in which users submit a url. I am having problems as some people submit the url in the format http://www.blah.blah.org http://www.blah.blah.org/ while others submit in the format www.blah.blah.org http://www.blah.blah.org/ I have designed the form so that it seems fairly obvious

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Németh Zoltán
On p, 2007-01-26 at 14:10 +, Corden James (RW3) CMMC Manchester wrote: I have a form in which users submit a url. I am having problems as some people submit the url in the format http://www.blah.blah.org http://www.blah.blah.org/ while others submit in the format www.blah.blah.org

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Dave Goodchild
This is what I use: $site = (!preg_match('#^http://#', $_POST['c_site'])) ? raw_param(trim(strip_tags(http:\/\/ . $_POST['c_site']))) : raw_param(trim(strip_tags($_POST['c_site']))); don't worry about raw_param, that's a function of my own, but you get the idea.

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Jochem Maas
Németh Zoltán wrote: On p, 2007-01-26 at 14:10 +, Corden James (RW3) CMMC Manchester wrote: I have a form in which users submit a url. I am having problems as some people submit the url in the format http://www.blah.blah.org http://www.blah.blah.org/ while others submit in the format

Re: [PHP] Re: two php.ini on the same server

2007-01-26 Thread phpdevster
Setting two virtual hosts, one for php4 and other for php5 that might be useful but what i really need is to run any version of php on the first httpd . the second httpd should be php5 . the two php and httpd have separate configuration . the exactly what i need is to load php extension on the

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Jochem Maas
Dave Goodchild wrote: This is what I use: $site = (!preg_match('#^http://#', $_POST['c_site'])) ? raw_param(trim(strip_tags(http:\/\/ . $_POST['c_site']))) : raw_param(trim(strip_tags($_POST['c_site']))); this is much better: http://php.net/parse_url don't worry about raw_param, that's

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Németh Zoltán
On p, 2007-01-26 at 16:46 +0100, Jochem Maas wrote: Németh Zoltán wrote: On p, 2007-01-26 at 14:10 +, Corden James (RW3) CMMC Manchester wrote: I have a form in which users submit a url. I am having problems as some people submit the url in the format http://www.blah.blah.org

Re: [PHP] Re: two php.ini on the same server

2007-01-26 Thread Myron Turner
zerof wrote: phpdevster escreveu: Hi i am trying to run two Apache server on the same machine and that is work fine but the problem is how to create separate php.ini for each Apache server . is that possible ?? Two usual possibilities: 1) To install two Apache Services ( Windows

[PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread tg-php
My contribution to the insanity.. INSERT statements made easy: $genericQY = INSERT INTO MOD_LMGR_Leads (; $genericQYvalues = VALUES (; $genericQY .= FirstName,; $genericQYvalues .= 'John',; $genericQY .= LastName; $genericQYvalues .= 'Smith';

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Stut
Jochem Maas wrote: Németh Zoltán wrote: You should first check the url and only add http://; at the beginning if its not there I do it like if (substr($url, 0, 4) != http) {$url = http://; . $url;} in my website, although it is probably not the most elegant solution ;) it will break in the

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Jochem Maas
[EMAIL PROTECTED] wrote: My contribution to the insanity.. INSERT statements made easy: can't stand long var names if they're not absolutely necessary (JMO). although I follow TG's logic here I don't find it that readable, too many dots, [double]quotes, etc for my taste. $genericQY =

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Jochem Maas
Stut wrote: Jochem Maas wrote: Németh Zoltán wrote: ... I don't have numbers, but I'd bet this is quicker than doing a parse_url. I didn't realise speed was an issue. and if it really was an issue I would suggest offloading the url normailization into a batch routine that is run outside

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Stut
[EMAIL PROTECTED] wrote: My contribution to the insanity.. INSERT statements made easy: $genericQY = INSERT INTO MOD_LMGR_Leads (; $genericQYvalues = VALUES (; $genericQY .= FirstName,; $genericQYvalues .= 'John',; $genericQY .= LastName;

Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Jochem Maas
Dave Goodchild wrote: Wouldn't it have been less hassle to not send that comment when all I was doing was trying to help, am pressed for time, and copied and pasted my solution? no hassle on my part. :-D I doubt you want me to point out that you original comment that I commented on and the

Re: [PHP] php javascript interaction

2007-01-26 Thread Myron Turner
William Stokes wrote: Hello, I need some advice on how to learn Javascript and PHP interaction. Any good tutorials on the web would be most welcome. I particulary need to learn how to pass JS user input/choices to PHP. My current problem is how to ask user confirmation over his actions on a

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Jon Anderson
This may not be an option for many people, 'cause ISPs and web hosts may not be forward-thinking enough to install PDO or recent PHP, but... PDO can do do this in a very database independant way, without having to do the equivalent of mysql_real_escape_string: $table = 'xyz'; $data = array(

[PHP] stream_socket_pair

2007-01-26 Thread Bob Dusek
Are sockets created via stream_socket_pair more efficient for IPC than standard socket/port communications? I want to open a process with proc_open, and I want to use a socket to for IPC. One solution is to just create a socket in the parent and pass the port number to the child. Then, when the

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Jochem Maas
Jon Anderson wrote: This may not be an option for many people, 'cause ISPs and web hosts may not be forward-thinking enough to install PDO or recent PHP, but... PDO can do do this in a very database independant way, without having to do the equivalent of mysql_real_escape_string: $table =

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread tg-php
Strangely enough, Stut and Jochem, I DO find this more readable. Hah. I know, I'm insane. I have done it the way you guys proposed, using an associative array and using the keys and values as the columns and insert values. While that is what I'd call tighter code and when you understand what

[PHP] memory_limit Setting?

2007-01-26 Thread Jay Paulson
Hi everyone, I¹m trying to upload a 25MB file via PHP and I¹m setting the memory limit way high so I don¹t get a fatal error from php (the error is below). What I find really odd about this is that the error message says that PHP tried to allocate almost 54MB. First question is why is PHP

Re: [PHP] memory_limit Setting?

2007-01-26 Thread Jon Anderson
Jay Paulson wrote: Hi everyone, I¹m trying to upload a 25MB file via PHP and I¹m setting the memory limit way high so I don¹t get a fatal error from php (the error is below). What I find really odd about this is that the error message says that PHP tried to allocate almost 54MB. First

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Satyam
- Original Message - From: Stut [EMAIL PROTECTED] You call that readable?? $vals = array(); $vals['FirstName'] = 'John'; $vals['LastName'] = 'Smith'; $query = mysql_query(BuildInsert('MOD_LMGR_Leads', $vals)); function BuildInsert($table, $values) { foreach (array_keys($values) as

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Robert Cummings
On Fri, 2007-01-26 at 16:30 +, Stut wrote: [EMAIL PROTECTED] wrote: My contribution to the insanity.. INSERT statements made easy: $genericQY = INSERT INTO MOD_LMGR_Leads (; $genericQYvalues = VALUES (; $genericQY .= FirstName,; $genericQYvalues .=

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Robert Cummings
On Fri, 2007-01-26 at 12:25 -0500, [EMAIL PROTECTED] wrote: Strangely enough, Stut and Jochem, I DO find this more readable. Hah. I know, I'm insane. I have done it the way you guys proposed, using an associative array and using the keys and values as the columns and insert values. While

Re: [PHP] Ongoing encoding issues

2007-01-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-26 09:33:13 +: Hi all, I posted a question a couple of days ago regarding a web app I have wherein users are able to indicated prices and concessions via a text field, and the resulting encoding issues I have experienced, the main one being seeing the pound

Re: [PHP] memory_limit Setting?

2007-01-26 Thread Sancar Saran
On Friday 26 January 2007 19:35, Jay Paulson wrote: Hi everyone, I¹m trying to upload a 25MB file via PHP and I¹m setting the memory limit way high so I don¹t get a fatal error from php (the error is below). What I find really odd about this is that the error message says that PHP tried to

Re: [PHP] Multi lingual pages

2007-01-26 Thread Otto Wyss
Paul Novitski wrote: I formulated my question in general since I couldn't find an other message here about supporting multiple languages. http://www.w3.org/International/articles/ http://www.w3.org/TR/i18n-html-tech-lang/ http://php.net/setlocale Thanks a lot, these are good points for

Re: [PHP] Multi lingual pages

2007-01-26 Thread Robert Cummings
On Fri, 2007-01-26 at 21:25 +0100, Otto Wyss wrote: Paul Novitski wrote: I formulated my question in general since I couldn't find an other message here about supporting multiple languages. http://www.w3.org/International/articles/ http://www.w3.org/TR/i18n-html-tech-lang/

[PHP] PHP with XML database

2007-01-26 Thread Ritesh Nadhani
Hello all As part of my research under my professor I have to implement a web interface to their benchmarking data. PHP is the chosen web language but we are little worried about the database. The benchmark data comes to us in XML format (e.g.

Re: [PHP] php javascript interaction

2007-01-26 Thread Scripter47
Myron Turner skrev: William Stokes wrote: Hello, I need some advice on how to learn Javascript and PHP interaction. Any good tutorials on the web would be most welcome. I particulary need to learn how to pass JS user input/choices to PHP. My current problem is how to ask user confirmation

Re: [PHP] Multi lingual pages

2007-01-26 Thread Paul Novitski
At 1/26/2007 12:25 PM, Otto Wyss wrote: Paul Novitski wrote: In both cases I store the text in database tables that contain a language field I can select on to match the user's request. I wonder if retrieving static texts from the database draws too much performance. I know from somebody who

[PHP] Creating an array as a property of an object

2007-01-26 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
Hello, folks -- lurking for a while, first post -- I'm relatively new to PHP but doing database design work for nearly 20 years. I've RTFM'ed (+ books + other resources) a bunch of times but I have a mental block around doing this: I want to have an multidimensional array as a property

Re: [PHP] Creating an array as a property of an object

2007-01-26 Thread Robert Cummings
On Fri, 2007-01-26 at 15:09 -0600, Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote: Hello, folks -- lurking for a while, first post -- I'm relatively new to PHP but doing database design work for nearly 20 years. I've RTFM'ed (+ books + other resources) a bunch of times but I have

Re: [PHP] Creating an array as a property of an object

2007-01-26 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
On Jan 26, 2007, at 3:08 PM, Robert Cummings wrote: $this-foom_array[$line['WHAM_ID']] = $line; Cheers, Rob. Thank you so much, Rob. That did it. (Kickin' the cobwebs out of my head...) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ongoing encoding issues

2007-01-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-26 21:09:34 +: # [EMAIL PROTECTED] / 2007-01-26 09:33:13 +: Hi all, I posted a question a couple of days ago regarding a web app I have wherein users are able to indicated prices and concessions via a text field, and the resulting encoding issues I have

[PHP] Result sorting not working

2007-01-26 Thread Dan Shirah
I have a search page that displays all active records in my application, but for some reason, I can not get it to display based on a specific input. For instance, I have records with id's 2, 3, 4, 5 etc... In my search form, the default view shows all records, and my form variable lets you put

Re: [PHP] PHP with XML database

2007-01-26 Thread Bernhard Zwischenbrugger
Hi Some questions As part of my research under my professor I have to implement a web interface to their benchmarking data. PHP is the chosen web language but we are little worried about the database. The benchmark data comes to us in XML format (e.g.

[PHP] Can a class instance a property of another class

2007-01-26 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
Hey - -- - Here I am again. Anybody still working on a Friday? I would like to have a class instance be the property of another class, like can be done in other languages. For example: I would like to have a Connections class which contains all of the database connection logic and query

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Larry Garfield
I have long since given up on raw insert/update/delete statements as the syntax is all kinds nasty. These days I just do this, which is even easier and more powerful: http://www.garfieldtech.com/blog/simplifying-sql On Friday 26 January 2007 10:03 am, [EMAIL PROTECTED] wrote: My contribution

[PHP] PHP Flash

2007-01-26 Thread Skip Evans
Hey all, We have a new project that will require pretty robust communication between Flash and PHP, and I've begun Googling and came across Actionscript here: http://www.adobe.com/devnet/flash/articles/flashmx_php.html I wonder if anyone knows anything about running actionscript on

RE: [PHP] Can a class instance a property of another class

2007-01-26 Thread Jay Blanchard
[snip] I would like to have a class instance be the property of another class, like can be done in other languages. For example: I would like to have a Connections class which contains all of the database connection logic and query results. There are advantages to having this type of

RE: [PHP] Can a class instance a property of another class

2007-01-26 Thread Jay Blanchard
[snip] This syntax fails, so I know this isn't right, but I hope you get the idea. Can it be done? [/snip] Extends? class new_connection extends connection {} [/snip again] I read too fast A member function can be referenced by another class as long as the function is public. You would

Re: [PHP] Can a class instance a property of another class

2007-01-26 Thread Jochem Maas
Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote: Hey - -- - Here I am again. Anybody still working on a Friday? I would like to have a class instance be the property of another class, like can be done in other languages. For example: I would like to have a Connections class which

Re: [PHP] Can a class instance a property of another class

2007-01-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-26 17:18:37 -0600: So, in the __construct method of a business or data class, for example, one could: include_once(connection_classes.kbk); $this-connection_class = new connection_class; This syntax fails, so I know this isn't right, but I hope you get the

Re: [PHP] PHP Flash

2007-01-26 Thread Jochem Maas
Skip Evans wrote: Hey all, We have a new project that will require pretty robust communication between Flash and PHP, and I've begun Googling and came across Actionscript here: http://www.adobe.com/devnet/flash/articles/flashmx_php.html I wonder if anyone knows anything about running

Re: [PHP] PHP with XML database

2007-01-26 Thread Ritesh Nadhani
Hello Bernhard Zwischenbrugger wrote: Hi Some questions As part of my research under my professor I have to implement a web interface to their benchmarking data. PHP is the chosen web language but we are little worried about the database. The benchmark data comes to us in XML format (e.g.

Re: [PHP] Multi lingual pages

2007-01-26 Thread Jochem Maas
Otto Wyss wrote: Paul Novitski wrote: I formulated my question in general since I couldn't find an other message here about supporting multiple languages. http://www.w3.org/International/articles/ http://www.w3.org/TR/i18n-html-tech-lang/ http://php.net/setlocale Thanks a lot, these

Re: [PHP] PHP Flash

2007-01-26 Thread Skip Evans
Jochem Maas wrote: Anyone have any experience with PHP/Actionscript on Linux? wtf? Oh my God. What am I thinking? Please folks, I am really not this stupid. It has been too, too long a day. Yes, I just need to upgrade Flash on this workstation. Skip -- Skip Evans Big Sky Penguin, LLC

Re: [PHP] PHP with XML database

2007-01-26 Thread Bernhard Zwischenbrugger
Hi again I don't know what the DB should do for you. If you simple want to select subtrees from your big XML, you can put the XML Files to the filesystem and use XPointer for query. Here an example: ?php $xml=END result

[PHP] Create ACH Origination file with PHP

2007-01-26 Thread Dan Harrington
Hello, Does anyone know of a script that can create an ACH origination file with PHP? Thanks Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] connect.c+php

2007-01-26 Thread ed gregory
Can anyone give me an example on using connect.c with php? Thank you. Ed -- http://www.freenet.am/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] cennect.c+php

2007-01-26 Thread Eduard Grigoryan
Can anyone give me an example on using connect.c with php? Thank you. Ed -- Armenian Freenet Catalog http://freenet.am/~edik_g http://armfn.net/~edik_g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: