Re: [PHP] variable type - conversion/checking

2013-03-14 Thread Jim Lucas
On 3/14/2013 4:05 PM, Matijn Woudt wrote: On Thu, Mar 14, 2013 at 11:44 PM, Jim Lucas wrote: On 03/14/2013 11:50 AM, Samuel Lopes Grigolato wrote: Something like "if (is_numeric($var)&& $var == floor($var))" will do the trick. I don't know if there's a better (more elegant) way. On Thu,

Re: [PHP] variable type - conversion/checking

2013-03-14 Thread Matijn Woudt
On Thu, Mar 14, 2013 at 11:44 PM, Jim Lucas wrote: > On 03/14/2013 11:50 AM, Samuel Lopes Grigolato wrote: > >> Something like "if (is_numeric($var)&& $var == floor($var))" will do the >> >> trick. I don't know if there's a better (more elegant) way. >> >> >> On Thu, Mar 14, 2013 at 3:09 PM, Mat

Re: [PHP] variable type - conversion/checking

2013-03-14 Thread Jim Lucas
On 03/14/2013 11:50 AM, Samuel Lopes Grigolato wrote: Something like "if (is_numeric($var)&& $var == floor($var))" will do the trick. I don't know if there's a better (more elegant) way. On Thu, Mar 14, 2013 at 3:09 PM, Matijn Woudt wrote: On Thu, Mar 14, 2013 at 7:02 PM, georg wrote: Hi

[PHP] php gd extension with cPanel

2013-03-14 Thread David Mehler
Hello, I'm hoping there's an easy fix for this. I've got a centos server machine 6.4 I believe with cPanel running on it. I need to enable the gd extension, both the gd and gd-devel rpm packages are installed, but php is not, that is showing up in a package list. It is however installed as it's go

[PHP] PHP context editor

2013-03-14 Thread georg
hello, annyone knows of some good PHP context editor freeware ? (tired of missing out on trivials like ; ) regards Georg

Re: [PHP] Re: Accessing Files Outside the Web Root - ProgressReport 1

2013-03-14 Thread Jim Giner
On 3/14/2013 3:44 PM, Dale H. Cook wrote: At 01:26 PM 3/14/2013, Jim Giner wrote: I don't think you ever want the filename buried in the web page. Why not? The file itself is outside the root. In any case the finished product will use tokens instead of filenames. While I am working out the b

Re: [PHP] Re: Accessing Files Outside the Web Root

2013-03-14 Thread Dale H. Cook
At 02:27 PM 3/14/2013, Marc Guay wrote: >Assuming humans will continue to behave as I've seen them behave so >far, even this "simple" system will guarantee you angry emails from >people who'll want to argue that "five" is a colour in some >circumstances. Marc has a very valid point. My goal is to

[PHP] ODBC obscuring the SQL result ?

2013-03-14 Thread georg
Hi (again), Im doing a $res = odbc_prepare... with a select statement and $succ = odbc_execute($res) im missing how to get the return information on whether I got any hit or not in the table now !! the REF MAN is clearly sloppy; in writing moment i see that $succ is a boolea

Re: [PHP] Re: Accessing Files Outside the Web Root - Progress Report 1

2013-03-14 Thread Dale H. Cook
At 01:26 PM 3/14/2013, Jim Giner wrote: >I don't think you ever want the filename buried in the web page. Why not? The file itself is outside the root. In any case the finished product will use tokens instead of filenames. While I am working out the bugs it is easier to use filenames. I use an

Re: [PHP] Accessing Files Outside the Web Root

2013-03-14 Thread Dale H. Cook
At 12:40 PM 3/14/2013, Ravi Gehlot wrote: >In order to address the problem, you should create a "Members Restricted Area" You need to understand my target demo to understand my approach. Much of my target audience for those files is elderly and not very computer savvy. Having to register for ac

Re: [PHP] variable type - conversion/checking

2013-03-14 Thread Samuel Lopes Grigolato
Something like "if (is_numeric($var) && $var == floor($var))" will do the trick. I don't know if there's a better (more elegant) way. On Thu, Mar 14, 2013 at 3:09 PM, Matijn Woudt wrote: > On Thu, Mar 14, 2013 at 7:02 PM, georg wrote: > > > Hi, > > > > I have tried to find a way to check if a

Re: [PHP] Re: Accessing Files Outside the Web Root

2013-03-14 Thread Marc Guay
> correlate various types of information, which is very hard. For a human, > this is very simple. It's simple, and very friendly to your guests. Assuming humans will continue to behave as I've seen them behave so far, even this "simple" system will guarantee you angry emails from people who'll wan

Re: [PHP] Re: Accessing Files Outside the Web Root

2013-03-14 Thread Maciek Sokolewicz
On 14-3-2013 17:43, Dale H. Cook wrote: At 11:20 AM 3/14/2013, Jim Giner wrote: And use a captcha (which I personally can never read!) to keep the robots at bay. I dislike CAPTCHAs, and some bots are pretty good at beating them. I'm exploring alternatives that exploit the differences betwee

Re: [PHP] variable type - conversion/checking

2013-03-14 Thread Matijn Woudt
On Thu, Mar 14, 2013 at 7:02 PM, georg wrote: > Hi, > > I have tried to find a way to check if a character string is possible to > test whether it is convertible to an intger ! > > any suggestion ? > > BR georg You could use is_numeric for that, though it also accepts floats. - Matijn

[PHP] variable type - conversion/checking

2013-03-14 Thread georg
Hi, I have tried to find a way to check if a character string is possible to test whether it is convertible to an intger ! any suggestion ? BR georg

Re: [PHP] Re: Accessing Files Outside the Web Root

2013-03-14 Thread Jim Giner
On 3/14/2013 12:43 PM, Dale H. Cook wrote: At 11:20 AM 3/14/2013, Jim Giner wrote: And use a captcha (which I personally can never read!) to keep the robots at bay. I dislike CAPTCHAs, and some bots are pretty good at beating them. I'm exploring alternatives that exploit the differences bet

[PHP] Re: Accessing Files Outside the Web Root - Progress Report 1

2013-03-14 Thread Jim Giner
On 3/14/2013 12:40 PM, Dale H. Cook wrote: I have made some progress. It occurred to me that the problem that I had in accessing files outside the web root could be a pathing problem, and that was the case. I finally ran phpinfo() and examined &_SERVER["DOCUMENT_ROOT"] to see what the correct p

[PHP] Accessing Files Outside the Web Root - Progress Report 1

2013-03-14 Thread Dale H. Cook
I have made some progress. It occurred to me that the problem that I had in accessing files outside the web root could be a pathing problem, and that was the case. I finally ran phpinfo() and examined &_SERVER["DOCUMENT_ROOT"] to see what the correct path should be. I then figured that for porta

Re: [PHP] Re: Accessing Files Outside the Web Root

2013-03-14 Thread Dale H. Cook
At 11:20 AM 3/14/2013, Jim Giner wrote: >And use a captcha (which I personally can never read!) to keep the robots at >bay. I dislike CAPTCHAs, and some bots are pretty good at beating them. I'm exploring alternatives that exploit the differences between the ways that bots deal with pages and

Re: [PHP] Accessing Files Outside the Web Root

2013-03-14 Thread Ravi Gehlot
Hello Dale, The spiders are not the only problem. The issue here is that anyone can download your files from your website and then make them available elsewhere. In order to address the problem, you should create a "Members Restricted Area" where members only could download your files. You can the

[PHP] Re: Accessing Files Outside the Web Root

2013-03-14 Thread Jim Giner
On 3/13/2013 4:38 PM, Dale H. Cook wrote: Let me preface my question by noting that I am virtually a PHP novice. Although I am a long-time webmaster, and have used PHP for some years to give visitors access to information in my SQL database, this is my first attempt to use it for another purpo

Re: FW: [PHP] Accessing Files Outside the Web Root

2013-03-14 Thread Dale H. Cook
At 04:06 AM 3/14/2013, tamouse mailing lists wrote: >If the files are delivered via the web, by php or some other means, even if >located outside webroot, they'd still be scrapeable. Bots, however, being "mechanical" (i.e., hard wired or programmed) behave in different ways than humans, and that

Re: [PHP] Re: Generating CRUD code for normalized db

2013-03-14 Thread tamouse mailing lists
On Mar 13, 2013 1:52 PM, "Ashley Sheridan" wrote: > > On Wed, 2013-03-13 at 19:24 +0100, Marco Behnke wrote: > > > Am 13.03.13 12:57, schrieb Gary: > > > ma...@behnke.biz wrote: > > > > > >> Do us all a favor abnd stay away from open source if you do not honor > > >> the work > > >> us wannabes pu

Re: FW: [PHP] Accessing Files Outside the Web Root

2013-03-14 Thread tamouse mailing lists
On Mar 13, 2013 7:06 PM, "David Robley" wrote: > > "Dale H. Cook" wrote: > > > At 05:04 PM 3/13/2013, Dan McCullough wrote > > : > >>Web bots can ignore the robots.txt file, most scrapers would. > > > > and at 05:06 PM 3/13/2013, Marc Guay wrote: > > > >>These don't sound like robots that would re