Re: [PHP] Get a PAGE

2005-01-27 Thread Louie Miranda
thank you. Is it possible to only show a certain from and end field? On Fri, 28 Jan 2005 00:59:05 -0600, Jon <[EMAIL PROTECTED]> wrote: > I use libcurl for such functions > On Fri, 2005-01-28 at 14:52 +0800, Louie Miranda wrote: > > Im trying to capture the whole page of a certain courier servic

[PHP] pictures alternating left and right in the text flow.

2005-01-27 Thread havard
This may be very simple to you, but as Im not sure so thought I shoud ask to save myself a lot fo time or trial and error. I am learning how to use php and mysql, and am trying to set up a wite. I have been doing volunteer work for many years and have been sending newsletter ever 2 months or so,

Re: [PHP] Get a PAGE

2005-01-27 Thread Jon
I use libcurl for such functions On Fri, 2005-01-28 at 14:52 +0800, Louie Miranda wrote: > Im trying to capture the whole page of a certain courier service. > What i want to do is, after i got the form to query the AWB (Air Way > Bill No.) It will dump on my local folder the page containing the > d

[PHP] Re: Get a PAGE

2005-01-27 Thread Louie Miranda
I think pear http_download, does a diff job. sorry. how can i get a html page on my local folder, using php? On Fri, 28 Jan 2005 14:52:42 +0800, Louie Miranda <[EMAIL PROTECTED]> wrote: > Im trying to capture the whole page of a certain courier service. > What i want to do is, after i got the fo

[PHP] Get a PAGE

2005-01-27 Thread Louie Miranda
Im trying to capture the whole page of a certain courier service. What i want to do is, after i got the form to query the AWB (Air Way Bill No.) It will dump on my local folder the page containing the details on it. Im going to try PEAR HTTP_Download Is there another application or syntax on php

[PHP] debug_backtrace trick

2005-01-27 Thread Gerard Samuel
There used to be a link in the manual user notes, I believe under debug_backtrace(). Where, there was some javascript voodoo, that would hide/unhide the backtrace. Does anyone have a link to this site? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Jon
Dave, Another quick note. If you are using this in a function with register_globals off in you php.conf you will need to do global $_HTTP_POST_FILES or use $_FILES['upfile']['temp_name'] instead. On Fri, 2005-01-28 at 15:18 +0900, Dave wrote: > Jon, > Thanks for responding. Unfortunately, i

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Jon
Dave, Does $store_dir end with a slash? Is it writable by apache? What do your log files reveal? What is the output of the script? On Fri, 2005-01-28 at 15:18 +0900, Dave wrote: > Jon, > Thanks for responding. Unfortunately, it still doesn't work. I tried > it exactly as you wrote,

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
Jon, Thanks for responding. Unfortunately, it still doesn't work. I tried it exactly as you wrote, and it still gives me the message that it failed to upload. Also, I actually want to force a name change to the file, so that regardless of what the name of the file uploaded is, it gets chan

Re: [PHP] mysql_pconnect / persistent database conections

2005-01-27 Thread Steve Slater
At 10:43 AM 1/27/2005, Richard Lynch wrote: Ben Edwards wrote: > Been meaning to investigate persistent database connections for a > while. Coming from a rdbms background (oracle with a bit of whatcom > sqlanywhare) I have always felt that the overhead of opening a > connection at the beginning of

Re: [PHP] mail problem at interland

2005-01-27 Thread Jason Wong
On Friday 28 January 2005 10:09, David Edwards wrote: > I have a fairly simple script written that uses the mail() function on a > client site hosted at Interland. I have used a similar script quite a few > times before with no problem. However although the script generates no > errors, no emails

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Jon
basename is looking for a file and $HTTP_POST_FILES[$name]['name'] is not a valid path to a file. Something like this should work if(move_uploaded_file($_HTTP_POST_FILES['upfile']['tmp_name'], rawurlencode($store_dir.$HTTP_POST_FILES['upfile']['name'])) On Fri, 2005-01-28 at 14:41 +0900, Dave wro

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Josip Dzolonga
On Fri, 2005-01-28 at 14:41 +0900, Dave wrote: > if ( move_uploaded_file($HTTP_POST_FILES[$name]['tmp_name'], $store_dir > . basename($HTTP_POST_FILES[$name]['name']) ) Try echoing $store_dir . basename($HTTP_POST_FILES[$name]['name'] before uploading the file (before the move_uploaded_file funct

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
Marek, Mark, Thanks for the advice. I've added "global $HTTP_POST_FILES;" into my function, and it is working. I'd also like to follow Marek's advice to modify my script, as it sounds like it helps to make it more secure. However, I don't think I'm using the syntax right. I changed: if(

[PHP] getid3

2005-01-27 Thread Daniel Lahey
I found a really great utility for getting info on music files that I thought I'd share. Here's the info: / /// getID3() by James Heinrich <[EMAIL PROTECTED]> // // available at http://getid3.sourceforge.net

[PHP] Developer needed in London

2005-01-27 Thread Underodog H.R.
Sorry for using the list in this way, wont happen again. PLEASE DON¹T REPLY TO THIS MESSAGE THROUGH THE LIST RESPOND DIRECT TO [EMAIL PROTECTED] Job Opportunity: Web Developer/Designer In-house in London (not outsourced). A great opportunity to join a young vibrant company working on exciting hi

[PHP] mail problem at interland

2005-01-27 Thread David Edwards
Hi, I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails appear at their intended destination. Interland support

[PHP] Re: Cannot connect to Database

2005-01-27 Thread Supersky
Thank all of you who helped me. My problem has been solved. Supersky "Supersky" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I'm using the following statements to connect to a database. > > Connect To > Database"); > $db = mysql_select_db("testDB", "$conn") or die (

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello Leif, I've solved my problem. Thanks! Supersky "Supersky" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Leif, > > There is nothing about mysql on the information page. Thanks for your link > and I am reading it. > > Thanks, > > Supersky > "Leif Gregory" <[EMAIL PROTE

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello Richard, I've added my PHP folder to the system path. I think this can do the same as putting in in D:\windows. My problem has been solved. Thank you very much. Gan "Richard Lynch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Supersky wrote: >> 2. say D:\WINDOWS. > > An

[PHP] in need of php code for user management/admin function...

2005-01-27 Thread The Disguised Jedi
osCommerce handles it pretty well, but a lot of the data doesn't go through much sanitization, so it can fall victim to SQL code injection www.oscommerce.com On Thu, 27 Jan 2005 16:16:51 -0800 (PST), Bruce Douglas <[EMAIL PROTECTED]> wrote: > hi... > > i'm looking for 'open source' code that

[PHP] in need of php code for user management/admin function...

2005-01-27 Thread Bruce Douglas
hi... i'm looking for 'open source' code that can be used in a website for handling user registration, user admin functions... does anybody know of a good set of functions that can provide this kind of feature set. or, can anybody give me opinions regarding apps that you've used that have had t

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Richard Lynch
Supersky wrote: > 2. say D:\WINDOWS. And is your php.ini file in D:\WINDOWS? Cuz if it ain't, PHP ain't reading it. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello Leif, There is nothing about mysql on the information page. Thanks for your link and I am reading it. Thanks, Supersky "Leif Gregory" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Supersky, > > Thursday, January 27, 2005, 1:37:12 PM, you wrote: > S> Thank you for yo

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello Richard, 1. I restarted Apache. 2. say D:\WINDOWS. 3. say nothing about MySQL. Thanks, Supersky "Richard Lynch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Supersky wrote: >> Thank you for your help. I have done what you told me to do. But it >> doesn't >> work. > >

Re: [PHP] Ming - php sync problem?

2005-01-27 Thread Marek Kilimajer
John Coppens wrote: Hi all. I have simple page that generates a simple flash with some random images, then publishes it - on the same page. If I do this, i regularly have several kinds of problems, one of them, an error message like: getimagesize(img/topmovie/toplogo.swf): failed to open stream: No

Re: [PHP] Compiling PHP 4.3.3 with large file support

2005-01-27 Thread Jon
Ok, I am using Apache 2.0.51, and PHP 4.3.8. I compiled both srpms with the "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" added to the CFLAGS. Attached is the last few lines of an strace httpd -X. Compiling without these flags works fine. ## strace ###

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Richard Lynch
Supersky wrote: > Thank you for your help. I have done what you told me to do. But it > doesn't > work. Are you seeing the same error message, or is it not working in a different way? If it's the same way: 1. Did you restart Apache? 2. What does say about php.ini? 3. What does say about MySQL?

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Leif Gregory
Hello Supersky, Thursday, January 27, 2005, 1:37:12 PM, you wrote: S> Thank you for your help. I have done what you told me to do. But it S> doesn't work. Does phpinfo(); output anything like below (except it looks prettier! :grin: )? mysql MySQL Support enabled Active Persistent Links

Re: [PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Wayne Zeller
Marek Kilimajer wrote: 30 seconds? This must be your firewall blocking connections from outside world. Use ftp_pasv() to turn on passive mode. That did the trick. Thanks s much! Wayne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Dear Leif, Thank you for your help. I have done what you told me to do. But it doesn't work. Best, Supersky "Leif Gregory" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Supersky, > > Thursday, January 27, 2005, 8:55:04 AM, you wrote: > S> But I cannot, and I see Fatal err

Re: [PHP] background process

2005-01-27 Thread Richard Lynch
mbneto wrote: > I'd like to create a script that will act as a daemon. > > Now I simply add while() { do stuff } > > But this forces me to call it script.php &. Is there a way to make > this work without the & You're probably better off using & when calling it, but: http://php.net/pcntl_fork

Re: [PHP] regular expressions ?

2005-01-27 Thread Leif Gregory
Hello Rick, Thursday, January 27, 2005, 12:36:39 PM, you wrote: R> /^(1?[1-9]|[12]0)$/ works too. The first part covers 1-9, 11-19; R> the second part gets you 10 and 20. R> Plus, it's ever so slightly shorter! And isnt' that what's most R> important? :P Purty :grin: -- Leif (TB lists m

Re: [PHP] regular expressions ?

2005-01-27 Thread Rick Fletcher
Robin Vickery wrote: On Thu, 27 Jan 2005 16:56:05 +0100, Zouari Fourat <[EMAIL PROTECTED]> wrote: this is working fine : if (eregi("^-?([1-3])+$",$x) echo "x is 1 or 2 or 3"; i forgot to say that doesnt work with 1-20 :( how to do it ? if (preg_match('/^(20|1[0-9]|1-9])$/', $candidate)) { // $c

[PHP] background process

2005-01-27 Thread mbneto
Hi, I'd like to create a script that will act as a daemon. Now I simply add while() { do stuff } But this forces me to call it script.php &. Is there a way to make this work without the & -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] Ming - php sync problem?

2005-01-27 Thread John Coppens
On Thu, 27 Jan 2005 10:54:18 -0800 (PST) [EMAIL PROTECTED] (Richard Lynch) wrote: > Change your php.ini to send error messages somewhere else, and get in > the habit of checking that "somewhere else" when you code. Thanks for the hint > It has NOTHING to do with your current problem of having er

Re: [PHP] Ming - php sync problem?

2005-01-27 Thread Richard Lynch
John Coppens wrote: > I have simple page that generates a simple flash with some random images, > then publishes it - on the same page. If I do this, i regularly have > several kinds of problems, one of them, an error message like: > > getimagesize(img/topmovie/toplogo.swf): failed to open stream:

Re: [PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Marek Kilimajer
Wayne Zeller wrote: Marek Kilimajer wrote: You must use ftp_fput() because you are using open file handle. Check that tmpfile() did not fail. Then make sure you are in the right directory after logging in the ftp server. That's what I get for trying to put together code for my post during attemp

Re: [PHP] Re: read file from specific line

2005-01-27 Thread John Nichel
John Coppens wrote: On Thu, 27 Jan 2005 15:15:48 +0100 (CET) [EMAIL PROTECTED] wrote: Hi there! Is there any way reading a file from a specific line? (textfile) /G @varupiraten.se Not directly - there's no way to know where the line starts, except if they are all of the same length. Read the file

Re: [PHP] mysql_pconnect / persistent database conections

2005-01-27 Thread Richard Lynch
Ben Edwards wrote: > Been meaning to investigate persistent database connections for a > while. Coming from a rdbms background (oracle with a bit of whatcom > sqlanywhare) I have always felt that the overhead of opening a > connection at the beginning of each page was a little resource > intensive

[PHP] Re: read file from specific line

2005-01-27 Thread John Coppens
On Thu, 27 Jan 2005 15:15:48 +0100 (CET) [EMAIL PROTECTED] wrote: > Hi there! > > Is there any way reading a file from a specific line? (textfile) > > /G > @varupiraten.se Not directly - there's no way to know where the line starts, except if they are all of the same length. Read the file, spli

RE: [PHP] escaping quotes

2005-01-27 Thread Philip Olson
What also works is this: print 'value="'. $foo['bar'] . '"'; Read the manual section on strings: http://php.net/types.string Regards, Philip On Thu, 27 Jan 2005, Giles wrote: > Thanks, that works great. > > Knew that worked for JavaScript but didn't know it worked for PHP. > > > print("v

Re: [PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Wayne Zeller
Marek Kilimajer wrote: You must use ftp_fput() because you are using open file handle. Check that tmpfile() did not fail. Then make sure you are in the right directory after logging in the ftp server. That's what I get for trying to put together code for my post during attempts to do it several d

[PHP] Ming - php sync problem?

2005-01-27 Thread John Coppens
Hi all. I have simple page that generates a simple flash with some random images, then publishes it - on the same page. If I do this, i regularly have several kinds of problems, one of them, an error message like: getimagesize(img/topmovie/toplogo.swf): failed to open stream: No such file or dire

[PHP] Vars with flash

2005-01-27 Thread Carolina Silva
Hello everybody! This might be a dumb question but i'm having a bit of trouble here: I'm making a contact form in flash MX: the swf sends a string with the variables through a loadVariables function. The string is read by a php file. All the vars get their value through a $HTTP_POST_VARS [] funct

Re: [PHP] regular expressions ?

2005-01-27 Thread Richard Lynch
Zouari Fourat wrote: > Robin : > $i='2'; > if (preg_match('/^(20|1[0-9]|1-9])$/', $i)) { You are missing a [ before the 1-9 in after the last | The regex WILL work if you type it correctly :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.

Re: [PHP] set-time-limit

2005-01-27 Thread Richard Lynch
Wiberg wrote: > why is it so that when I echo something to the screen then I can run the > script for a longer time, than if I don't have echo? Don't get the > logic... Somewhere, deep in the guts of PHP, there is something not unlike this: if (exceeded_time_limit()){ trigger_error("Time limit

[PHP] mysql_pconnect / persistent database conections

2005-01-27 Thread Ben Edwards
Been meaning to investigate persistent database connections for a while. Coming from a rdbms background (oracle with a bit of whatcom sqlanywhare) I have always felt that the overhead of opening a connection at the beginning of each page was a little resource intensive. Anyway, I found mysql_pcon

Re: [PHP] regular expressions ?

2005-01-27 Thread Leif Gregory
Hello Zouari, Thursday, January 27, 2005, 8:53:55 AM, you wrote: Z> doesnt work ! Z> this is working fine : Z> if (eregi("^-?([1-3])+$",$x) Z> echo "x is 1 or 2 or 3"; Whoops. Sorry.. That's what I get for throwing out an answer while on the run: Try this: "; else echo "It's not!" . $i .

Re: [PHP] Web shopping cart

2005-01-27 Thread Richard Lynch
Rick Lim wrote: > Can anyone recommend a freeware shopping card app in php? > Thanks. Years ago, when this question repeatedly generated flame-wars on this list, I got fed up and built this: http://l-i-e.com/compare/index.htm?date=1970-01-01 Dunno if anybody has voted recently... If anybody wan

RE: [PHP] escaping quotes

2005-01-27 Thread Giles
Thanks, that works great. Knew that worked for JavaScript but didn't know it worked for PHP. Giles Roadnight http://giles.roadnight.name -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: 27 January 2005 17:07 To: John Holmes Cc: Giles; php-general@lists.php.net Sub

Re: [PHP] help needed on imagettftext()

2005-01-27 Thread Richard Lynch
Harish Rao K wrote: > While working with some CAPTCHA stuff I get the following error: > Fatal error: Call to undefined function imagettftext(). > I have compiled with GD support and all the supporting libraries > (Freetype, TTF, jpeg, X11R6 etc). > > What am I missing? Check the log files from in

Re: [PHP] error log

2005-01-27 Thread Richard Lynch
Benson wrote: > could anyone please help me on how to display all the errors to the > browser, but not to file? > I have tried modifying php.ini and httpd.conf (apache), but I am not > sure how to modify... You would be MUCH MUCH MUCH better off to train yourself to use 'tail -f /usr/local/apache/

Re: [PHP] escaping quotes

2005-01-27 Thread Richard Lynch
John Holmes wrote: > print("value="\" . $attributes["messageSubject"] . "\""); Slight typo there: "value=\"" . ... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HELLO, some question about php :)

2005-01-27 Thread Richard Lynch
KevinYu wrote: > Sorry to take your time, i wish to build a cluster, but i am not sure > the php > can support cluster function or not, if so, where can find it? > > Mysql also hope to run on the cluster, I didn't find any document about > this tips! > > "Does PHP and Mysql supports CLUSTER li

Re: [PHP] regular expressions ?

2005-01-27 Thread John Nichel
Zouari Fourat wrote: Robin : $i='2'; if (preg_match('/^(20|1[0-9]|1-9])$/', $i)) { Open the bracket for the last parameter... /^(20|1[0-9]|[1-9])$/ -^ -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
Robin : $i='2'; if (preg_match('/^(20|1[0-9]|1-9])$/', $i)) { echo 'yes'; }else echo 'no'; stdout: no Marek : $i='02'; if (($i>=1) && ($i<=20) && (eregi('^[0-9]+$', $i))) echo 'yes'; stdout: yes i hate re

Re: [PHP] regular expressions ?

2005-01-27 Thread Robin Vickery
On Thu, 27 Jan 2005 16:56:05 +0100, Zouari Fourat <[EMAIL PROTECTED]> wrote: > > this is working fine : > > if (eregi("^-?([1-3])+$",$x) > > echo "x is 1 or 2 or 3"; > > i forgot to say that doesnt work with 1-20 :( > how to do it ? You're far better off doing it arithmetically as someone alread

Re: [PHP] regular expressions ?

2005-01-27 Thread Marek Kilimajer
Zouari Fourat wrote: to Marek Kilimajer : $i='5.'; if (($i>=1) && ($i<=20) && ($i==(int)$i)) echo 'yes'; // yes :'( ok, then use regexp: if (($i>=1) && ($i<=20) && regexp('^[0-9]+$', $i)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
to Marek Kilimajer : $i='5.'; if (($i>=1) && ($i<=20) && ($i==(int)$i)) echo 'yes'; // yes :'( On Thu, 27 Jan 2005 16:52:20 +0100, Marek Kilimajer <[EMAIL PROTECTED]> wrote: > Zouari Fourat wrote: > > here's the problem : > > my user MUST input only digits betwee

Re: [PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Marek Kilimajer
Wayne Zeller wrote: My first attempt at posting this appears to have failed, so I'll try again. My apologies if this is a duplicate... I can't for the life of me figure out why this won't work. I am downloading a file from a remote host via ftp, processing it and modifying part of it, and the

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Marek Kilimajer
Supersky wrote: Hello, I'm using the following statements to connect to a database. Database"); $db = mysql_select_db("testDB", "$conn") or die ("Can't Select Database". mysql_error()); ?> But I cannot, and I see Fatal error: Call to undefined function mysql_connect() in My OS is WinXP,

Re: [PHP] Cannot connect to Database

2005-01-27 Thread Leif Gregory
Hello Supersky, Thursday, January 27, 2005, 8:55:04 AM, you wrote: S> But I cannot, and I see Fatal error: Call to undefined function S> mysql_connect() in 1. Make sure you uncomment the extension=php_mysql.dll in your php.ini 2. Copy the php_mysql.dll to your Windows/System folder 3. Restar

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Marek Kilimajer
Dave wrote: PHP List, The Situation: I'm trying to make a page where users can upload an image. I've located on the internet a script that is simple enough for me to use, and I can build upon it to customize for my needs. The script as it is on the web site I got it from is a stand alone

Re: [PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
> this is working fine : > if (eregi("^-?([1-3])+$",$x) > echo "x is 1 or 2 or 3"; i forgot to say that doesnt work with 1-20 :( how to do it ? On Thu, 27 Jan 2005 16:53:55 +0100, Zouari Fourat <[EMAIL PROTECTED]> wrote: > > if (preg_match("/[2-19]/",$x)) > > echo "It is!"; > > doesnt work !

[PHP] Cannot connect to Database

2005-01-27 Thread Supersky
Hello, I'm using the following statements to connect to a database. But I cannot, and I see Fatal error: Call to undefined function mysql_connect() in My OS is WinXP, I have installed Mysql 4.1, Apache 2.0.52, and PHP 5.03. Apache and PHP work well if I don't connect to a database. Pl

Re: [PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
> if (preg_match("/[2-19]/",$x)) > echo "It is!"; doesnt work ! this is working fine : if (eregi("^-?([1-3])+$",$x) echo "x is 1 or 2 or 3"; On Thu, 27 Jan 2005 08:42:19 -0700, Leif Gregory <[EMAIL PROTECTED]> wrote: > Hello Zouari, > > Thursday, January 27, 2005, 7:33:04 AM, you wrote: > Z

Re: [PHP] regular expressions ?

2005-01-27 Thread Marek Kilimajer
Zouari Fourat wrote: here's the problem : my user MUST input only digits between 1 and 20 doing a is_numeric and some comparaison can be bypassed by inputing : .5 or 0.5 or 5.1 or 0.3 or .01 ... ... so i thought that the smartest way is to use regex if( $i >= 1 && $i <= 20 && $i == (int)$i) ... --

Re: [PHP] help needed on imagettftext()

2005-01-27 Thread Marek Kilimajer
Harish Rao K wrote: Hello, While working with some CAPTCHA stuff I get the following error: Fatal error: Call to undefined function imagettftext(). I have compiled with GD support and all the supporting libraries (Freetype, TTF, jpeg, X11R6 etc). What am I missing? Below is the configure command th

Re: [PHP] regular expressions ?

2005-01-27 Thread Leif Gregory
Hello Zouari, Thursday, January 27, 2005, 7:33:04 AM, you wrote: Z> I need to verify if $x is between 1 and 20 and i need to do that Z> with regular expressions ? If you *need* to do it with regexp, try this: if (preg_match("/[2-19]/",$x)) echo "It is!"; If 1 and 20 are

[PHP] ftp_put and ftp_fput both failing me

2005-01-27 Thread Wayne Zeller
My first attempt at posting this appears to have failed, so I'll try again. My apologies if this is a duplicate... I can't for the life of me figure out why this won't work. I am downloading a file from a remote host via ftp, processing it and modifying part of it, and then uploading the upda

RE: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Mike Johnson
From: Dave [mailto:[EMAIL PROTECTED] > The Problem: > I'm not able to create the right syntax to pass the > $HTTP_POST_FILES variable to the function. So the function > gets called, but then it stops very early because what I > end up giving it is essentially an empty array, so it > t

[PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
PHP List, The Situation: I'm trying to make a page where users can upload an image. I've located on the internet a script that is simple enough for me to use, and I can build upon it to customize for my needs. The script as it is on the web site I got it from is a stand alone .php file

Re: [PHP] Web shopping cart

2005-01-27 Thread Marek Kilimajer
Abdul-Wahid Paterson wrote: I would agree with that. Is relatively easy to install and configure. Although the templating is not perfect...I have seen better ways of doing it. It works well though in doing what it is meant to do. What templating? There's no templating in osc :) I would also evaluat

[PHP] HELLO, some question about php :)

2005-01-27 Thread KevinYu
Dear WM, Sorry to take your time, i wish to build a cluster, but i am not sure the php can support cluster function or not, if so, where can find it? Mysql also hope to run on the cluster, I didn't find any document about this tips! "Does PHP and Mysql supports CLUSTER library or function

RE: [PHP] read file from specific line

2005-01-27 Thread Jay Blanchard
[snip] Is there any way reading a file from a specific line? (textfile) [/snip] Yes. Loop through a count until you reach the line you want, then read while(!feof($myFile)){ if("lineNumberIWant" >= $i){ read line $i++; } else {

[PHP] Re: [ParrotHeadPoster] - Re: [PHP] escaping quotes

2005-01-27 Thread Jason Barnett
Jochem Maas wrote: I had a parrot idea whilst writing this.. (see bottom) ... --- ParrotTalk: I think that this topic of string interpolation/quotes deserves 'parrot' attention which made me think that maybe the parrot could parse for markers (that if added to an email by an autorized poster) w

RE: [PHP] regular expressions ?

2005-01-27 Thread Jay Blanchard
[snip] I need to verify if $x is between 1 and 20 and i need to do that with regular expressions ? anyone can help me outta there ? [/snip] Why regex? if((1 < $x) && ($x < 20)){ it's true } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] regular expressions ?

2005-01-27 Thread Marek Kilimajer
Zouari Fourat wrote: Hello, I need to verify if $x is between 1 and 20 and i need to do that with regular expressions ? anyone can help me outta there ? thanks a lot http://www.php.net/operators.comparison -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

[PHP] regular expressions ?

2005-01-27 Thread Zouari Fourat
Hello, I need to verify if $x is between 1 and 20 and i need to do that with regular expressions ? anyone can help me outta there ? thanks a lot -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] read file from specific line

2005-01-27 Thread gustav
Hi there! Is there any way reading a file from a specific line? (textfile) /G @varupiraten.se -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Web shopping cart

2005-01-27 Thread Abdul-Wahid Paterson
I would agree with that. Is relatively easy to install and configure. Although the templating is not perfect...I have seen better ways of doing it. It works well though in doing what it is meant to do. regards, Abdul-Wahid On Thu, 27 Jan 2005 07:32:44 -0600, Afan Pasalic <[EMAIL PROTECTED]> w

Re: [PHP] Web shopping cart

2005-01-27 Thread Afan Pasalic
I use osCommerce and they are not bad at all. -afan Rick Lim wrote: Can anyone recommend a freeware shopping card app in php? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] escaping quotes

2005-01-27 Thread John Holmes
Giles wrote: Hi Guys Really simple question. How do I change the following: print("value='" . $attributes["messageSubject"] . "'"); to have double quotes around the subject field instead. i.e.: print("value="" . $attributes["messageSubject"] . """); print("value="\" . $attributes["messageSubject"]

RE: [PHP] escaping quotes

2005-01-27 Thread Mikey
> Hi Guys > > Really simple question. How do I change the following: > > print("value='" . $attributes["messageSubject"] . "'"); > > to have double quotes around the subject field instead. i.e.: > > print("value="" . $attributes["messageSubject"] . """); > Simple: Print ("value=\""{$attribut

RE: [PHP] escaping quotes

2005-01-27 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 27 January 2005 12:14, Giles wrote: > Hi Guys > > Really simple question. How do I change the following: > > print("value='" . $attributes["messageSubject"] . "'"); > > to hav

[PHP] [ParrotHeadPoster] - Re: [PHP] escaping quotes

2005-01-27 Thread Jochem Maas
I had a parrot idea whilst writing this.. (see bottom) Giles wrote: Hi Guys Really simple question. How do I change the following: print("value='" . $attributes["messageSubject"] . "'"); to have double quotes around the subject field instead. i.e.: print("value="" . $attributes["messageSubject"] .

RE: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-27 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 26 January 2005 19:56, [EMAIL PROTECTED] wrote: > On 26 Jan 2005 Jason Barnett wrote: > > > if (isset($_POST['checkboxfieldname'])) { > >/** do stuff */ > > } > > Sorry, I

[PHP] SourceForge project adroption

2005-01-27 Thread Devraj Mukherjee
I have run a SourceForge project for the past two years, its a document management product with the unique feature of not using a backend. It uses text files to keep the all its META information. A very well accepted product that has been downloaded over nine thousand times and has a very stron

[PHP] Re:[PHP] escaping quotes

2005-01-27 Thread Binoy AV
Hi, Try this print("value=\"" . $attributes["messageSubject"] . "\""); Binoy __ __ __ __ Sent via the WebMail system at softwareassociates.co.uk --- Scanned by MessageExchange.net (12:54:20 SPITFIRE) -- PHP Ge

RE: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-27 Thread Michael Sims
Jochem Maas wrote: > Michael Sims wrote: >> On a "controller" page (the C in MVC) that handles form submissions >> I create an array which defines what form variables are available >> and their default values if not entered. I then use array_merge() >> to combine that array with $_POST (or $_GET,

RE: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-27 Thread Michael Sims
Burhan Khalid wrote: > Michael Sims wrote: >>> [EMAIL PROTECTED] wrote: >>> If one must check the value and not just the existence of the checkbox entry, or for other uses, e.g. where a flag may or may not be present, one is saddled with clumsy constructs like: if (($iss

[PHP] escaping quotes

2005-01-27 Thread Giles
Hi Guys Really simple question. How do I change the following: print("value='" . $attributes["messageSubject"] . "'"); to have double quotes around the subject field instead. i.e.: print("value="" . $attributes["messageSubject"] . """); thanks Giles Roadnight http://giles.roadnight.name --

Re: [PHP] Apache: Request exceeded the limit of 10 internal redirects

2005-01-27 Thread Jochem Maas
Marek Kilimajer wrote: ... I know its due to the way my Apache is setup (not rewrite rules) but the following always works for me: http://www.somedomain.com/doit runs http://www.somedomain.com/doit.php -- apache just does its magic - I believe its to do with the DocumentIndex apache conf setting (

[PHP] error log

2005-01-27 Thread Benson
could anyone please help me on how to display all the errors to the browser, but not to file? I have tried modifying php.ini and httpd.conf (apache), but I am not sure how to modify... thx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Linux PHP CLI and Environment variables

2005-01-27 Thread Marek Kilimajer
Michael Gale wrote: Hello, I am running php 4.3.7 with ncurses support. I want to create a small app using php and ncurses but I will need to get some information from the shell environment variables. I have searched every where ...is this possible ? Michael.

Re: [PHP] Compiling PHP 4.3.3 with large file support

2005-01-27 Thread Marek Kilimajer
Jon wrote: I'm running Fedora Core 1, all packages up to date. I want to add large file support to php. I downloaded the source rpm. Added "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" to CFLAGS in the spec file, rebuilt the rpm and installed it. Apache starts fine but I get "[notice] child pid X

Re: [PHP] Magic quotes question (still driving me mad)

2005-01-27 Thread Ben Edwards
On Wed, 26 Jan 2005 13:07:34 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > Ben Edwards wrote: > > On Tue, 25 Jan 2005 17:02:21 -0800, Chris <[EMAIL PROTECTED]> > > wrote: > >> You should probably use get_magic_quotes_runtime() , as _gpc only > >> applies to GET/POST/COOKIE, > >> > >> htm

Re: [PHP] Apache: Request exceeded the limit of 10 internal redirects

2005-01-27 Thread Marek Kilimajer
Jochem Maas wrote: Richard Lynch wrote: James Guarriman wrote: RewriteEngine on RewriteOptions MaxRedirects=15 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /$1.php ... I know its due to the way my Apache is setup (not rewrite rules) but the followin

[PHP] help needed on imagettftext()

2005-01-27 Thread Harish Rao K
Hello, While working with some CAPTCHA stuff I get the following error: Fatal error: Call to undefined function imagettftext(). I have compiled with GD support and all the supporting libraries (Freetype, TTF, jpeg, X11R6 etc). What am I missing? Below is the configure command that I have used.

  1   2   >