Re: [PHP] any https / php gotchas ???

2005-12-30 Thread Colin Ross
this all depends on the web server (IIS/Apache) being used...

On 12/26/05, Curt Zirzow <[EMAIL PROTECTED]> wrote:
>
> On Mon, Dec 26, 2005 at 07:42:48AM +, Dave Carrera wrote:
> > Hi List,
> >
> > Are there any https / php gotchas to take into consideration for an app
> > i am writing that will run within a https environment ???
>
> I'm not sure what kind of 'gotchas' your are worried about, but
> well php doesn't really care wether you are using http or https.
>
> There is one thing to note: if you are trying to detect in php
> wether or not the request was from https or not, the result of what
> is in $_SERVER['HTTPS'], depends on the webserver, the possible
> values:
>
>   if accessed via https:
> on, On, ON
>
>   if accessed via http:
> !isset(), Off, OFF
>
>
> Curt.
> --
> cat .signature: No such file or directory
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Web Service Php - Currency Conversion

2005-11-27 Thread Colin Ross
New version released that fixed the bug, fyi

On 9/28/05, Thomas <[EMAIL PROTECTED]> wrote:
>
> I have used nusoap and a xmethods service. You can get the ziped files
> here:
> http://www.thomash.co.za/uploads/forex/forex.nusoap.zip
>
> Hope that helps
>
> BTW: also had issues with the PEAR package.
>
> T
>
> -Original Message-
> From: Sylvain Gourvil [mailto:[EMAIL PROTECTED]
> Sent: 28 September 2005 12:57 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Web Service Php - Currency Conversion
>
> Jasper Bryant-Greene wrote:
> > Sylvain Gourvil wrote:
> >
> >> I am looking of a webservice whiwh could permit to convert euro price
> >> in dollar and uk pounds on my php website !
> >
> >
> > http://pear.php.net/package/Services_ExchangeRates
> >
>
>
> Thanks for that but there is a bug in installation.
> It seems to be great. If someone has something else, I'll be pleased
>
> Have a good day !
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Re: x years old

2005-07-02 Thread Colin Ross
and for completeness of the topic, ceil() will round fractions up.
i.e. 

ceil(16.1) = 17
ceil(16.0) = 16


I think the Credit Card Industry using ceil() alot ;P


On 7/2/05, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote:
> 
> Ryan A wrote:
> > Hey guys,
> > This is the code I am using to display a persons age from the mysql db:
> >
> > $day1=strtotime($age);
> > $day2 = strtotime(date("Y-m-d"));
> > $dif_s = ($day2-$day1);
> > $dif_d = ($dif_s/60/60/24);
> > $age = round(($dif_d/365.24));
> >
> > but when someone entered their birth day($age) as 1988-07-06 it is 
> showing
> > it as
> > 17 years old instead of 16...any idea whats wrong in the above code?
> 
> Use floor() instead of round(). Using the round() function will round
> anyone whose age is above 16.5 to 17, while floor() always rounds down.
> 
> Jasper
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>


Re: [PHP] Stop spreading PEAR FUD; WAS Re: [PHP] Re: PHP web archeticture

2005-06-25 Thread Colin Ross
I don't think a lot of people think tat PEAR sucks, we are all, as a 
community, just looking for ways to make it better.
C

On 6/25/05, Chris Shiflett <[EMAIL PROTECTED]> wrote:
> 
> Matthew Weier O'Phinney wrote:
> > The perl culture is one that includes testing and documentation as
> > the norm
> 
> You might be interested to know that there is a PHP equivalent for
> Test::More, the CPAN library that prompted the "testing revolution" that
> Perl seems to have undergone in the past five years or so.
> 
> It is packaged as a standard part of Apache-Test (which now has support
> for testing PHP applications):
> 
> http://search.cpan.org/dist/Apache-Test/
> 
> Hope that helps.
> 
> Chris
> 
> --
> Chris Shiflett
> Brain Bulb, The PHP Consultancy
> http://brainbulb.com/
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>


Re: [PHP] php - jscript - onclick event..

2005-06-22 Thread Colin Ross
First of all, I _think_ this is more of a javascript/jscript question than a 
php one.

Are you just trying to make a javascript call from php onload? If so, i'm 
pretty sure you can use window.onLoad in a script block in the head.

Also, be sure to set your scripting type in the onclick. i.e. 
onclick="javascript:cms_focus(foo);"

also, not quite seeing the point in the return false in the head here:

return false;


I'm prolly not seeing what you are trying to do, try to break it down a bit 
more. One at a time.

C

On 6/22/05, bruce <[EMAIL PROTECTED]> wrote:
> 
> hi..
> 
> a somewhat php/jscript question...
> 
> 
> i have the following onclick that works...
> -
> Account
> 
> 
> i'd like to be able to have the jscript run if i have a query var foo.
> basically, i'd like a way of running the same jscript that gets run during
> the onClick, when i select a php function... ie, if i finish a pprocess, 
> i'd
> like to set the appropriate page to display.
> 
> i thought i could do something like the following:
> 
>  if ($_GET['tmp'])
> {
> echo "
> 
> alert('');
> cms_focus ('cms-edit', 1);
> 
> ";
> echo "
> 
> cms_focus ('cms-properties', 1);
> 
> ";
> echo "
> 
> cms_focus ('cms-state', 99);
> 
> ";
> echo "
> 
> return false;
> 
> ";
> }
> ?>
> 
> my hope was that this would effectively simulate the running of the
> jscript.. but it didn't seem to work. the tabs/screens don't change, which
> indicates that the jscript is not running as i thought it would
> 
> the above php/jscript is being called after the jscript cms_focus routine
> has been created. in the above sample, i discovered that if i placed all 3
> cms_focus calls in the same  block, only the 1st one 
> seemed
> to run... however, even with this, while it appears that each cms_focus 
> call
> is being made, there's still not apparent change in the display.
> 
> the actual cms_focus routine is listed below. all it really does is to set
> the focus of the given div/id the given section/id of 99 is set to be a
> block display, with the rest set to be unseen.
> 
> any ideas/help would be useful.. i'm pretty sure i'm running into a simple
> problem.. this should be doable.
> 
> if you need me to, i can supply the entire test php page, as it's not too
> long.
> 
> also, if you need additional clarification, let me know.. this might be
> somewhat jumbled.
> 
> thanks
> 
> -bruce
> [EMAIL PROTECTED]
> 
> 
> test cms_focus function
> 
>