Search found 5 matches

by andre3
Sun Oct 10, 2010 11:36 am
Forum: Regex
Topic: How to write a expression t.o...
Replies: 3
Views: 3908

Re: How to write a expression t.o...

I think I figured it out, thanks for your help :) :drunk:
by andre3
Sun Oct 10, 2010 10:44 am
Forum: Regex
Topic: How to write a expression t.o...
Replies: 3
Views: 3908

Re: How to write a expression t.o...

Try this: if (preg_match('%^<a href[^>]+>[^<>\n]+</a>$%im', $contents)) { # Successful match (simple <a>...</a> link alone on a line) } else { # Match attempt failed } The ^ at the beginning forces the regex to only match at the beginning of a line while the $ at the end forces the regex to only ma...
by andre3
Sat Oct 09, 2010 12:40 am
Forum: PHP - Code
Topic: PHP Question
Replies: 3
Views: 307

Re: PHP Question

Ok, first off thanks for your time. If the site as alot of traffic that strains the databases. Would you still recommend using databases?
by andre3
Sat Oct 09, 2010 12:39 am
Forum: Regex
Topic: How to write a expression t.o...
Replies: 3
Views: 3908

How to write a expression t.o...

Hi, is it possible to write a expression to work with preg match all/ preg match to return true if it finds a line in a file thats only a href tag, example: It will return true for this; A: <a href="link">link text</a> and false if the line of code as anything other than A, even if its jus...
by andre3
Sat Oct 09, 2010 12:26 am
Forum: PHP - Code
Topic: PHP Question
Replies: 3
Views: 307

PHP Question

Hi guys, I am developing a application an I would like to ask a question. the application is more like a file sharing site where users can upload files to the server and share them with their friends. the first instance of the application was developed with 50% mysql and 50% php. I decided to do ano...