[PHP] Re: How do I extract link text from anchor tag as well as the URL from the "href" attribute

2009-08-21 Thread Manuel Lemos
Hello, on 08/16/2009 04:33 AM chrysanhy said the following: > I have the following code to extract the URLs from the anchor tags of an > HTML page: > > $html = new DOMDocument(); > $htmlpage->loadHtmlFile($location); > $xpath = new DOMXPath($htmlpage); > $links = $xpath->query( '//a' ); > foreach

Re: [PHP] Re: How to download and configure php mvc website locally

2009-08-21 Thread Paul M Foster
On Wed, Aug 19, 2009 at 11:00:46PM -1000, Sumit Sharma wrote: > Hi all, > The site I have download was developed using cake php. Now when trying to > access the website it is showing a blank page. As Sudheer suggested I went > to error log and noted down the errors there, which are as follows: >

[PHP] Re: Tidy on a shared host

2009-08-21 Thread Manuel Lemos
Hello, on 08/20/2009 09:47 PM Al said the following: > Or, does anyone know of a stand-alone php class that emulates the tidy > extension. I've looked; but, not found any. Yes, you may want to try this Secure HTML parser filter package. It comes with parser and a filter class that validates HTML

Re: [PHP] HTML text extraction

2009-08-21 Thread Manuel Lemos
Hello, on 08/18/2009 05:37 AM leledumbo said the following: > Usually, a website gives preview of its articles by extracting some of the > first characters. This is easy if the article is a pure text, but what if > it's a HTML text? For instance, if I have the full text: > > > bla bla bla >

Re: [PHP] Re: Extract column names from a (my)SQL query

2009-08-21 Thread דניאל דנון
Update: I've changed it into "/^(\*|[a-z_, \(\)0-9]+)[\s]+FROM[\s]+([a-z_\.]+)(\s+)?(WHERE[\s]+(.+))?\s*(LIMIT\s+([0-9]+)\s*,\s*([0-9]+))?\s*(ORDER BY ([a-z0-9, ]+)?(\s*(DESC|ASC)))?$/Ui" Only problem that on: SELECT * FROM table WHERE field2='field3' ORDER BY id DESC LIMIT 0,10 it outputs Arra

Re: [PHP] Re: Extract column names from a (my)SQL query

2009-08-21 Thread דניאל דנון
You all misunderstood my question, please read my replies above... I'm looking to extract it from a string - *I'm not executing the queries, I only get them as a string* And to the topic: Since everything I found was very complicated to parse, I've crafted my own preg pattern, "/^(\*|[a-z_, \(\

RE: [PHP] Re: Extract column names from a (my)SQL query

2009-08-21 Thread Daevid Vincent
> -Original Message- > From: Nisse Engström [mailto:news.nospam.0ixbt...@luden.se] > > If you're using MySQL, you can try mysql_field_name() > and see if it gets you anywhere. I don't think it works > on empty results though. FYI. It will. -- PHP General Mailing List (http://www.php.ne

RE: [PHP] Is there limitation for switch case: argument's value?

2009-08-21 Thread Daevid Vincent
Whoa! I didn't even know you could use a switch statement like that. In 20 years of coding, I've never ever used a switch like that first "if/else" style. PHP never ceases to amaze me in it's flexibility (and ability to shoot yourself in the foot ;-p ) And remember, all your base are belong to Ad

Re: [PHP] PHP 5.x magic mathods quick question

2009-08-21 Thread Martin Scotta
I think not, but why don't we ask this to PHP ? *<< __set()* is run when writing data to inaccessible members. >> http://php.net/__set So, I think that when you write data to an non-existent member php will first try is the object has an __set method, if not it'll raise a Fatal Error example 1

[PHP] PHP 5.x magic mathods quick question

2009-08-21 Thread Ralph Deffke
do I understand the doc right, that magic methods do exist in any object? creating one (like __set() ) ovewrites the standard one? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Shopping Cart Recommendation

2009-08-21 Thread Ashley Sheridan
On Fri, 2009-08-21 at 08:06 -0700, sono...@fannullone.us wrote: > I'd like to get everyone's opinion on a good PHP shopping cart. We > need something that will handle a lot of similar items and can be > geared for an industrial site selling products from different > manufacturers. It

[PHP] PHP Shopping Cart Recommendation

2009-08-21 Thread sono-io
I'd like to get everyone's opinion on a good PHP shopping cart. We need something that will handle a lot of similar items and can be geared for an industrial site selling products from different manufacturers. It needs to be PCI compliant and able to handle at least 5 sub-category levels

[PHP] Re: Extract column names from a (my)SQL query

2009-08-21 Thread Nisse Engström
On Wed, 19 Aug 2009 22:42:36 +0300, דניאל דנון wrote: > Lets assume I have the following string: > "SELECT field1, field2, field3 FROM tablename WHERE field1 = 'something' " > > Is there any way to get "field1, field2, field3"? assuming it might also > have join, left join - things like that. If

RE: [PHP] about to run PHP script when POST data.

2009-08-21 Thread Arno Kuhl
-Original Message- From: Jacky [mailto:newbde...@gmail.com] Sent: 21 August 2009 03:12 PM To: php-general@lists.php.net Subject: [PHP] about to run PHP script when POST data. Hi guys, As I know When we POST a big data(e.g. 500M) to a php script, the php script only can run after the big

RE: [PHP] Invoking functions stored in a separate directory?

2009-08-21 Thread Arno Kuhl
-Original Message- From: Clancy [mailto:clanc...@cybec.com.au] Sent: 21 August 2009 01:26 PM To: php-general@lists.php.net Subject: [PHP] Invoking functions stored in a separate directory? I am developing an idea for a website engine which can be shared between several different websites.

[PHP] about to run PHP script when POST data.

2009-08-21 Thread Jacky
Hi guys, As I know When we POST a big data(e.g. 500M) to a php script, the php script only can run after the big data finished POST. for example: a.php > and I post 500m data to a.php, after that a.php cannot be died immediately. only when the data finished post. How can I make the a.php di

RE: [PHP] PHP/Ajax Framework - Call for Developers & Testers

2009-08-21 Thread Bob McConnell
From: Raymond Irving > Hi Nathan, > > I agree with you, and I believe that there are many persons > who don't like the idea of hosting all their applications on > a third party server. IMO there are some advantages and > disadvantages to doing so but that's a discussion in itself. Hosted servers

[PHP] Invoking functions stored in a separate directory?

2009-08-21 Thread Clancy
I am developing an idea for a website engine which can be shared between several different websites. Each website would have its own directory under a common root directory, and the engine would be in a separate directory Engine: Root Website_1.com, Website_2.com, Engine The website directories

RE: [PHP] SESSION VARIABLES ACROSS DIFFERENT WINDOWS/TABS

2009-08-21 Thread Leon du Plessis
Hi Jamie. Thanks. Good info. I knew something changed somewhere. This works like a charm in IE8..never saw the New Session option under file...me bad !! Greetings. -Original Message- From: Jaime Bozza [mailto:jbo...@mindsites.com] Sent: 20 August 2009 09:49 PM To: Leon du Plessis; 'Fl