Re: [PHP] How to correctly validate url?

2012-01-18 Thread Tanel Tammik
false http://exämple.com should be true -- please note the a with dots! Br, Tanel 18.01.2012 13:36, Vikash Kumar kirjutas: Best way is to use filter_var: http://in2.php.net/manual/en/function.filter-var.php filter_var('http://example.com', FILTER_VALIDATE_URL) On 18 January 2012 16:

Re: [PHP] How to correctly validate url?

2012-01-18 Thread Tanel Tammik
Does anyone have a preg expression to validate the url which includes these special characters like ÜÕÄÖ included? Br, Tanel 18.01.2012 12:21, Mokaddim Akm kirjutas: Sent from a handheld device On 18-Jan-2012, at 4:05 PM, Tanel Tammik wrote: Hello, how to correctly validate url? now the

[PHP] How to correctly validate url?

2012-01-18 Thread Tanel Tammik
Hello, how to correctly validate url? now the special local characters like ÜÕÖÄ etc are allowed as well... Br, Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql case statement

2010-06-27 Thread Tanel Tammik
Hello, how to select only if value is present? $query = $db->query("select menus.id, menus.name, case when panels.id is not null then '1' end as hiddenpanel from " . \DB_MENUS . " as menus left join " . \DB_HIDDENPANELS . " as panels on (menus.id = panels.men

Re: [PHP] $_SERVER['REMOTE_ADDR'] and sql injection

2010-06-23 Thread Tanel Tammik
"Michael Shadle" wrote in message news:aanlktildd_gdnlffpuwdx5acwwk45jbu4i6ybbmgj...@mail.gmail.com... > On Wed, Jun 23, 2010 at 12:06 AM, Rene Veerman wrote: >> unlikely. it's a apache delivered ip address.. very little chance of >> insert vulnerabilities, imho. > > still, the overhead for a db

Re: [PHP] $_SERVER['REMOTE_ADDR'] and sql injection

2010-06-23 Thread Tanel Tammik
vulnerabilities, imho. > > On Wed, Jun 23, 2010 at 8:53 AM, Tanel Tammik wrote: >> Hi, >> >> is there a vulnerability with using $_SERVER['REMOTE_ADDR'] in sql >> queries? >> >> Br >> Tanel >> >> >> >> -- &

[PHP] $_SERVER['REMOTE_ADDR'] and sql injection

2010-06-22 Thread Tanel Tammik
Hi, is there a vulnerability with using $_SERVER['REMOTE_ADDR'] in sql queries? Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Delete File With Any File Extension

2010-06-15 Thread Tanel Tammik
"Shaun Thornburgh" wrote in message news:bay148-w43caac3698e0134dfacc28ab...@phx.gbl... Hi, I need to delete a file with any file extension where i know the name of the file, is it possible to use regular expressions with the unlink function? Thanks _

Re: [PHP] finding the web root

2010-06-08 Thread Tanel Tammik
"Jim Lucas" wrote in message news:4c0e99d9.20...@cmsws.com... > Tanel Tammik wrote: >> Hi, >> >> i like to find the web root where the current file is. is there a better >> solution? it must work both on linux and windows machines... >> >&g

[PHP] finding the web root

2010-06-08 Thread Tanel Tammik
Hi, i like to find the web root where the current file is. is there a better solution? it must work both on linux and windows machines... maybe there is a function for that :D:D:D Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

[PHP] array key's: which is correct?

2010-06-08 Thread Tanel Tammik
Hi, which one is correct or "better"? $array[3] = ''; or $array['3'] = ''; $i = 7; $array[$i] = ''; or $array["$i"] = ''; Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] empty() and method return values

2010-06-07 Thread Tanel Tammik
"Peter Lind" wrote in message news:aanlktinmvaqv-hdgjlq_dwoquvojbbmbfrixnxvqk...@mail.gmail.com... On 7 June 2010 21:52, Ashley Sheridan wrote: > On Mon, 2010-06-07 at 22:40 +0300, Tanel Tammik wrote: > >> Hi, >> >> empty() cannot check the return valu

Re: [PHP] empty() and method return values

2010-06-07 Thread Tanel Tammik
"Ashley Sheridan" wrote in message news:1275940320.2248.40.ca...@localhost... > On Mon, 2010-06-07 at 22:40 +0300, Tanel Tammik wrote: > >> Hi, >> >> empty() cannot check the return value of the method or function. which >> would >> be t

Re: [PHP] regular expression

2010-06-07 Thread Tanel Tammik
"Peter Lind" wrote in message news:aanlktilqkz8dnc0zacfv70tctf2wqkgpzojccqtuw...@mail.gmail.com... > On 1 June 2010 17:33, Ashley Sheridan wrote: >> On Tue, 2010-06-01 at 16:31 +0100, Richard Quadling wrote: >> >>> $re1 = '/^[a-z]++$/i'; >>> $re2 = '/^[a-z ]++$/i'; >>> >>> >>> >>> -- >>> -

[PHP] empty() and method return values

2010-06-07 Thread Tanel Tammik
Hi, empty() cannot check the return value of the method or function. which would be the best workaround? empty($class->method()) // gets an error i could do $method_return_value = $class->method() and then run empty() on $method_return_value or is there an better option? i would like to do

Re: [PHP] constant from variable

2010-06-04 Thread Tanel Tammik
"Nathan Rixham" wrote in message news:4c097083.3080...@gmail.com... > Tanel Tammik wrote: >> ""Tanel Tammik"" wrote in message >> news:31.a3.00596.0d759...@pb1.pair.com... >>> "Ashley Sheridan" wrote in message >>> ne

Re: [PHP] constant from variable

2010-06-04 Thread Tanel Tammik
""Tanel Tammik"" wrote in message news:31.a3.00596.0d759...@pb1.pair.com... > > "Ashley Sheridan" wrote in message > news:1275678975.2217.83.ca...@localhost... >> On Fri, 2010-06-04 at 22:07 +0300, Tanel Tammik wrote: >> >>> H

Re: [PHP] constant from variable

2010-06-04 Thread Tanel Tammik
"Ashley Sheridan" wrote in message news:1275678975.2217.83.ca...@localhost... > On Fri, 2010-06-04 at 22:07 +0300, Tanel Tammik wrote: > >> Hi, >> >> define('MYCONST', 'something'); >> >> $my = 'my'; >> $const

[PHP] constant from variable

2010-06-04 Thread Tanel Tammik
Hi, define('MYCONST', 'something'); $my = 'my'; $const = 'const'; is it possible to get the value of MYCONST using variables $my and $const_ Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mysql search html tags excluded

2010-06-04 Thread Tanel Tammik
"Ashley Sheridan" wrote in message news:1275652880.2217.54.ca...@localhost... > On Fri, 2010-06-04 at 14:54 +0300, Tanel Tammik wrote: > >> "Ashley Sheridan" wrote in message >> news:1275652342.2217.51.ca...@localhost... >> > On Fri

Re: [PHP] Mysql search html tags excluded

2010-06-04 Thread Tanel Tammik
"Ashley Sheridan" wrote in message news:1275652342.2217.51.ca...@localhost... > On Fri, 2010-06-04 at 14:44 +0300, Tanel Tammik wrote: > >> "Ashley Sheridan" wrote in message >> news:1275651371.2217.46.ca...@localhost... >> > On Fri

Re: [PHP] Mysql search html tags excluded

2010-06-04 Thread Tanel Tammik
"Ashley Sheridan" wrote in message news:1275651371.2217.46.ca...@localhost... > On Fri, 2010-06-04 at 14:12 +0300, Tanel Tammik wrote: > >> Hello, >> >> if there is some webpage content with html tags in database is it >> possible >> to searc

[PHP] Mysql search html tags excluded

2010-06-04 Thread Tanel Tammik
Hello, if there is some webpage content with html tags in database is it possible to search it without tags? data : 'you need some styling!' when i now search for 'you style' i don't want to get any rows! is it possible? when i search 'you styling' i get the row! Br Tanel -- PHP General

Re: [PHP] Re: convert files utf8

2010-06-04 Thread Tanel Tammik
"Ashley Sheridan" wrote in message news:1275607105.2217.31.ca...@localhost... > On Fri, 2010-06-04 at 00:38 +0300, Tanel Tammik wrote: > >> OP win xp pro >> >> >> ""Tanel Tammik"" wrote in message >> news:91.07.07323.be028...@

[PHP] Re: convert files utf8

2010-06-03 Thread Tanel Tammik
OP win xp pro ""Tanel Tammik"" wrote in message news:91.07.07323.be028...@pb1.pair.com... > Hi, > > does anyone know how to convert all files in a directory and in it's > subdirectories into utf8 encoding? i am using komodo edit as text-editor. >

[PHP] convert files utf8

2010-06-03 Thread Tanel Tammik
Hi, does anyone know how to convert all files in a directory and in it's subdirectories into utf8 encoding? i am using komodo edit as text-editor. may it has a feature which i cannot find... Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

[PHP] regular expression

2010-06-01 Thread Tanel Tammik
How to check with regular expression (preg) if string has: 1. only letters 2. only letters and spaces Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] get classname without namespace

2010-05-30 Thread Tanel Tammik
"Adam Richardson" wrote in message news:aanlktin0wqqlgwgm2lowcdv4i0c6bzsbfxhjwxv_j...@mail.gmail.com... > On Sat, May 29, 2010 at 4:20 PM, Tanel Tammik wrote: > >> Hi, >> >> is there a way to get the called classname without the namespace? >>

[PHP] get classname without namespace

2010-05-29 Thread Tanel Tammik
Hi, is there a way to get the called classname without the namespace? the result i need: childclass the result i get: some\where\childclass also is it possible to get the name() into the static variable if only static method is called? Br Tanel -- PHP General Mailing List (http://www.ph

[PHP] MVC logic

2010-05-29 Thread Tanel Tammik
Hello, i'm trying to break this thing down for my self. i made little application for that. could someone please take a look and let me know if what i wrote resembles MVC inviroment or not. http://keevitaja.com/kool http://keevitaja.com/kool/kool.rar Idea is to create it from scratch for educa