Re: [PHP] RegExp

2006-12-15 Thread Jochem Maas
WeberSites LTD wrote: I'm trying to limit the text someone can submit in a text area with : Code: if(!preg_match(/^[א-תA-Za-z0-9_():,@\/\.\s\-\ ]*$/i,$FieldValue)) { ^^ ^-- no need for the space given you already have '\s'

Re: [PHP] learning classes not sure how to do this correctly

2006-12-15 Thread Jochem Maas
Macha wrote: I'm not sure if it matters or not, but this is happening on the page that you are sent to from hitting the submit button from the other page...test.php is a form that sends you to test2.php after hitting the submit button and its test2.php page that is having this issue with the

Re: [PHP] google video like site

2006-12-15 Thread Jochem Maas
Robert Cummings wrote: On Thu, 2006-12-14 at 23:40 +0100, Jochem Maas wrote: [EMAIL PROTECTED] wrote: Hi, I applogize if this isn't really related to php-programming, but it's related to php. I'm wondering if anyone knows what program sites like google video or break.com use? is it a

Re: [PHP] google video like site

2006-12-15 Thread Robert Cummings
On Fri, 2006-12-15 at 09:30 +0100, Jochem Maas wrote: Robert Cummings wrote: On Thu, 2006-12-14 at 23:40 +0100, Jochem Maas wrote: I doubt they were stupid enough to shell out that kind of cash to on a php-nuke install, Why not? It's not the code they want, it's the traffic. You can

Re: [PHP] How php works?

2006-12-15 Thread Kai Xiang
On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, December 13, 2006 12:15 am, Kai Xiang wrote: 1. I heard there is a zend engine inside PHP playing the role as a virtual machine, and PHP excution have 2 step, first compile to opcode and then excute the opcode, so is that means

RE: [PHP] Having problem sending XML over HTTP

2006-12-15 Thread Nauman Akbar
Hello! Thanx for reminding me that I can use a regular POST as well rather then sending XML over HTTP directly :). Perhaps I was quite tired by then. Anyways I tried that. Unfortunately, it seems POST data is not getting through at all. I sent the same query with GET and it is returned fine. But

RE: [PHP] Having problem sending XML over HTTP (disregard last message)

2006-12-15 Thread Nauman Akbar
Hello again! Please disregard my last message. Thank you Brad for reminding me to use regular POST. I still wish I was able to send a 'text/xml' content type. But this will do and is working great. Regards Nauman Akbar Concise Solutions -Original Message- From: Nauman Akbar

[PHP] PDO::prepare deallocate PDOStatement::closeCursor()

2006-12-15 Thread Yonatan Ben-Nes
Hi all, I got 2 questions about PDO: 1. Let's say that I create the following prepared statement: $PDOStatement = $DB_Conn-prepare(INSERT INTO test (name) values (?)); And after 50,000 inserts (with $PDOStatement-execute(array('somevalue'));) I want the database to analyze, compile and optimize

Re: [PHP] Re: date() and timezone

2006-12-15 Thread Fernando M. M.
Hello, But like i said i have lots of scripts inside this folder, is there a way to set something on .htaccess to change the timezone? why? ;-) Because i can't set the timezone for every single script. Inside this folder and subfolders i guess there are about 10,000 scripts. What you

[PHP] Curl and cookies

2006-12-15 Thread Fernando M. M.
Hello, I have just started using curl and i have some question about cookies. The website i'm logging in controls everything using cookies (from login to the actions inside it). Is there a way to store the cookie values into a php session variable ($_SESSION['cookie'])? How do i make curl

Re: [PHP] Re: date() and timezone

2006-12-15 Thread Jochem Maas
Fernando M. M. wrote: Hello, But like i said i have lots of scripts inside this folder, is there a way to set something on .htaccess to change the timezone? why? ;-) Because i can't set the timezone for every single script. Inside this folder and subfolders i guess there are

RE: [PHP] Curl and cookies

2006-12-15 Thread Ray Hauge
I don't know if you can do what you are asking for, but you could get around it a little bit. In the curl request you specify the cookie file and the cookie jar file. Once you have made your requests, you could read them with file_get_contents() and put that into a $_SESSION variable. You could

Re: [PHP] Re: date() and timezone

2006-12-15 Thread Fernando M. M.
that will teach not to use global include files to init your apps. even if you we stuck with editing 10,000 scripts (btw it sounds very fishy to 10,000 scripts with date() calls in them - can anyone say 'code reuse'?) exactly how hard would it be to write something that would go through

RE: [PHP] Curl and cookies

2006-12-15 Thread Marcus
1. Set option HEADER true for the login part in Curl 2. Take the output of login page, you will notice Set-cookie: name=cookie_value; parametres returned from the header. 3. Preg match or use (explode,str_replace etc) to get those names and values. Prepare them for the next Curl fetch 4. Make a

Re: [PHP] Re: date() and timezone

2006-12-15 Thread Jochem Maas
Fernando M. M. wrote: that will teach not to use global include files to init your apps. even if you we stuck with editing 10,000 scripts (btw it sounds very fishy to 10,000 scripts with date() calls in them - can anyone say 'code reuse'?) exactly how hard would it be to write something

Re: [PHP] PHP and connection to mail account

2006-12-15 Thread Richard Lynch
If you want to go the route of inbound mail being processed as it arrives, man smrsh made it simple enough for even me to figure out. On Wed, December 13, 2006 8:17 am, Angelo Zanetti wrote: Dear All. Do u know if its possible with PHP to receive a mail or connect to a mail box and do

Re: [PHP] google video like site

2006-12-15 Thread siavash1979
Quoting Robert Cummings [EMAIL PROTECTED]: On Fri, 2006-12-15 at 09:30 +0100, Jochem Maas wrote: Robert Cummings wrote: On Thu, 2006-12-14 at 23:40 +0100, Jochem Maas wrote: I doubt they were stupid enough to shell out that kind of cash to on a php-nuke install, Why not? It's

RE: [PHP] google video like site

2006-12-15 Thread bruce
siavish... to write a site that handles a few 100 hits/day and has functionality to upload/download/view videos isn't that hard to do. (not including the look/feel, and not including the testing aspect) just throwing a site together isn't that hard. however, if you really want to have a

[PHP] imap_open('/path/to/mbox', '', '')

2006-12-15 Thread Richard Lynch
I'm having trouble with Windows imap_open. I have the exact same mbox on a Linux box, with the exact same PHP code opening it just fine. I FTP (binary) to the Windows box (and a second time to be sure it wasn't an FTP flake-out). Opening the mbox in Windows yields a message like: PHP Notice:

[PHP] POST in Apache server

2006-12-15 Thread Emiliano
Hi all, I'm new in the php world and I have a problem. I want to invoke a php scr= ipt from a web page hosted on an Apache server. The php script writes and= deletes a file but, to be able to do that, I have to make the user to be= myself and not the Apache server. In order to do that below is

Re: [PHP] Curl and cookies

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 8:06 am, Fernando M. M. wrote: I have just started using curl and i have some question about cookies. The website i'm logging in controls everything using cookies (from login to the actions inside it). Is there a way to store the cookie values into a php session

[PHP] POST in Apache server

2006-12-15 Thread Emiliano
Hi all, I'm new in the php world and I have a problem. I want to invoke a php script from a web page hosted on an Apache server. The php script writes and deletes a file but, to be able to do that, I have to make the user to be myself and not the Apache server. In order to do that below is the

Re: [PHP] PDO::prepare deallocate PDOStatement::closeCursor()

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 7:49 am, Yonatan Ben-Nes wrote: 1. Let's say that I create the following prepared statement: $PDOStatement = $DB_Conn-prepare(INSERT INTO test (name) values (?)); And after 50,000 inserts (with $PDOStatement-execute(array('somevalue'));) I want the database to

Re: [PHP] RegExp

2006-12-15 Thread Richard Lynch
On Thu, December 14, 2006 11:47 pm, WeberSites LTD wrote: I'm trying to limit the text someone can submit in a text area with : Code: if(!preg_match(/^[à-úA-Za-z0-9_():,@\/\.\s\-\ ]*$/i,$FieldValue)) { } It works well but I'm having problems with the (double quote). If there is a

Re: [PHP] learning classes not sure how to do this correctly

2006-12-15 Thread Richard Lynch
I think you are assuming that the stuff you do in test.php carries over to test2.php It doesn't. The ONLY stuff connected between test.php and test2.php is the POST data being sent by the FORM submission. Your $keclass needs to be re-built from scratch in test2.php, somehow. You can cram it

Re: [PHP] POST in Apache server

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 7:39 pm, Emiliano wrote: PHP Notice: Undefined index: val1 in /net/people/user/public_html/cgi-b= in/script.php on line 14 PHP Notice: Undefined index: val2 in /net/people/user/public_html/cgi-b= in/script.php on line 16 http://php.net/isset -- Some people have a

Re: [PHP] POST in Apache server

2006-12-15 Thread Emiliano
Hi Richard, sorry for bothering you, but can you please give me few more details about how to use isset to solve my problem? -e On Fri, December 15, 2006 7:39 pm, Emiliano wrote: PHP Notice: Undefined index: val1 in /net/people/user/public_html/cgi-b= in/script.php on line 14 PHP

[PHP] Re: Having problem sending XML over HTTP

2006-12-15 Thread Manuel Lemos
Hello, on 12/14/2006 06:32 PM Nauman Akbar said the following: I picked up an example from Curl section on php.net. I am able to access the remote page fine with a custom header. Unfortunately, I am not able to retrieve the XML I am sending at the remote end. I have tried both

Re: [PHP] How php works?

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 3:32 am, Kai Xiang wrote: Oh, that's interesting to know, is that from certain test of design goals? I suspect this for I thought the most time-consuming work in PHP should be compiling. The most time consuming work in PHP isn't in PHP at all. :-) It's in the

Re: [PHP] Varying session behavior between 2 nearly identical Apache/PHP setups

2006-12-15 Thread Richard Lynch
Just to be sure... You've double-checked that page setup code isn't somehow triggering an ini_set('session.use_trans_id') or other session parameters, right? I'd also examine any kind of code that is supposed to do something different for the dev/production environment. Inevitably, there ends

Re: [PHP] Whitespace in Emails

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 2:23 pm, [EMAIL PROTECTED] wrote: I'm experiencing a strange problem and difficult to diagnose because it's random. I have built an application that sends out an email with a nice amount of text (don't have exact char count, but could get it). On the html email, a

RE: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
The old school HTTP-EQUIV of a refresh with a time and URL would probably be suitable for this. YMMV And it's still not PHP. :-) On Thu, December 14, 2006 11:08 am, bruce wrote: all these are solid posts... however, the original posting, was not to do a redirect on the page being

Re: [PHP] Retransmiting post variables

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 9:45 am, Fernando M. M. wrote: I have a script called redir.php that is used only for redirecting using the following code: header('Location: ', $_GET['url']); So, you have a one-line script do accomplish a one-line task? Okay. But now i need to redirect post

Re: [PHP] Cookies page refresh

2006-12-15 Thread Richard Lynch
A cookie is sent BACK to the server after the server sends it to the browser. Period. It's kind of like when you go to a movie, and you buy your ticket from one person, and then you hand it to another, and they hand it back, and then you have to be prepared to show it to prove you aren't sitting

Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 12:51 pm, Stut wrote: bruce wrote: hey stut... Please don't reply to me directly, always include the mailing list. thanks for the reply... i did get some output... i also have a question as to why i couldn't get it to work when i used 'header (foo.php)' 1) The

Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Wed, December 13, 2006 9:41 pm, Casey Chu wrote: Search Engines don't like the META tag. Use scriptlocation.href='foobar.php';/scripta href='foobar.php'Foo Bar/a If the search engine authors are not smart enough to make the META tag and this JS snippet the same in their evaluation of the

Re: [PHP] Advice needed: implementing custom fields in tables

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 8:23 am, Denis Gerasimov wrote: I am in a need of implementing custom/used-defined fields mechanism. What I need is adding new fileds to a db table on-the-fly. There are 2 possible options I know: 1. Add a fixed set of text columns named custom_01, custom_02,

Re: [PHP] php redirection..

2006-12-15 Thread Casey Chu
Actually... Search engines don't have a JavaScript interpreter. On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, December 12, 2006 12:51 pm, Stut wrote: bruce wrote: hey stut... Please don't reply to me directly, always include the mailing list. thanks for the reply... i did

Re: [PHP] POST in Apache server

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 7:39 pm, Emiliano wrote: PHP Notice: Undefined index: val1 in /net/people/user/public_html/cgi-b= in/script.php on line 14 http://php.net/isset On Fri, December 15, 2006 8:15 pm, Emiliano wrote: sorry for bothering you, but can you please give me few more

Re: [PHP] POST in Apache server

2006-12-15 Thread Casey Chu
Did you add a submit button to the page? On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote: On Fri, December 15, 2006 7:39 pm, Emiliano wrote: PHP Notice: Undefined index: val1 in /net/people/user/public_html/cgi-b= in/script.php on line 14 http://php.net/isset On Fri, December

Re: [PHP] php redirection..

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 10:28 pm, Casey Chu wrote: Actually... Search engines don't have a JavaScript interpreter. Actually... You don't know for sure that Google isn't using Perl's javascript interpreter. Unless you work for Google, have just told us something they would consider

Re: [PHP] POST in Apache server

2006-12-15 Thread Emiliano
oh ok, I understand that. However, my problem is different: I need those values that instead are not found. The question is: why the POST in the chunck of code inside the html doesn't work? Why is the php script not finding the values posted in the html? Thanks, -emiliano On Fri, December

Re: [PHP] Problems with Zip+IE6

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 4:34 am, Javier Ruiz wrote: damn! that's a pretty good article, thanks a lot. unfortunatelly, it's not mentioning about zip files concretely, I didn't find a solution for my problem with them. I tried playing a bit with the Content-type, but it seems that Internet

Re: [PHP] POST in Apache server

2006-12-15 Thread Emiliano
Yes Casey, I'm using the submit button -emiliano On Fri, December 15, 2006 7:39 pm, Emiliano wrote: PHP Notice: Undefined index: val1 in /net/people/user/public_html/cgi-b= in/script.php on line 14 http://php.net/isset On Fri, December 15, 2006 8:15 pm, Emiliano wrote:

Re: [PHP] Problems with Zip+IE6

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 11:04 am, Frank M. Kromann wrote: if you use: header(Content-Type: application/zip); header(Content-Disposition: attachment; filename=\somefile.zip\); That works for me with IE 6/7 and other browsers. Argh. Please read this: http://richardlynch.blogspot.com/

Re: [PHP] php redirection..

2006-12-15 Thread Casey Chu
Well... They skip all !-- --'s, so they skip script!-- //--/script's. On 12/15/06, Richard Lynch [EMAIL PROTECTED] wrote: On Fri, December 15, 2006 10:28 pm, Casey Chu wrote: Actually... Search engines don't have a JavaScript interpreter. Actually... You don't know for sure that Google

Re: [PHP] POST in Apache server

2006-12-15 Thread Casey Chu
On your script page, add echo pre; print_r($_REQUEST); echo /pre; and tell us the result. On 12/15/06, Emiliano [EMAIL PROTECTED] wrote: Yes Casey, I'm using the submit button -emiliano On Fri, December 15, 2006 7:39 pm, Emiliano wrote: PHP Notice: Undefined index: val1 in

Re: [PHP] POST in Apache server

2006-12-15 Thread Richard Lynch
On Fri, December 15, 2006 10:48 pm, Emiliano wrote: oh ok, I understand that. However, my problem is different: I need those values that instead are not found. The question is: why the POST in the chunck of code inside the html doesn't work? Why is the php script not finding the values posted

Re: [PHP] filedownload and output buffering

2006-12-15 Thread Richard Lynch
An HTTP response can only do ONE of these two things: output HTML start a download If you see sites such as SourceForge that *seem* to do this in one page, and analyze their HTML and their headers, you will find that they are using a META refresh tag or some JavaScript to cause the original HTML

Re: [PHP] Automating PHP email

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 3:02 am, clr wrote: I am creating a PHP/mySQL site that enables members to set criteria for email notification As my site changes and clients criteria are met they need to be notified. I can generate a list of email address and info quite simply using mySQL My

Re: [PHP] $POST Q

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 2:14 am, William Stokes wrote: Can someone tell me what wrong or to how to manage this? //default $limitorig = 10; echo select name=\USRlimitorig\; echo option selected value=$limitorig/option; echo option10/option; echo option20/option; echo option30/option;

Re: [PHP] Download adds ^M to beginning of file

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 9:12 am, [EMAIL PROTECTED] wrote: Based on your subject line, I'd suggest looking for an included PHP script that has a stray newline (a Windows newline, actually) before the ?php or after the ? Using the below code to force download works fine on most servers and

Re: [PHP] Download adds ^M to beginning of file

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 9:27 am, Jochem Maas wrote: Using the below code to force download works fine on most servers and with most browsers. However it does crash Firefox when I download a specific file, IE works like beauty. File content starts with: #!/sbin/_joor_perl_use

Re: [PHP] Havn't been on the list in a while

2006-12-15 Thread Richard Lynch
On Mon, December 11, 2006 9:30 pm, Jim Lucas wrote: Seems like this list has slowed down alot. Anybody else notice this, or am I just missing something? I got a new job, so was busy. :-) -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist.

Re: [PHP] POST in Apache server

2006-12-15 Thread Emiliano
ok, this is what I get: preArray ( ) /pre PHP Notice: Undefined index: val1 in /net/people/user/public_html/cgi-bin/mail.php on line 18 PHP Notice: Undefined index: val2 in /net/people/user/public_html/cgi-bin/mail.php on line 20 -emiliano On your script page, add echo pre;

RE: [PHP] flash/php file uploader

2006-12-15 Thread Richard Lynch
On Mon, December 11, 2006 4:35 pm, Brad Fuller wrote: I have also seen custom PHP extensions that add the callback method, but they require you to recompile PHP and in the end we decided to go with the CGI solution as it was pretty much plug and play. One of those custom extensions made it

RE: [PHP] Need help with RegEx

2006-12-15 Thread Richard Lynch
preg_match_all('|status([^]*)/status|msU', $xml, $matches); var_dump($matches); YMMV Download and play with The Regex Coach On Mon, December 11, 2006 9:29 am, Brad Fuller wrote: The example provided didn't work for me. It gave me the same string without anything modified. I am also

Re: [PHP] POST in Apache server

2006-12-15 Thread Casey Chu
Hmmm... there's something wrong with the form sending its values. Try echo pre; print_r($GLOBALS); echo /pre; On 12/15/06, Emiliano [EMAIL PROTECTED] wrote: ok, this is what I get: preArray ( ) /pre PHP Notice: Undefined index: val1 in /net/people/user/public_html/cgi-bin/mail.php on line

Re: [PHP] How to compile Delphi SC ?

2006-12-15 Thread Richard Lynch
On Sun, December 10, 2006 3:48 pm, eqla3.com eqla3.com wrote: Hi I know these is PHP mail list but also most active group i know is these :) the Q is How to compile Delphi from source code in bothe linux or windows ? If it's not this, we don't know: ./configure make make install That's