Re: [PHP] How to get all links from a webpage?

2004-07-25 Thread Wudi
On Mon, 26 Jul 2004 11:44:04 +0800 Jason Wong <[EMAIL PROTECTED]> wrote: > On Monday 26 July 2004 10:05, Wudi wrote: > > > Thank you. I have found a method to get links. But it's slow. > > The script replaced the links, marked it. > > And then foreach() all texts were marked. > > But the blank sp

Re: [PHP] Re: Parsing error when XML version is mentioned

2004-07-25 Thread Justin French
On 26/07/2004, at 7:29 AM, Scrumpy wrote: [EMAIL PROTECTED] (Suresh Manoharan) wrote in news:[EMAIL PROTECTED]: I am getting parse error [Parse error: parse error, unexpected T_STRING on line 1] when I use XML version info. http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/19

[PHP] available timezones

2004-07-25 Thread Justin French
Is there any way to retrieve an array of the available timezones on a Unix system for use with putenv("TZ=...")? Usually they're stored in /usr/share/zoneinfo/ on my Mac, but I don't like my chances of: - them being in the same place on every server - them being readable via a PHP script If ther

[PHP] Sticky session after session_destroy...

2004-07-25 Thread Aldwyn Clavin
Hi all ! I'm developping a little web site with PHP via EasyPHP (http://www.easyphp.org) and I have a problem with sessions. I use this software only to create and debugging PHP when I'm offline. :) if (isset($_GET['log'])) { switch($_GET['log']) { case 'out': session_start(

Re: [PHP] How to get all links from a webpage?

2004-07-25 Thread Jason Wong
On Monday 26 July 2004 10:05, Wudi wrote: > Thank you. I have found a method to get links. But it's slow. > The script replaced the links, marked it. > And then foreach() all texts were marked. > But the blank space always make troubles. As you haven't posted any code nor described the problem in

Re: [PHP] PHP function speed testing

2004-07-25 Thread Jason Wong
On Monday 26 July 2004 06:21, Shawn McKenzie wrote: > O.K. So I've written my application and debugged it, and now I want to > try and optimize the speed. I have written a little test script to test > the time of each PHP function that I can use in a certain situation > (ereg, eregi, strpos). P

Re: [PHP] Parsing error when XML version is mentioned

2004-07-25 Thread Jason Wong
On Monday 26 July 2004 05:39, Suresh Manoharan wrote: > Good learning experience for me. Found more information in the following > links: > > http://www.php.net/manual/en/language.basic-syntax.php > http://www.php.net/manual/en/ini.sect.language-options.php#ini.short-open-t >ag Also manual > Appe

Re: [PHP] Re: Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Robert Frame
Thanks Ash, you were on to the right solution. Because there is no newline character, there is nothing ending the JavaScript line. I had to add a ';' prior to the single quote ending the echo line. Each statement now looks like echo 'Info = new Array(4);'; Or to add a bit more code: '; ec

[PHP] replace value of array by key of array in string variable with pre g_replace()

2004-07-25 Thread Turbo
Hi, I have array variable and string variable. I want to replace value of array by key of array in string variable with preg_replace(). Example : $message=array( 'name'=>'My Computer', 'version'=>'1.0' ); $strValue="I am $name,build version $version\n"; How's to replace? Yingyos -- PHP General M

Re: [PHP] URGENT: Space char in rewriterule

2004-07-25 Thread Marek Kilimajer
Robert Winter wrote: I have the following rewriterule: RewriteRule ^(([0-9]|[A-Z]|[a-z]|_)+)$ redirect.php?$1 [L] that transforms http://mysite.com/XXX to http://mysite.com/redirect.php?XXX and I need to also include to space char, for example that transforms http://mysite.com/AB XX to http://mysit

Re: [PHP] Fwd: IMPORTANT: Please Verify Your Message

2004-07-25 Thread Mark
--- Jason Wong <[EMAIL PROTECTED]> wrote: > On Sunday 25 July 2004 09:42, Mark wrote: > > Am I the only one who gets annoyed at these? > > No you're not. Look in the past week's archives. > > > [EMAIL PROTECTED], [EMAIL PROTECTED] is currently > > You've got the culprit here. Either lambast him

Re: [PHP] How to get all links from a webpage?

2004-07-25 Thread Wudi
On Mon, 26 Jul 2004 02:03:56 +0800 Jason Wong <[EMAIL PROTECTED]> wrote: > On Sunday 25 July 2004 13:14, Wudi wrote: > > I repeat: > > > > Hmmm it needs to be able to *find* the links before it can replace them. > > > Just borrow the code that finds the links. > > The "get" links part, the bit

[PHP] URGENT: Space char in rewriterule

2004-07-25 Thread Robert Winter
I have the following rewriterule: RewriteRule ^(([0-9]|[A-Z]|[a-z]|_)+)$ redirect.php?$1 [L] that transforms http://mysite.com/XXX to http://mysite.com/redirect.php?XXX and I need to also include to space char, for example that transforms http://mysite.com/AB XX to http://mysite.com/redirect.ph

Re: [PHP] INSERT INTO using foreach

2004-07-25 Thread Marek Kilimajer
Alex Hogan wrote: Hi All, I have a form with several values to insert. I thought that I remember a thread that discussed using a loop to insert $_POSTed values. I am trying; foreach($_POST as $key => $value){ if($key == 'Submit'){ exit; i think you want break; or continue; here, exit; ends

Re: [PHP] good PHP to PDF libary?

2004-07-25 Thread Louie Miranda
do those pdf class support Unicode? So far, pdflib only supports unicode. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Ash Young
I'd suggest putting some new line characters in after the '; ?> ... echo ' '; As soon as I hit the button 'Window' I get an ''object expected" error. Any thoughts? Rob "Robert Frame" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > After I posted this I did some more searching o

Re: [PHP] Re: Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Comex
That wouldn't include newlines.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Robert Frame
OK, now I am bewildered again. Sample Code '; echo ' '; ?> ... echo ' '; As soon as I hit the button 'Window' I get an ''object expected" error. Any thoughts? Rob "Robert Frame" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > After I posted this I did some more searching on go

Re: [PHP] Re: class help (PLEASE)

2004-07-25 Thread PHP Gen
Thanks, Will first try learning RegEX then will move onto classes ore again will have problems in the future. Will screw around with the class and see what happens but if you do figure it out, please drop me a line. Thanks, Mag --- Jason Barnett <[EMAIL PROTECTED]> wrote: > > Hey Jason, > > No of

Re: [PHP] Re: class help (PLEASE)

2004-07-25 Thread Jason Barnett
Hey Jason, No offense at all taken, am happy you read part of my help-email. Problem is, like I said, I dont have a clue about the workings of a class and all the pointing like this $this-> blah (->) means blah is a property of the class. ($this) means an instance of the class. gets me totally co

Re: [PHP] Re: class help (PLEASE)

2004-07-25 Thread PHP Gen
--- Jason Barnett <[EMAIL PROTECTED]> wrote: > No offense intended, but I'm not going to read > through all of that. Narrow down > the code block that gives you problems and then post > that one block here... not > the entire class. > Hey Jason, No offense at all taken, am happy you read part

[PHP] Regex (Phone Number)

2004-07-25 Thread Albert Padley
I have been struggling with a javascript regex validation for U.S. phone numbers all afternoon. This is part of Manuel Lemos' Formsgen class. This is limited to the 7 digit number sans 3 digit area code. To be complete, the regex should disallow a phone number that begins with 0 or 1, 555 or an

[PHP] Re: PHP function speed testing

2004-07-25 Thread Jason Barnett
Shawn McKenzie wrote: O.K. So I've written my application and debugged it, and now I want to try and optimize the speed. I have written a little test script to test Several profilers / debuggers will help you optimize on speed... by telling you how much time the parser spends inside a function

[PHP] PHP function speed testing

2004-07-25 Thread Shawn McKenzie
O.K. So I've written my application and debugged it, and now I want to try and optimize the speed. I have written a little test script to test the time of each PHP function that I can use in a certain situation (ereg, eregi, strpos). Problem is, no matter what I do, the first function I test

[PHP] Re: class help (PLEASE)

2004-07-25 Thread Jason Barnett
No offense intended, but I'm not going to read through all of that. Narrow down the code block that gives you problems and then post that one block here... not the entire class. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Parsing error when XML version is mentioned

2004-07-25 Thread Suresh Manoharan
Thanks, Eoghan. It works. Good learning experience for me. Found more information in the following links: http://www.php.net/manual/en/language.basic-syntax.php http://www.php.net/manual/en/ini.sect.language-options.php#ini.short-open-tag "Eoghan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL

[PHP] Re: Parsing error when XML version is mentioned

2004-07-25 Thread Scrumpy
[EMAIL PROTECTED] (Suresh Manoharan) wrote in news:[EMAIL PROTECTED]: > I am getting parse error [Parse error: parse error, unexpected > T_STRING on line 1] when I use XML version info. > > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> >http://www.w3.org/1999/xhtml"; xml:lang="en-US"

[PHP] Re: Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Robert Frame
After I posted this I did some more searching on google and found the following code, which works. echo 'function myWindow(){ alert("javascript from php");}'; I then tried it without the tag and it still worked. Apparently I had something out of wack, probably a quote. Off hand though, can

Re: [PHP] Parsing error when XML version is mentioned

2004-07-25 Thread eoghan
instead of that line use this \n" ?> Can you pls. help me understand why parsing error occurs and how to avoid it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: If...Or...Else

2004-07-25 Thread Skippy
On Sun, 25 Jul 2004 15:42:42 +0200 "rush" <[EMAIL PROTECTED]> wrote: > "Jason Davidson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > ah right.. :) > > Jason > > OR has a very low priority , and right argument is not evaluated if left > one is true. Same thing happens with ||,

[PHP] Parsing error when XML version is mentioned

2004-07-25 Thread Suresh Manoharan
Hey Guys, I am getting parse error [Parse error: parse error, unexpected T_STRING on line 1] when I use XML version info. http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="en-US" lang="en-US"> Testing Page Hi When I store the above file as tes

[PHP] Re: Code elegance and cleanliness

2004-07-25 Thread Al
Not really knowing why you need to provide indexes for the array, since they are generated automatically if none are provided, I'd use: $imgBkgrnd = array( 'bkgrnd-default.gif', 'bkgrnd-positive.gif', 'bkgrnd-negative.gif' ); $imgNeeded = table['field']; $imgName = $imgBkgrnd[$imgNeeded]; The

Re: [PHP] Question about for

2004-07-25 Thread Miroslav Hudak (php/ml)
m. Henri Marc wrote: Hello, I woudlike to use a loop: for ($i=1;$i<11;$i++) But instead of incrementing with 1, I would like to increment by 2. So $i would be 1,3,5,7,9. I tried to find the answer may be with "step" but couldn't find anything. Thank you for your help. Dave Vous manquez d

[PHP] class help (PLEASE)

2004-07-25 Thread PHP Gen
Hi, After searching the archives and google I found a class that does bb code conversions, although I know how to use classes (thanks to the docs the writers write) I dont really understand them too well. The class is REALLY good and covers all my needs (which is to display php code in colors) but

Re: [PHP] PHP Web Mail

2004-07-25 Thread robert mena
Yeah, but it is slow as hell. webmiau in the other way is fast On Mon, 5 Jul 2004 12:45:33 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Try www.horde.org > > It's not only a webmail client, but has a whole load more! > > Nunners > > Quoting "I.A. Gray" <[EMAIL PROTECTED]>: > > > Tha

Re: [PHP] Re: DOMXML support should be added to PHP5

2004-07-25 Thread Scrumpy
[EMAIL PROTECTED] (Christian Stocker) wrote in news:[EMAIL PROTECTED]: >> Looking at the two approaches, I preferred using DOMXML and as it was >> based on libxml2 & libxslt it seemed to be the better option. > > I don't get that. The new DOM and XSL extension is still based on > libxml2 and li

RE: [PHP] Question about for

2004-07-25 Thread Ash Young
You could try for ($i=1;$i<11;$i=$i+2) -- ash young :: http://evoluted.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Question about for

2004-07-25 Thread Henri Marc
Hello, I woudlike to use a loop: for ($i=1;$i<11;$i++) But instead of incrementing with 1, I would like to increment by 2. So $i would be 1,3,5,7,9. I tried to find the answer may be with "step" but couldn't find anything. Thank you for your help. Dave Vou

Re: [PHP] Re: include_path ???

2004-07-25 Thread Jason Wong
On Sunday 25 July 2004 19:54, Jason Barnett wrote: > Magic 8-ball says: > !!!Search your hard drive for php.ini!!! The definitive way to find out where PHP is expecting its php.ini file is to use phpinfo() -- no need for 8-balls, magic or otherwise :) -- Jason Wong -> Gremlins Associates -> w

Re: [PHP] How to get all links from a webpage?

2004-07-25 Thread Jason Wong
On Sunday 25 July 2004 13:14, Wudi wrote: Please do not top post. > This script can replace links: > $text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", " href=\"\\0\">\\0", $text); But it cannot get the links. I repeat: > > Hmmm it needs to be able to *find* the links before

Re: [PHP] Refer a class

2004-07-25 Thread Michael Ochs
I can call $myclass->module['mymodule']->variable; so I think the class is instantiate correctly. But the reference doesn't seem to work, cause the variable I get ist always the same: $myclass->nickname = "xyz"; $class2 = $myclass->loadModule("mysecondclass"); $myclass->nickname = "abc"; Now, whe

Re: [PHP] Refer a class

2004-07-25 Thread Jason Davidson
If there is no error, check the values of all the vars and array ellements in your logic for the first method. Make sure its actually getting to the point where it instantiates the new object. Jason On Sun, 25 Jul 2004 19:36:44 +0200, Michael Ochs <[EMAIL PROTECTED]> wrote: > Hi, > I try to load

Re: [PHP] PHP - mySQL query question

2004-07-25 Thread Jason Davidson
single quote 'y' Jason On Sun, 25 Jul 2004 11:05:23 -0400, Karl-Heinz Schulz <[EMAIL PROTECTED]> wrote: > I have a simple question (not for me). > > Why does this query does not work? > > $links_query = mysql_query("select id, inserted, title, information, > international from links WHE

Re: [PHP] Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Jason Davidson
Hey, keep trying, you can use php to generate JS to send to the browser, its especially usefull for form validation as you said. Make sure your JS is correct, and within script tags. Start with simple JS, like, alert("i worked"); then start adding one piece at a time and constantly checking to s

[PHP] Refer a class

2004-07-25 Thread Michael Ochs
Hi, I try to load some 'modules' into my class. These modules are other classes. I want to refer the main class to this new module but that doesn't work. At the moment it looks like this: Mainclass: function loadModule($name) { if(class_exists($name)) { //Class found if(!$this->modul

[PHP] Can't find the rest of the this article? [HAB]

2004-07-25 Thread EE
Dears, Can anyone tell me where can I find the rest of this artilce i.e. parts 2-6: Building a Members Area with PHP - Part 1 of 6 -- By Ben Rowe I tried to search/google for it on the net with but with no help. I went to the site that where I got part 1 of 6 but with no help? Plz help. -- PH

[PHP] Re: Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Manuel Lemos
Hello, On 07/25/2004 12:05 PM, Robert Frame wrote: I have a web page with a form that is generated by PHP, and part of my design utilizes JavaScript to provide some error checking within the objects in the form. I have written the javascript in an html document, but I am having trouble blending th

RE: [PHP] Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Ash Young
Are you getting any error message at all or is the JavaScript just failing? If your receiving a PHP error, are you sure you've escaped all the quotes in the JavaScript? -- ash young :: http://evoluted.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

[PHP] Re: Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Torsten Roehr
"Robert Frame" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi There, > > I have a web page with a form that is generated by PHP, and part of my > design utilizes JavaScript to provide some error checking within the objects > in the form. I have written the javascript in an html d

[PHP] Embedding JavaScript into a PHP generated web page

2004-07-25 Thread Robert Frame
Hi There, I have a web page with a form that is generated by PHP, and part of my design utilizes JavaScript to provide some error checking within the objects in the form. I have written the javascript in an html document, but I am having trouble blending the two together. I have tried sending th

Re: [PHP] PHP - mySQL query question

2004-07-25 Thread John W. Holmes
Karl-Heinz Schulz wrote: I have a simple question (not for me). Why does this query does not work? $links_query = mysql_query("select id, inserted, title, information, international from links WHERE international = y; order by inserted desc LIMIT 0 , 30"); The information for the "internati

[PHP] PHP - mySQL query question

2004-07-25 Thread Karl-Heinz Schulz
I have a simple question (not for me). Why does this query does not work? $links_query = mysql_query("select id, inserted, title, information, international from links WHERE international = y; order by inserted desc LIMIT 0 , 30"); The information for the "international" fields are: Fie

Re[4]: [PHP] Disk serial number

2004-07-25 Thread Tom Rogers
Hi, Sunday, July 25, 2004, 9:48:20 PM, you wrote: R> This didn't work :( R> Apache crashes after execution of script. Yes it does that ...you can download a working version here http://fred.kwikin.com/php_w32api.dll -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Re: Learning Regex

2004-07-25 Thread PHP Gen
> This helped me get started with Perl-compatible > regular expressions: > > http://www.weitz.de/regex-coach/ > Thanks Jason, will try it immd. Cheers, Mag. = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, ev

Re: [PHP] Re: If...Or...Else

2004-07-25 Thread rush
"Jason Davidson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > ah right.. :) > Jason OR has a very low priority , and right argument is not evaluated if left one is true. In other words OR is here so that you could in pre exception handling days easily write something like this: m

Re: [PHP] Re: DOMXML support should be added to PHP5

2004-07-25 Thread Christian Stocker
On 25 Jul 2004 12:34:15 -, Scrumpy <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Jason Barnett) wrote in > news:[EMAIL PROTECTED]: > > > Well you are right that if > > you used the old DOMXML functions in PHP4 that there is no clean way > > to move that code forward without rewriting / suppo

[PHP] Re: DOMXML support should be added to PHP5

2004-07-25 Thread Scrumpy
[EMAIL PROTECTED] (Jason Barnett) wrote in news:[EMAIL PROTECTED]: > Well you are right that if > you used the old DOMXML functions in PHP4 that there is no clean way > to move that code forward without rewriting / supporting two > infrastructures. I'm not a core developer but my guess is that t

[PHP] Re: include_path ???

2004-07-25 Thread Jason Barnett
Lester Caine wrote: D_angle wrote: This is taken right out of the download of PHP 5 zip file "php-5.0.0-Win32.zip". Opening the "php.ini-recommended" it states the following configuration php.ini-recommended is probably not the one being used... if you want to use this you most likely just need to

Re: Re[2]: [PHP] Disk serial number

2004-07-25 Thread Rosen
This didn't work :( Apache crashes after execution of script on this row: $api->registerfunction("long GetLastError Alias GetError () >From kernel32.dll"); > > "Tom Rogers" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > Friday, July 23, 2004, 8:08:22 PM, you wr

Re: Re[2]: [PHP] Disk serial number

2004-07-25 Thread Rosen
This didn't work :( Apache crashes after execution of script. "Tom Rogers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Friday, July 23, 2004, 8:08:22 PM, you wrote: > R> I receive an error: > > R> "Warning: dl(): Not supported in multithreaded Web servers - use extensio

Re: [PHP] How to get all links from a webpage?

2004-07-25 Thread Jason Barnett
Wudi wrote: This script can replace links: $text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "\\0", $text); But it cannot get the links. Magic 8-ball says... go read ereg() in your manual. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

[PHP] Re: include_path ???

2004-07-25 Thread Lester Caine
D_angle wrote: This is taken right out of the download of PHP 5 zip file "php-5.0.0-Win32.zip". Opening the "php.ini-recommended" it states the following configuration What is in the php.ini in your windows directory? THAT is the copy that PHP is using. ( Is there something missing in the install n