Re: [PHP] I am not able to download domxml for PHP5

2006-04-10 Thread Joe Wollard
Of course you said you're running PHP5so that won't work. According to the site it would be best for you to use the DOM that comes pre compiled with PHP. http://us3.php.net/manual/en/ref.dom.php Sorry about the mix up on my part. On 4/11/06, Joe Wollard <[EMAIL PROTECTED]> wrote: > Oz, > > F

Re: [PHP] I am not able to download domxml for PHP5

2006-04-10 Thread Joe Wollard
Oz, >From your command line, try: pecl install domxml You'll need to be root to do so, but as long as you have PECL/PEAR installed this should give you domxml. Remember to restart your web server after doing so. - Joe On 4/11/06, Oz <[EMAIL PROTECTED]> wrote: > Please help, I am not able to d

[PHP] I am not able to download domxml for PHP5

2006-04-10 Thread Oz
Please help, I am not able to download domxml for PHP5 I have tried this location, http://us3.php.net/manual/en/ref.domxml.php I get a message file not found. is there a mirror site. Thanks Please also mail response to [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] Need MySql Help Please

2006-04-10 Thread Joe Wollard
Marvin, As much as we try to keep this list PHP-only I think it's hard to ignore the ties between PHP and MySQL. Most of us learned both technologies simultaneously. Still, you may want to put [OT] on your future email subjects to indicate that the question is 'off topic'. On the matter of MySQL'

RE: [PHP] flash file to recognize SESSION or REQUEST variables?

2006-04-10 Thread Dan Harrington
You are either asking one of two things, and I am not sure which: A) How to send information using GET or POST out from flash to a script file SendAndLoad is the flash function http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/h tml/wwhelp.htm?context=Flash_MX_2004&file=00

[PHP] Need MySql Help Please

2006-04-10 Thread marvin hunkin
Hi. any mysql gurus out there using a tool called EasyPHP 1-8? i am using a my sql tutorial, and says needs the command line interface, so can run my sql commands from the dos prompt. have got the PHP MYSQL ADMIM to load into the easy php 1-8, gui interface. and when i type http://localhost/mysq

[PHP] flash file to recognize SESSION or REQUEST variables?

2006-04-10 Thread Sunnrunner
A client asked me this question. Does anyone know what it means or can someone explain and give me an answer. Thanks. T How can we get the link in the URL of the flash file to recognize SESSION or REQUEST variables? You know like GET or POST? I need to do something like. url = "https://secure.s

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Robert Cummings wrote: On Mon, 2006-04-10 at 23:24, Rasmus Lerdorf wrote: Robert Cummings wrote: On Mon, 2006-04-10 at 23:11, Richard Lynch wrote: On Mon, April 10, 2006 9:59 pm, Rasmus Lerdorf wrote: Richard Lynch wrote: It would be REALLY NIFTY if fopen and friends which understand all tho

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Robert Cummings
On Mon, 2006-04-10 at 23:24, Rasmus Lerdorf wrote: > Robert Cummings wrote: > > On Mon, 2006-04-10 at 23:11, Richard Lynch wrote: > >> On Mon, April 10, 2006 9:59 pm, Rasmus Lerdorf wrote: > >>> Richard Lynch wrote: > It would be REALLY NIFTY if fopen and friends which understand all > th

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Robert Cummings
On Mon, 2006-04-10 at 23:35, Rasmus Lerdorf wrote: > Robert Cummings wrote: > > > > > I'll keep that in mind for the future when I have more free time (2 kids > > under 3 is good for keeping me occupied beyond work atm :). > > > >> A huge percentage of them being either spam, product pitches >

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Robert Cummings wrote: On Mon, 2006-04-10 at 23:11, Richard Lynch wrote: On Mon, April 10, 2006 9:59 pm, Rasmus Lerdorf wrote: Richard Lynch wrote: It would be REALLY NIFTY if fopen and friends which understand all those protocols of HTTP FTP HTTPS and so on, allowed one to set a timeout for U

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Robert Cummings
On Mon, 2006-04-10 at 23:11, Richard Lynch wrote: > On Mon, April 10, 2006 9:59 pm, Rasmus Lerdorf wrote: > > Richard Lynch wrote: > >> It would be REALLY NIFTY if fopen and friends which understand all > >> those protocols of HTTP FTP HTTPS and so on, allowed one to set a > >> timeout for URLs, bu

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Richard Lynch wrote: On Mon, April 10, 2006 4:46 pm, darren kirby wrote: quoth the Robert Cummings: Why do you do this on every request? Why not have a cron job retrieve an update every 20 minutes or whatnot and stuff it into a database table for your page to access? Then if the cron fails to r

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 9:59 pm, Rasmus Lerdorf wrote: > Richard Lynch wrote: >> It would be REALLY NIFTY if fopen and friends which understand all >> those protocols of HTTP FTP HTTPS and so on, allowed one to set a >> timeout for URLs, but they don't and nobody with the skills to >> change >> that

Re: [PHP] php with ajax - uploading pictures

2006-04-10 Thread Manuel Lemos
Hello, On Sun, April 9, 2006 3:21 pm, Merlin wrote: > I am searching for a good upload framework that works with PHP and > AJAX > to provide an upload interface that uploads one picture instantly, Yes, try this forms class that comes with plug-in named AJAX form submit. It can submit any form usi

RE: [PHP] mod_rewrite q's: syntax?

2006-04-10 Thread Micky Hulse
> -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED] > Abandon Outlook and use Eudora, or Pegasus, or webmail, or ANYTHING > other than Outlook? :-) LOL! Yeah, I do not know what I was thinking in the first place... Eudora sounds good to me. :D Cheers, Micky -- PHP Gen

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Richard Lynch wrote: It would be REALLY NIFTY if fopen and friends which understand all those protocols of HTTP FTP HTTPS and so on, allowed one to set a timeout for URLs, but they don't and nobody with the skills to change that (not me) seems even mildly interested. :-( :-( :-( Because it is a

[PHP] PHP and CakePHP: How to use the $html->selectTag()

2006-04-10 Thread Pham Huu Le Quoc Phuc
Hi everybody! I'm a newbie. My question maybe very funny. But please answer to me if you have any ideas. I use $html->selectTag(), I don't know how to use OnChange. When User choose a item on SelectTag, I want Browser to redirect another page and get current value. Thank so much! -- PHP General

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Richard Lynch wrote: On Mon, April 10, 2006 6:17 pm, Rasmus Lerdorf wrote: Martin Alterisio wrote: Maybe you can read the contents of the feeds using fsockopen() and stream_set_timeout() to adjust the timeout, or stream_set_blocking() to read it asynchronously, and then load the xml with simple

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Martin Alterisio \"El Hombre Gris\"
Maybe it's too late to say this, but if your real problem is that you don't want the function reading the rss feed to block the rest of your page, you can always put the output of the reading of the feed on a separate page, and include this through an iframe. darren kirby wrote: Hello all, M

Re: [PHP] function by reference

2006-04-10 Thread Ray Hauge
> > I believe you're thinking more of the C++ style of returning by reference. > This article should help explain how references work, and how to return > references... most specifically check the "Returning References" section. > > http://www.php.net/manual/en/language.references.php > > HTH > --

Re: [PHP] function by reference

2006-04-10 Thread Ray Hauge
On Monday 10 April 2006 19:19, Richard Lynch wrote: > On Sun, April 9, 2006 1:17 pm, tedd wrote: > > Hi gang: > > > > Not that I have an immediate need for this, but in other languages > > one can access a function by reference (in other words, it's address > > -- such as call(function address) ).

Re: [PHP] function by reference

2006-04-10 Thread Richard Lynch
On Sun, April 9, 2006 1:17 pm, tedd wrote: > Hi gang: > > Not that I have an immediate need for this, but in other languages > one can access a function by reference (in other words, it's address > -- such as call(function address) ). > > In php, one can pass a variable by reference by simply usi

Re: [PHP] stripping enclosed text from PHP code

2006-04-10 Thread Richard Lynch
Have you considered running php -s from the command line, which syntax highlights your source file for you, the searching for whatever color codes in your php.ini are used for functions? For that matter, you could custom-code the choices for the color and make the functions read in a separate php.

Re: [PHP] php with ajax - uploading pictures

2006-04-10 Thread Richard Lynch
On Sun, April 9, 2006 3:21 pm, Merlin wrote: > I am searching for a good upload framework that works with PHP and > AJAX > to provide an upload interface that uploads one picture instantly, > shows > the thumbnail and displays another upload formfield to select the next > picture for upload. > > Is

Re: [PHP] Argument passed by reference?

2006-04-10 Thread Chris
tedd wrote: It's not that it's not allowed, it's that it should be done differently. You should make the function accept a reference in the definition, not pass in a reference to the function. The manual page has a good, simple example on what to do. http://www.php.net/manual/en/language.refe

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Richard Lynch
> When I do get something figured out I will post results here. Problem > is, with > either method I need to find a feed that is slow to test with. If I > test it > with a bunk url it will just 404 immediately right? Is there a way to > simulate a slow connection? I dunno about similating a slow c

Re: [PHP] Argument passed by reference?

2006-04-10 Thread tedd
It's not that it's not allowed, it's that it should be done differently. You should make the function accept a reference in the definition, not pass in a reference to the function. The manual page has a good, simple example on what to do. http://www.php.net/manual/en/language.references.pass.p

RE: [PHP] mod_rewrite q's: syntax?

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 7:08 pm, Micky Hulse wrote: >> Doing it on only the URLs *you* think of typing doesn't count. >> Those >> pesky real users can come up with some really interesting URLs to >> type... :-) > > Lol, I was thinking that might be a problem. > > Thanks for all the great tips, I rea

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Robert Cummings
On Mon, 2006-04-10 at 20:52, darren kirby wrote: > quoth the Richard Lynch: > > Perhaps, then, you should: > > maintain a list of URLs and acceptable "age" of feed. > > Attempt to snag the new content upon visit, if the content is "old" > > Show the "old" content if the feed takes longer than X sec

Re: [PHP] Argument passed by reference?

2006-04-10 Thread Chris
Joe Henry wrote: On Friday 07 April 2006 5:06 pm, tedd wrote: At 1:52 PM -0500 4/6/06, Chris Boget wrote: The way I understand it, pass by reference in php is determined in the function definition and not the function call. Something like: You used to be able to pass by reference at run tim

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
quoth the Richard Lynch: > Perhaps, then, you should: > maintain a list of URLs and acceptable "age" of feed. > Attempt to snag the new content upon visit, if the content is "old" > Show the "old" content if the feed takes longer than X seconds. I really do like this idea, as I would rather use an

Re: [PHP] String is not zero-terminated

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 6:14 pm, Curt Zirzow wrote: > One thing you might want to check is what is triggering this error, > if you are doing a strlen() call this error shouldn't be issued, > IMO. If operation you are doing rely's on the terminating \0, it > most likely should get fixed in php. I'm

RE: [PHP] mod_rewrite q's: syntax?

2006-04-10 Thread Micky Hulse
Hi Richard, > Doing it on only the URLs *you* think of typing doesn't count. Those > pesky real users can come up with some really interesting URLs to > type... :-) Lol, I was thinking that might be a problem. Thanks for all the great tips, I really appreicate your help. Great info... I am loo

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 6:17 pm, Rasmus Lerdorf wrote: > Martin Alterisio wrote: >> Maybe you can read the contents of the feeds using fsockopen() and >> stream_set_timeout() to adjust the timeout, or stream_set_blocking() >> to read it asynchronously, and then load the xml with >> simplexml_load_st

RE: [PHP] mod_rewrite q's: syntax?

2006-04-10 Thread Micky Hulse
> -Original Message- > From: Joe Wollard [mailto:[EMAIL PROTECTED] > I'm not an expert on the topic by any stretch of the > imagination, but I seem to recall reading that it's best to > move everything into httpd.conf for performance reasons. You > may want to investigate that, but oth

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 4:46 pm, darren kirby wrote: > quoth the Robert Cummings: >> >> Why do you do this on every request? Why not have a cron job >> retrieve an >> update every 20 minutes or whatnot and stuff it into a database >> table >> for your page to access? Then if the cron fails to retrie

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Rasmus Lerdorf
Martin Alterisio wrote: Maybe you can read the contents of the feeds using fsockopen() and stream_set_timeout() to adjust the timeout, or stream_set_blocking() to read it asynchronously, and then load the xml with simplexml_load_string(). PS: I forgot to reply to all and mention you'll have to s

Re: [PHP] String is not zero-terminated

2006-04-10 Thread Curt Zirzow
On Mon, Apr 10, 2006 at 03:43:55PM -0500, Richard Lynch wrote: > In order to attempt to figure out why my script segfaults PHP (5.0.4, > 5.1.2, 5.1.3RC3) I've been compiling --with-debug > > That then gives me warnings such as: > > Run-time warning. String is not zero-terminated () (source: >

Re: [PHP] Browser-based scanning

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 2:33 pm, Dan Harrington wrote: > I am needing to build a system that allows a user to visit a website > driven > by a unix hosted apache web server running PHP, login, and scan an > image off > of a TWAIN-compliant scanning device, and upload it to the web server > where > PH

RE: [PHP] String is not zero-terminated

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 4:40 pm, Kristen G. Thorson wrote: > -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED] > Sent: Monday, April 10, 2006 4:44 PM > To: php-general@lists.php.net > Subject: [PHP] String is not zero-terminated > > In order to attempt to figure out why my s

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
quoth the Martin Alterisio: > Maybe you can read the contents of the feeds using fsockopen() and > stream_set_timeout() to adjust the timeout, or stream_set_blocking() > to read it asynchronously, and then load the xml with > simplexml_load_string(). Hello, and thanks for the response, As Robert

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Martin Alterisio
Maybe you can read the contents of the feeds using fsockopen() and stream_set_timeout() to adjust the timeout, or stream_set_blocking() to read it asynchronously, and then load the xml with simplexml_load_string(). PS: I forgot to reply to all and mention you'll have to send the GET http command a

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
quoth the Robert Cummings: > On Mon, 2006-04-10 at 17:46, darren kirby wrote: > > quoth the Robert Cummings: > > > Why do you do this on every request? Why not have a cron job retrieve > > > an update every 20 minutes or whatnot and stuff it into a database > > > table for your page to access? Then

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Robert Cummings
On Mon, 2006-04-10 at 17:46, darren kirby wrote: > quoth the Robert Cummings: > > > > Why do you do this on every request? Why not have a cron job retrieve an > > update every 20 minutes or whatnot and stuff it into a database table > > for your page to access? Then if the cron fails to retrieve th

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
quoth the Robert Cummings: > > Why do you do this on every request? Why not have a cron job retrieve an > update every 20 minutes or whatnot and stuff it into a database table > for your page to access? Then if the cron fails to retrieve the feed it > can just leave the table as is, and your visito

RE: [PHP] String is not zero-terminated

2006-04-10 Thread Kristen G. Thorson
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 4:44 PM To: php-general@lists.php.net Subject: [PHP] String is not zero-terminated In order to attempt to figure out why my script segfaults PHP (5.0.4, 5.1.2, 5.1.3RC3) I've been compiling --wit

[PHP] String is not zero-terminated

2006-04-10 Thread Richard Lynch
In order to attempt to figure out why my script segfaults PHP (5.0.4, 5.1.2, 5.1.3RC3) I've been compiling --with-debug That then gives me warnings such as: Run-time warning. String is not zero-terminated (ÿØÿà) (source: /www/acousticdemo.com/php_cvs/php5.1-200604071630/Zend/zend_variables.h:45)

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread Robert Cummings
On Mon, 2006-04-10 at 15:25, darren kirby wrote: > Hello all, > > My website uses simpleXML to print the headlines from a few different RSS > feeds. The problem is that sometimes the remote feed is unavailable if there > are problems with the remote site, and the result is that I must wait for 3

RE: [PHP] mod_rewrite q's: syntax?

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 12:50 am, Micky Hulse wrote: >> -Original Message- >> From: Chris [mailto:[EMAIL PROTECTED] >> Do you need to do it with a mod_rewrite? >> >> if not, you can do it easily in php: >> >> header('location: folder/file.php'); >> exit(); >> >> in index.php. > > > Unfortuna

Re: [PHP] String /pattern formatting extraction question

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 7:40 am, Andy wrote: > Hi to all, > > I have the following pattern for a string: > > text1 /ptext2 /otext3 > > Now, I want to extract the text by "patterns" from this string by the > following rule: > > no pattern -> text1 (what is before /o or /p) > /p -> text2 (what is afte

[PHP] Re: Implied permissions

2006-04-10 Thread Michael Felt
SLaVKa wrote: Hey guys... implementing a permission system and just wanted some advice. If i have permission A which has implied permissions B and C How do the permissions relate to each other, for eg if I select permission A to true, that implies that permission B and C must be set to true,

Re: [PHP] Browser-based scanning

2006-04-10 Thread John Nichel
Please turn *off* your mailer's request for return receipts when sending to a mailing list. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

RE: Re: [PHP] RSS Generation

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 1:36 pm, [EMAIL PROTECTED] wrote: > Thanks. I had added the header to the file. If the php extension is > good enough, then I am not going to worry about the .htaccess file. I'd be awful careful here... SOME versions of Microsoft IE are particularly stoopid about dealing

Re: [PHP] RSS Generation

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 8:37 am, Robbert van Andel wrote: > I am working on creating some RSS feeds on my website using PHP. I'm > still > learning RSS but it seems easy enough. I managed to create the RSS > giving > the file a PHP extension. When I tried saving it with an xml > extension and > ad

[PHP] Browser-based scanning

2006-04-10 Thread Dan Harrington
Hello everyone, I am needing to build a system that allows a user to visit a website driven by a unix hosted apache web server running PHP, login, and scan an image off of a TWAIN-compliant scanning device, and upload it to the web server where PHP and ImageMagick do some post-processing of the im

Re: [PHP] A question about max_execution_time

2006-04-10 Thread Richard Lynch
On Mon, April 10, 2006 1:48 pm, Eric Butera wrote: > Thank you for your response. I did read that in the manual, I > promise. > That is why I included the sleep function in my example. Shouldn't > the > sleep function count as execution time? One thing I didn't metion > earlier, > for the sake o

[PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
Hello all, My website uses simpleXML to print the headlines from a few different RSS feeds. The problem is that sometimes the remote feed is unavailable if there are problems with the remote site, and the result is that I must wait for 30 seconds or so until the HTTP timeout occurs, delaying th

Re: [PHP] A question about max_execution_time

2006-04-10 Thread Ray Hauge
On Monday 10 April 2006 11:48, Eric Butera wrote: > Ray, > > Thank you for your response. I did read that in the manual, I promise. > That is why I included the sleep function in my example. Shouldn't the > sleep function count as execution time? One thing I didn't metion earlier, > for the sake

Re: [PHP] A question about max_execution_time

2006-04-10 Thread Eric Butera
On 4/10/06, Ray Hauge <[EMAIL PROTECTED]> wrote: > > On Monday 10 April 2006 11:30, Eric Butera wrote: > > Dear List, > > > > I have been working with a PHP script that curls a file from another > > server. This works fine on my local machine, but not on our live > server. > > The script takes abo

RE: Re: [PHP] RSS Generation

2006-04-10 Thread php
Actually, the dot is the end of a sentence ... damn my excellnet grammar skills :) In the htaccess file, I hadn't included a dot at either end of XML. I think I'm going to just leave the file extension as PHP and see how that goes. Thanks, Robbert >Robbert, > >maybe it is only a typo, but you

Re: [PHP] A question about max_execution_time

2006-04-10 Thread Ray Hauge
On Monday 10 April 2006 11:30, Eric Butera wrote: > Dear List, > > I have been working with a PHP script that curls a file from another > server. This works fine on my local machine, but not on our live server. > The script takes about 400 seconds to execute completely. I was under the > impressi

RE: Re: [PHP] RSS Generation

2006-04-10 Thread php
Thanks. I had added the header to the file. If the php extension is good enough, then I am not going to worry about the .htaccess file. >> ... When I tried saving it with an xml extension and >> adding a .htaccess file to the directory in which the file was saved, I get >> prompted to save the

[PHP] A question about max_execution_time

2006-04-10 Thread Eric Butera
Dear List, I have been working with a PHP script that curls a file from another server. This works fine on my local machine, but not on our live server. The script takes about 400 seconds to execute completely. I was under the impression that my call to set_time_limit(900); was helping. Well, I

Re: [PHP] RSS Generation

2006-04-10 Thread Frank Arensmeier
Robbert, maybe it is only a typo, but you have written: "xml." not ".xml" (notice the position of the dot). /frank 10 apr 2006 kl. 15.37 skrev Robbert van Andel: I am working on creating some RSS feeds on my website using PHP. I'm still learning RSS but it seems easy enough. I managed to cr

Re: [PHP] RSS Generation

2006-04-10 Thread Dave Goodchild
If you want to serve .xml files as php, make the relevant change in the http.conf file (if you are using apache). On 10/04/06, Michael Crute <[EMAIL PROTECTED]> wrote: > > On 4/10/06, Robbert van Andel <[EMAIL PROTECTED]> wrote: > > First off, and I'm sorry that this isn't a PHP specific question,

Re: [PHP] how to assign a value to a variable inside a class

2006-04-10 Thread Dave Goodchild
use a setter function. Direct var assignments must be simple constants. A setter function enforces encapsulation. On 10/04/06, Merlin <[EMAIL PROTECTED]> wrote: > > > Hi there, > > I would like to assign a value inside a class like this: > > var $db_username = $old_name; > > Unfortunatelly this do

Re: [PHP] function by reference

2006-04-10 Thread tedd
> Boy, am I in love with this language -- it gives you plenty of shovels to dig yourself in as deep as you want. *lol*. personally I prefer the other format which was what I tried to illustrate with my original example: Oh, you illustrated it very well. I looked intently at it and learned

Re: [PHP] how to assign a value to a variable inside a class

2006-04-10 Thread Brad Bonkoski
How about this: class foo { var $name; function setName($value) { $this->name = $value; } } -B Merlin wrote: Hi there, I would like to assign a value inside a class like this: var $db_username = $old_name; Unfortunatelly this does not work and I do get following error: Par

[PHP] how to assign a value to a variable inside a class

2006-04-10 Thread Merlin
Hi there, I would like to assign a value inside a class like this: var $db_username = $old_name; Unfortunatelly this does not work and I do get following error: Parse error: syntax error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' Thank you for any hint on

Re: [PHP] mod_rewrite q's: syntax?

2006-04-10 Thread Joe Wollard
Mickey, I'm not an expert on the topic by any stretch of the imagination, but I seem to recall reading that it's best to move everything into httpd.conf for performance reasons. You may want to investigate that, but otherwise I don't see anything wrong with what you're doing. On 4/10/06, Micky H

Re: [PHP] function by reference

2006-04-10 Thread Robert Cummings
On Mon, 2006-04-10 at 09:42, tedd wrote: > >It's the same thing for the most part... > > > > > > >$a = 'f_a'; > >call_user_func( $a, $p1, $p2, $p3 ) > > > >?> > > > >Cheers, > >Rob. > > Rob: > > No way dude -- that was too easy! > > Boy, am I in love with this language -- it gives you plenty of

Re: [PHP] Argument passed by reference?

2006-04-10 Thread Joe Henry
On Friday 07 April 2006 5:06 pm, tedd wrote: > At 1:52 PM -0500 4/6/06, Chris Boget wrote: > >>The way I understand it, pass by reference in php is determined in > >>the function definition and not the function call. Something like: > > > >You used to be able to pass by reference at run time. But

Re: [PHP] RSS Generation

2006-04-10 Thread Greg Schnippel
> ... When I tried saving it with an xml extension and > adding a .htaccess file to the directory in which the file was saved, I get > prompted to save the file instead of being able to view the file in a > browser. The only line in the .htaccess file is AddType > application/x-httpd-php xml. I h

Re: [PHP] Re: String /pattern formatting extraction question

2006-04-10 Thread Robin Vickery
On 10/04/06, Andy <[EMAIL PROTECTED]> wrote: > >> text1 /ptext2 /otext3 > > Does it always look like that? > > text1(whitespace)/ptext2(whitespace)/otext3 > > The ideea is to extract the texts before and between /o and /p. > $html = "asdäüü ö ö vf /pxtestxx/ostestss"; > eregi("^([^/.*]*)", $html, $

Re: [PHP] Re: String /pattern formatting extraction question

2006-04-10 Thread Andy
text1 /ptext2 /otext3 Does it always look like that? text1(whitespace)/ptext2(whitespace)/otext3 The ideea is to extract the texts before and between /o and /p. $html = "asdäüü ö ö vf /pxtestxx/ostestss"; eregi("^([^/.*]*)", $html, $reg); print_r($reg); //text is in reg[1] eregi("^(.*)/p([^/.*]

Re: [PHP] function by reference

2006-04-10 Thread tedd
It's the same thing for the most part... Cheers, Rob. Rob: No way dude -- that was too easy! Boy, am I in love with this language -- it gives you plenty of shovels to dig yourself in as deep as you want. Thanks Rob. tedd -- ---

Re: [PHP] RSS Generation

2006-04-10 Thread Michael Crute
On 4/10/06, Robbert van Andel <[EMAIL PROTECTED]> wrote: > First off, and I'm sorry that this isn't a PHP specific question, but does > RSS require an XML extension? And if it does, how do I get the server to > serve the PHP file correctly if I rename it with the xml extension? No, you can use an

[PHP] RSS Generation

2006-04-10 Thread Robbert van Andel
I am working on creating some RSS feeds on my website using PHP. I'm still learning RSS but it seems easy enough. I managed to create the RSS giving the file a PHP extension. When I tried saving it with an xml extension and adding a .htaccess file to the directory in which the file was saved, I g

[PHP] Re: String /pattern formatting extraction question

2006-04-10 Thread Barry
Andy wrote: Hi to all, I have the following pattern for a string: text1 /ptext2 /otext3 Does it always look like that? text1(whitespace)/ptext2(whitespace)/otext3 Then use explode to create an array from it explode (" ",$stringpattern); Now, I want to extract the text by "patterns" from th

Re: [PHP] IP Address Filtering - Problem Continues

2006-04-10 Thread Rahul S. Johari
Ave, I'm being left with lesser and lesser choices then to try CAPCHTA. I'm gonna look into it now and see if I need to implement this now. Thanks. On 4/5/06 3:52 PM, "tedd" <[EMAIL PROTECTED]> wrote: > > Not that I promote CAPCHTA, but there are simple solutions that will > slow down some sp

Re: [PHP] IP Address Filtering - Problem Continues

2006-04-10 Thread Rahul S. Johari
Ave, I had to eliminate that option because his IP is varying drastically. There is no range, it's just drastically varying. I wouldn't be surprised if he's using an IP Spoofing script/program etcetera. On 4/5/06 11:16 AM, "Jay Blanchard" <[EMAIL PROTECTED]> wrote: > You could always block a ra

[PHP] String /pattern formatting extraction question

2006-04-10 Thread Andy
Hi to all, I have the following pattern for a string: text1 /ptext2 /otext3 Now, I want to extract the text by "patterns" from this string by the following rule: no pattern -> text1 (what is before /o or /p) /p -> text2 (what is after /p) /o -> text3 (what is after /o) The order betweeen /o

Re: [PHP] stripping enclosed text from PHP code

2006-04-10 Thread Robin Vickery
On 09/04/06, Winfried Meining <[EMAIL PROTECTED]> wrote: > > Hi, > > I am writing on a script that parses a PHP script and finds all function calls > to check, if these functions exist. To do this, I needed a function that would > strip out all text, which is enclosed in apostrophes or quotation ma

[PHP] imap_search and multiple criteria

2006-04-10 Thread James Nunnerley
Does the imap_search support multiple criteria? I've got the following successfully returning the correct results: However, when you try and put them in the same search e.g. $search = "BODY \"test\" OR SUBJECT \"test\"" It fails... The only way in which I can see this can be

RE: [PHP] mod_rewrite q's: syntax?

2006-04-10 Thread Micky Hulse
Well, I added this to the end of my .htaccess: # Set the index page: RedirectMatch ^/$ http://mydomain.com/folder/folder/index.php Seems to work well, but I am still concerned about pitfalls/optimization/consolidation... er, perfection? ;) TIA, Cheers, Micky -- PHP General Mailing List (http:/