Position of variable definitions [was: Re: [nyphp-talk] php script]

2008-02-22 Thread David Krings
Allen Shaw wrote: That depends on the structure of your script. I would recommend that you define that variable just before it's used, not necessarily at the top of your script. Again, it totally depends on the logical flow of your scripts. This is from a different thread and it caught my a

Re: [nyphp-talk] javascript calling php function

2008-02-22 Thread Susan Shemin
love your insight into this and the clear example you gave! I tried to get the header code to work, but it wouldn't execute the php code, so I went to my saved books on devx/Safari and got some code from the PHP Cookbook about using a form with hidden variables to send the user to the clicked

Re: [nyphp-talk] Best way to develop a PHP web system?

2008-02-22 Thread Jake McGraw
Zend components can be used completely independent from the Zend Framework, in your Drupal boot strapper: require_once 'Zend/Loader.php'; function __autoload($class) { if (strpos($class,'Zend')!==FALSE) { Zend_Loader::loadClass($class); } } You can then go to town with Zend in Drupal, or

Re: [nyphp-talk] Best way to develop a PHP web system?

2008-02-22 Thread Austin Smith
I think it'd be quite difficult to make them work well _together_ but if you just wanted access to the same database, it wouldn't be so bad. The problem is really on Drupal's end... they make everything quite modular, which is nice, but the DB layer is not so modular. If you wanted to integrate Zen

Re: [nyphp-talk] Best way to develop a PHP web system?

2008-02-22 Thread David Mintz
I sometimes wonder -- and I know we are drifting OT here -- what to do where you need both Zend Framework and something like Drupal to co-exist on one site. ZF for your custom database type stuff, Drupal for CMS. Sure, easy to install both independently, but how to keep the look (view, template, wh

Re: [nyphp-talk] Best way to develop a PHP web system?

2008-02-22 Thread Austin Smith
Hoping to find something interesting and new in the Open Source community, I downloaded Lampshade... and it's not open source by any definition I know. Open source means you can change the source code and then distribute your changes, the source code is freely available (not "up to the owner" wheth

Re: [nyphp-talk] Best way to develop a PHP web system?

2008-02-22 Thread Matt Juszczak
How hard is it to take something like this and adapt it to an existing HTML layout? I don't mind RTFM, but I want to make sure if I invest the time it can do what I want. On Fri, 22 Feb 2008, Donald J Organ IV wrote: Check out the Andromeda Database Framework, http://www.andromeda-project.org

Re: [nyphp-talk] Re: Best way to develop a PHP web system?

2008-02-22 Thread Jake McGraw
Currently working with Zend Framework, most every framework does what you're talking about, but I like Zend because: a. You can very easily use individual components without loading the entire library b. Your application is organized in a very simple manner c. Zend Studio has Zend Framework built

Re: [nyphp-talk] Best way to develop a PHP web system?

2008-02-22 Thread Donald J Organ IV
Check out the Andromeda Database Framework, http://www.andromeda-project.org/ I believe it will handle all your needs and then some. Matt Juszczak wrote: Hey folks, I've finally removed myself from all mailing lists that I was on EXCEPT the NY*.* lists, so now I can stop sending my emails t

[nyphp-talk] Re: Best way to develop a PHP web system?

2008-02-22 Thread Aaron Greenspan
Matt, You should take a look at our Lampshade framework. It's open-source and free for personal use. http://www.thinkcomputer.com/software/lampshade/index.html If you download the framework and the starter kit, I think you'll probably have your application up and running in under an hour wit

Re: [nyphp-talk] Best way to develop a PHP web system?

2008-02-22 Thread Austin Smith
I'd advocate Drupal. It's not perfect, and I don't love doing serious development with it, but for ease of use and choice of modules, it's pretty hard to beat. On Fri, Feb 22, 2008 at 11:53 AM, Matt Juszczak <[EMAIL PROTECTED]> wrote: > Hey folks, > > I've finally removed myself from all mailing

[nyphp-talk] Best way to develop a PHP web system?

2008-02-22 Thread Matt Juszczak
Hey folks, I've finally removed myself from all mailing lists that I was on EXCEPT the NY*.* lists, so now I can stop sending my emails to /dev/null and actually be engaged again without getting 500+ messages a day :) Anyway, I have a question that I'm hoping some people can assist me with.

Re: [nyphp-talk] javascript calling php function

2008-02-22 Thread Rolan Yang
csnyder wrote: Right, you can't trust the referer if you fear scripted attacks. John, is that what you were talking about, or was it something more abstract and seo-related? I was picturing people using the open redirect to take advantage of your page rank by causing your site to link to theirs

Re: [nyphp-talk] php script

2008-02-22 Thread Allen Shaw
Radu Cirimpei wrote: I need the remote address first for "now how", then for site security, for my good information, and so on, never a bad behavior! Hi Radu, I didn't mean to question your motives -- sorry if it sounded that way. But you asked "what is the best to do?", and the answer is go

Re: [nyphp-talk] javascript calling php function

2008-02-22 Thread csnyder
> On Fri, Feb 22, 2008 at 9:34 AM, Guilherme Blanco > <[EMAIL PROTECTED]> wrote: > but suggest a user to check for referer is never a good thing. And since you said never, there are plenty of cases where a referer check can be used to stop abuse. Consider misappropriation of images as an exam

Re: [nyphp-talk] javascript calling php function

2008-02-22 Thread csnyder
On Fri, Feb 22, 2008 at 9:34 AM, Guilherme Blanco <[EMAIL PROTECTED]> wrote: > Just one point... > > NEVER trust HTTP_REFERER. > > You can change the HTTP_REFERER in a simple curl request. > I didn't read the thread entirely, but suggest a user to check for > referer is never a good thing. > R

Re: [nyphp-talk] php script

2008-02-22 Thread Radu Cirimpei
Hi Allen, I need the remote address first for "now how", then for site security, for my good information, and so on, never a bad behavior! Radu Allen Shaw <[EMAIL PROTECTED]> wrote: Radu Cirimpei wrote: > If I use 'getenv("REMOTE_ADDR") ' for return the IP > address of the > person visitin

Re: [nyphp-talk] javascript calling php function

2008-02-22 Thread Guilherme Blanco
Just one point... NEVER trust HTTP_REFERER. You can change the HTTP_REFERER in a simple curl request. I didn't read the thread entirely, but suggest a user to check for referer is never a good thing. Regards. On Fri, Feb 22, 2008 at 11:30 AM, csnyder <[EMAIL PROTECTED]> wrote: > On Fri, Feb 22

Re: [nyphp-talk] javascript calling php function

2008-02-22 Thread csnyder
On Fri, Feb 22, 2008 at 4:13 AM, inforequest <[EMAIL PROTECTED]> wrote: > > Just a warning that if possible your tracking script should limit its > function to your known intended destinations else fail or whatever. > Don't leave it "open" or you may find your site being utilized by others > as

Re: [nyphp-talk] php script

2008-02-22 Thread Guilherme Blanco
HI, Th right way to store IPs is by converting them to long using ip2long. By doing it, you can check if it is valid (returns false on failure) and also enable you a by region search. There are services like geocode, ip2country, geoip, etc that gives you a database of countries with their ip2lon

Re: [nyphp-talk] php script

2008-02-22 Thread Allen Shaw
Radu Cirimpei wrote: If I use 'getenv("REMOTE_ADDR") ' for return the IP address of the person visiting my site, what is the best to do? Hi Radu, You can give us a little more detail, right? Tell us, what are you trying to accomplish -- that is, /why/ do you need the remote address, and wha

[nyphp-talk] php script

2008-02-22 Thread Radu Cirimpei
Hello, If I use 'getenv("REMOTE_ADDR") ' for return the IP address of the person visiting my site, what is the best to do? To save in a variable, like '$ip = getenv("REMOTE_ADDR"); , then insert it in a database(MySQL),then take it with a sql query and write it in another place saw only by me? -w

Re: [nyphp-talk] javascript calling php function

2008-02-22 Thread inforequest
Susan Shemin susan_shemin-at-yahoo.com |nyphp dev/internal group use| wrote: Austin, you rock!! I got it to work perfectly using the redirect, and it's exactly what I needed. Thanks to all of you, but I was looking for this type of simple and elegant (to quote a Pascal programming professor

Re: [nyphp-talk] javascript calling php function

2008-02-22 Thread Susan Shemin
Austin, you rock!! I got it to work perfectly using the redirect, and it's exactly what I needed. Thanks to all of you, but I was looking for this type of simple and elegant (to quote a Pascal programming professor years ago) solution. Susan - Original Message From: Austin Smith <[E