Re: [PHP] about PHP's filter_var function

2012-09-20 Thread Vikash Kumar
You can use regex to check the format: /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ You can also explode $ip on "." and check if every part is numeric and less than 255. On 20 September 2012 14:44, lx wrote: > Hello: >I want to use filter_var function by this way: > > $ip = "1

Re: [PHP] Coding Web search engine in PHP

2012-08-06 Thread Vikash Kumar
On 6 August 2012 19:54, Ansry User 01 wrote: > We are trying to code a very simple and customized search engine for > internal purposes. Please suggest if the PHP is the way to go or suggest > the alternatives?? > > It would be great if you can lead us to the links which would give us a > start!!

Re: [PHP] Too many arrays! My head is exploding!

2012-05-29 Thread Vikash Kumar
On 29 May 2012 18:15, Gary wrote: > Okay, let's assume I have three "things", A, B, and C. I need to produce > an array with a list of all possible combinations of them, however many > there might be in those combinations: e.g. A, B, C, D, AB, AC, AD, BC, > ABC (not sure if I've missed any!). Nor

Re: [PHP] url string being split

2012-04-26 Thread Vikash Kumar
On 26 April 2012 22:27, Chris Stinemetz wrote: > Hello list, > > I'm trying to pass a query string through $_GET but for some reason > the array is being split on '&'. How may I avoid this so it stays > intacted? > > user selection portion: > > while($storerow = mysql_fetch_assoc($storesresult))

Re: [PHP] how to execute Exe file in system

2012-02-17 Thread Vikash Kumar
backtick operator ( http://www.php.net/manual/en/language.operators.execution.php) works like shell_exec() On 17 February 2012 18:00, Negin Nickparsa wrote: > stuart $out = `$cmd`; what it will do? what is `? I didn't ever seen it >

Re: [PHP] How to correctly validate url?

2012-01-18 Thread Vikash Kumar
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:58, Tanel Tammik wrote: > Does anyone have a preg expression to validate the url which includes > these special characters like ÜÕÄÖ in