php-windows Digest 31 Mar 2001 21:30:42 -0000 Issue 520 Topics (messages 6404 through 6416): Re: [PHP-GTK] Time 6404 by: Steph 6412 by: Chris Chabot 6413 by: Steph Help!! Again!!(WINDOWS98-APACHE) 6405 by: Bhala Anyone has list of unsupported function in PHP for Windows? 6406 by: Yasuo Ohgaki Re: passing array 6407 by: Yasuo Ohgaki Re: problem with loops 6408 by: Yasuo Ohgaki Re: Time - WINCRON is for windows 6409 by: Delbono Re: unhappy camper 6410 by: Patrick 6411 by: Patrick Re: [PHP-GTK] Re: [PHP-WIN] Time - WINCRON is for windows 6414 by: Joe Stump Re: Regular expression under PHP for Win? Missing? 6415 by: Tobias Talltorp about php4 COM functions.. 6416 by: Kevin Ferron Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Yes it would, you'd have to do the nasty equation Chris threw at you .... ----- Original Message ----- From: "Josh Seward" <[EMAIL PROTECTED]> To: "Chris Chabot" <[EMAIL PROTECTED]>; "Steph" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; "php-gtk" <[EMAIL PROTECTED]> Sent: Saturday, March 31, 2001 6:49 AM Subject: Re: [PHP-WIN] Re: [PHP-GTK] Time while (1) > sleep(60*60); > exec('application') > end wouldn't running the exec make the time be off? ----- Original Message ----- From: "Chris Chabot" <[EMAIL PROTECTED]> To: "Steph" <[EMAIL PROTECTED]> Cc: "Josh Seward" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "php-gtk" <[EMAIL PROTECTED]> Sent: Friday, March 30, 2001 10:43 PM Subject: [PHP-WIN] Re: [PHP-GTK] Time > No both time and sleep use seconds. > see http://www.php.net/manual/en/function.sleep.php and http://www.php.net/manual/en/function.time.php respectivly. > > if you want to use milliseconds, you need to use usleep > see http://www.php.net/manual/en/function.usleep.php > > just nitpicking my last few awake moments of the day :) > > -- Chris > > Steph wrote: > > > Seconds? I thought milliseconds? > > > > Oh well, suck it and see, Josh! > > ;) > > > > ----- Original Message ----- > > From: "Chris Chabot" <[EMAIL PROTECTED]> > > To: "Josh Seward" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]>; "php-gtk" <[EMAIL PROTECTED]> > > Sent: Saturday, March 31, 2001 4:31 AM > > Subject: Re: [PHP-GTK] Time > > > > Umm the obvious reply would be to go to download.com and browse to see if they have a shareware version of a cron like application, i am sure they do... i remember seeing some of those. > > > > Otherwise, code a simple php or c or delphi or visual basic app that only does > > > > while (1) > > sleep(60*60); > > exec('application') > > end > > > > Can't be that hard to write right? :) > > or even if you wanted it -on- every hour and not every hour, just do a > > if ( frac (time() / (60*60) ) == 0) { > > exec('application') > > } > > (ie if the dividable time / 'seconds in hour' has no fraction (behind the . or , depending on locality, its on the hour) > > > > I realy hope this wont become a windows support mailing list though, thats kinda outside of the scope of php-gtk? :) > > > > -- Chris > > > > Josh Seward wrote: > > > > > Hello, > > > > > > Is there a way to have php run a script at a certain time? What I really need is something like cron on unix systems. I would use windows scheduler but it only goes by days. I ned to run this once every hour. > > > > > > P.S. To let everyone how helped me before. I can now send commands to an outside program I am running w/ the fsockopen command. This is after I open the prog. with popen. Thank you all for your help., especially Steph and Micheal. Your efffort and advice is much appriciated. If your ever in Athens Ohio the first round is on me :-) > > > > -- > > PHP GTK Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Oh about the time being of in the folowing loop due to exec while (1) sleep (60*60) exec('program') end that is indeed true ... however, dudes, am i the only programmer on this list ?? the solution is so simple i didnt thought i'd have to mention it, imagine the folowing $seconds_in_hour = 60 * 60; // 60 minutes * 60 seconds $run_time = 0; while (1) { sleep ($seconds_in_hour - $run_time); $run_time = time(); exec('application'); $run_time = time() - $run_time; } In other words, the first time the loop triggers, run_time is 0, and in an hour the program runs. when it runs the program, it takes the current time in seconds (seconds since epoch, 1970) after run is completed, it takes run_time = (time - run_time), in other words, how many seconds did execution take. Then the next time the while loops it sleeps (seconds_in_hour - the time it took to run the application), so it should trigger in an hour This will still cause a 'drift', since a fraction of a second is gained/lost every time, since the measurement used is seconds.. If this is a problem (in most cases it wont be, drifting a max of 23 seconds a day?), then you should recode the run_time calculation to use usleep and microtime, which would result in the folowing // microtime returns a string like "32423423 233", the first part is seconds // second is microseconds, function returns time as float (ie 1213324.333) function get_ms_time() { list($usec,$sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } $micro_seconds_in_hour = 60 * 60 * 1000; // 60 minutes * 60 seconds * 1000 Ms $run_time = 0; while (1) { usleep ($micro_seconds_in_hour - $micro_run_time); $run_time = (float)get_ms_time(); exec('application'); $run_time = (float)get_ms_time() - (float)$run_time; $run_time = ceil($run_time * 1000); } this loop does the same, but uses a float (integer with decimals) to calculate the run time, with a Mili Second accuracy. Then it converts the float (wich is something like '12.345') to Ms (12345) and does a usleep on that amount of Ms. Hope this puts an end to this thread, this should give u plenty of tools to solve the problem Thus endeth the lesson for today -- Chris Chris Chabot wrote: > No both time and sleep use seconds. > see http://www.php.net/manual/en/function.sleep.php and >http://www.php.net/manual/en/function.time.php respectivly. > > if you want to use milliseconds, you need to use usleep > see http://www.php.net/manual/en/function.usleep.php > > just nitpicking my last few awake moments of the day :) > > -- Chris > > Steph wrote: > > > Seconds? I thought milliseconds? > > > > Oh well, suck it and see, Josh! > > ;) > > > > ----- Original Message ----- > > From: "Chris Chabot" <[EMAIL PROTECTED]> > > To: "Josh Seward" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]>; "php-gtk" <[EMAIL PROTECTED]> > > Sent: Saturday, March 31, 2001 4:31 AM > > Subject: Re: [PHP-GTK] Time > > > > Umm the obvious reply would be to go to download.com and browse to see if they >have a shareware version of a cron like application, i am sure they do... i remember >seeing some of those. > > > > Otherwise, code a simple php or c or delphi or visual basic app that only does > > > > while (1) > > sleep(60*60); > > exec('application') > > end > > > > Can't be that hard to write right? :) > > or even if you wanted it -on- every hour and not every hour, just do a > > if ( frac (time() / (60*60) ) == 0) { > > exec('application') > > } > > (ie if the dividable time / 'seconds in hour' has no fraction (behind the . or , >depending on locality, its on the hour) > > > > I realy hope this wont become a windows support mailing list though, thats kinda >outside of the scope of php-gtk? :) > > > > -- Chris > > > > Josh Seward wrote: > > > > > Hello, > > > > > > Is there a way to have php run a script at a certain time? What I really need is >something like cron on unix systems. I would use windows scheduler but it only goes >by days. I ned to run this once every hour. > > > > > > P.S. To let everyone how helped me before. I can now send commands to an outside >program I am running w/ the fsockopen command. This is after I open the prog. with >popen. Thank you all for your help., especially Steph and Micheal. Your efffort and >advice is much appriciated. If your ever in Athens Ohio the first round is on me :-) > > > > -- > > PHP GTK Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- > PHP GTK Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
Yes Chris. It's Saturday. :) ----- Original Message ----- From: "Chris Chabot" <[EMAIL PROTECTED]> To: "Steph" <[EMAIL PROTECTED]>; "Josh Seward" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "php-gtk" <[EMAIL PROTECTED]> Sent: Saturday, March 31, 2001 12:38 PM Subject: Re: [PHP-GTK] Time Oh about the time being of in the folowing loop due to exec while (1) sleep (60*60) exec('program') end that is indeed true ... however, dudes, am i the only programmer on this list ?? the solution is so simple i didnt thought i'd have to mention it, imagine the folowing $seconds_in_hour = 60 * 60; // 60 minutes * 60 seconds $run_time = 0; while (1) { sleep ($seconds_in_hour - $run_time); $run_time = time(); exec('application'); $run_time = time() - $run_time; } In other words, the first time the loop triggers, run_time is 0, and in an hour the program runs. when it runs the program, it takes the current time in seconds (seconds since epoch, 1970) after run is completed, it takes run_time = (time - run_time), in other words, how many seconds did execution take. Then the next time the while loops it sleeps (seconds_in_hour - the time it took to run the application), so it should trigger in an hour This will still cause a 'drift', since a fraction of a second is gained/lost every time, since the measurement used is seconds.. If this is a problem (in most cases it wont be, drifting a max of 23 seconds a day?), then you should recode the run_time calculation to use usleep and microtime, which would result in the folowing // microtime returns a string like "32423423 233", the first part is seconds // second is microseconds, function returns time as float (ie 1213324.333) function get_ms_time() { list($usec,$sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } $micro_seconds_in_hour = 60 * 60 * 1000; // 60 minutes * 60 seconds * 1000 Ms $run_time = 0; while (1) { usleep ($micro_seconds_in_hour - $micro_run_time); $run_time = (float)get_ms_time(); exec('application'); $run_time = (float)get_ms_time() - (float)$run_time; $run_time = ceil($run_time * 1000); } this loop does the same, but uses a float (integer with decimals) to calculate the run time, with a Mili Second accuracy. Then it converts the float (wich is something like '12.345') to Ms (12345) and does a usleep on that amount of Ms. Hope this puts an end to this thread, this should give u plenty of tools to solve the problem Thus endeth the lesson for today -- Chris Chris Chabot wrote: > No both time and sleep use seconds. > see http://www.php.net/manual/en/function.sleep.php and >http://www.php.net/manual/en/function.time.php respectivly. > > if you want to use milliseconds, you need to use usleep > see http://www.php.net/manual/en/function.usleep.php > > just nitpicking my last few awake moments of the day :) > > -- Chris > > Steph wrote: > > > Seconds? I thought milliseconds? > > > > Oh well, suck it and see, Josh! > > ;) > > > > ----- Original Message ----- > > From: "Chris Chabot" <[EMAIL PROTECTED]> > > To: "Josh Seward" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]>; "php-gtk" <[EMAIL PROTECTED]> > > Sent: Saturday, March 31, 2001 4:31 AM > > Subject: Re: [PHP-GTK] Time > > > > Umm the obvious reply would be to go to download.com and browse to see if they >have a shareware version of a cron like application, i am sure they do... i remember >seeing some of those. > > > > Otherwise, code a simple php or c or delphi or visual basic app that only does > > > > while (1) > > sleep(60*60); > > exec('application') > > end > > > > Can't be that hard to write right? :) > > or even if you wanted it -on- every hour and not every hour, just do a > > if ( frac (time() / (60*60) ) == 0) { > > exec('application') > > } > > (ie if the dividable time / 'seconds in hour' has no fraction (behind the . or , >depending on locality, its on the hour) > > > > I realy hope this wont become a windows support mailing list though, thats kinda >outside of the scope of php-gtk? :) > > > > -- Chris > > > > Josh Seward wrote: > > > > > Hello, > > > > > > Is there a way to have php run a script at a certain time? What I really need is >something like cron on unix systems. I would use windows scheduler but it only goes >by days. I ned to run this once every hour. > > > > > > P.S. To let everyone how helped me before. I can now send commands to an outside >program I am running w/ the fsockopen command. This is after I open the prog. with >popen. Thank you all for your help., especially Steph and Micheal. Your efffort and >advice is much appriciated. If your ever in Athens Ohio the first round is on me :-) > > > > -- > > PHP GTK Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- > PHP GTK Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]
How you set up apache so that it will run in the background when I start windows & will shut down when I exit windows???
As far as I know, binary PHP4.0.5RC1/Apache SAPI/Windows at www.php4win.de does not seem to have pg_cmdtuples() checkdnsrr(), getmxrr() - other network functions possibly Does anyone know the list of functions that are not supported? (Or even better, anyone where get binary that supports them?) Thanks -- Yasuo Ohgaki
Use htmlspecialchars() instead of addslashes(). Different standard has different methods to escape special characters. Read relevant document for that. Regards, -- Yasuo Ohgaki ""afan"" <[EMAIL PROTECTED]> wrote in message 002a01c0b957$b21b97e0$0e1f49d1@07dzh2k322">news:002a01c0b957$b21b97e0$0e1f49d1@07dzh2k322... hi guys, my problem is how to pass an array to other page. E.g. I have an array of randomly choose numbers, 11, 7, 5, 10, 6 After I serialize that array I'm getting a:5:{i:0;s:2:"11";i:1;s:1:"7";i:2;s:1:"5";i:3;s:2:"10";i:4;s:1:"6";} Then I addslashes: a:5:{i:0;s:2:\"11\";i:1;s:1:\"7\";i:2;s:1:\"5\";i:3;s:2:\"10\";i:4;s:1:\"6\";} After using form <input type=hidden ...> and submitting I have only first part, up to first " (quote) a:5:{i:0;s:2:\ What I have to do? Thanks! Afan
;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 30 ; Maximum execution time of each script, in seconds memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) Change above values in php.ini to lower value, especially memory limit if you can. -- Yasuo Ohgaki ""afan"" <[EMAIL PROTECTED]> wrote in message 004601c0b961$6cf7a870$0e1f49d1@07dzh2k322">news:004601c0b961$6cf7a870$0e1f49d1@07dzh2k322... Hi, Does anyone know how to in case I make by accident a never-ending-loop stop running program? I just crushed couple times server with loop problem. Thank you! Afan
WinCron is what you are looking for. http://www.erols.com/graysteel/wincron.html I'm using it and it works correctly. ----- Original Message ----- From: "Josh Seward" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "php-gtk" <[EMAIL PROTECTED]> Sent: Saturday, March 31, 2001 5:21 AM Subject: [PHP-WIN] Time Hello, Is there a way to have php run a script at a certain time? What I really need is something like cron on unix systems. I would use windows scheduler but it only goes by days. I ned to run this once every hour. P.S. To let everyone how helped me before. I can now send commands to an outside program I am running w/ the fsockopen command. This is after I open the prog. with popen. Thank you all for your help., especially Steph and Micheal. Your efffort and advice is much appriciated. If your ever in Athens Ohio the first round is on me :-)
Warning: Supplied argument is not a valid MySQL result resource in e:/apache/apache/htdocs/tr.php on line 7 huum this is the error I got. you need to read a bit more mysql documentation and perhaps the mysql functions in php. what data base are you trying to show_tables on ? ""paul morgan"" <[EMAIL PROTECTED]> wrote in message 9a3623$72d$[EMAIL PROTECTED]">news:9a3623$72d$[EMAIL PROTECTED]... > hi, > I'm new to this game but have managed to set up apache 1.3.19 that runs > php/4.0.4pl1 (the apache dll I think) on Win 98 SE. I've also installed the > windows build of mysql, version 3.23 I think and can administer easily via > the msdos prompt. I have removed the general root user, as in the mysql Docs > and replaced it with my own logon user and pwd. > > The problem is that I can't seem to pull anything out of a database that I > create. I've read the docs that come with mysql, esp Ch6 and privileges, but > even simple things like typing 'show grants;' gives me an error in the msdos > prompt yet I can insert, delete etc data from the database I created whilst > in the msdos prompt - command line interface. I can connect to mysql using > the 'mysql_connect() function in php I think (I don't get any erroes when > just testing the connection) but when actually going to do something via php > I get an error similar to this; > > Warning: Supplied argument is not a valid MySQL result resource in > ...location of file then line number. > > Some example code that fails is below. It fails on the line where the > 'while' loop starts but I think that's because the $result var doesn't seem > to be allowed to list tables?? but I don't know why. > > > <?php > > $link_id = mysql_connect("localhost", "myUsername", "myPassword"); > > $result = mysql_query("SHOW TABLES", $link_id); > > while($query_data = mysql_fetch_row($result)) > { > echo "$query_data[0], is some data <br>"; > } > > ?> > > > Anyone got any ideas as to why I'm getting stuffed? Is it permissions within > mysql or is there a known bug in one of the apps that is messing me about. > Any suggestions gratefully received. Please reply to this or to my addy > directly. > > Many thanks ;) > > Paul > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
<?php $link_id = mysql_connect ("localhost", "YOU", "PASSWORD") or die ("Could not connect"); print ("Connected successfully<br>"); $result = mysql_list_tables ("MYSQL") or die ("Invalid query<br>"); print ("Connected successfully<br>"); while ($i < mysql_num_rows ($result)) { $tb_names[$i] = mysql_tablename ($result, $i); echo $tb_names[$i] . "<BR>"; $i++; } ?> this is from the php manual ""paul morgan"" <[EMAIL PROTECTED]> wrote in message 9a3623$72d$[EMAIL PROTECTED]">news:9a3623$72d$[EMAIL PROTECTED]... > hi, > I'm new to this game but have managed to set up apache 1.3.19 that runs > php/4.0.4pl1 (the apache dll I think) on Win 98 SE. I've also installed the > windows build of mysql, version 3.23 I think and can administer easily via > the msdos prompt. I have removed the general root user, as in the mysql Docs > and replaced it with my own logon user and pwd. > > The problem is that I can't seem to pull anything out of a database that I > create. I've read the docs that come with mysql, esp Ch6 and privileges, but > even simple things like typing 'show grants;' gives me an error in the msdos > prompt yet I can insert, delete etc data from the database I created whilst > in the msdos prompt - command line interface. I can connect to mysql using > the 'mysql_connect() function in php I think (I don't get any erroes when > just testing the connection) but when actually going to do something via php > I get an error similar to this; > > Warning: Supplied argument is not a valid MySQL result resource in > ...location of file then line number. > > Some example code that fails is below. It fails on the line where the > 'while' loop starts but I think that's because the $result var doesn't seem > to be allowed to list tables?? but I don't know why. > > > <?php > > $link_id = mysql_connect("localhost", "myUsername", "myPassword"); > > $result = mysql_query("SHOW TABLES", $link_id); > > while($query_data = mysql_fetch_row($result)) > { > echo "$query_data[0], is some data <br>"; > } > > ?> > > > Anyone got any ideas as to why I'm getting stuffed? Is it permissions within > mysql or is there a known bug in one of the apps that is messing me about. > Any suggestions gratefully received. Please reply to this or to my addy > directly. > > Many thanks ;) > > Paul > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
You might want to look at cygwin - it might come with regular crond. --Joe On Sat, Mar 31, 2001 at 10:12:41AM +0200, Delbono wrote: > > WinCron is what you are looking for. > > http://www.erols.com/graysteel/wincron.html > > > I'm using it and it works correctly. > > > > > > > ----- Original Message ----- > From: "Josh Seward" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; "php-gtk" <[EMAIL PROTECTED]> > Sent: Saturday, March 31, 2001 5:21 AM > Subject: [PHP-WIN] Time > > > Hello, > > Is there a way to have php run a script at a certain time? What I really > need is something like cron on unix systems. I would use windows scheduler > but it only goes by days. I ned to run this once every hour. > > > P.S. To let everyone how helped me before. I can now send commands to an > outside program I am running w/ the fsockopen command. This is after I open > the prog. with popen. Thank you all for your help., especially Steph and > Micheal. Your efffort and advice is much appriciated. If your ever in Athens > Ohio the first round is on me :-) > > > > -- > PHP GTK Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/
They should both be there, but perhaps they have left it out from the new PHP4.0.5RC1, since preg is ever so much faster... Strange though, since I think there are many sites who need to rewrite their code to upgrade... // Tobias ""Phillip Bow"" <[EMAIL PROTECTED]> wrote in message 9a0jsj$d9h$[EMAIL PROTECTED]">news:9a0jsj$d9h$[EMAIL PROTECTED]... > If those aren't there(I am pretty sure they are) then the preg commands > should work. I know I am using one form or another on my site. > -- > phill > > ""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message > 9a0j2q$5vn$[EMAIL PROTECTED]">news:9a0j2q$5vn$[EMAIL PROTECTED]... > > Hello all, > > > > I would like to know standard regular expression functions (ereg(), > eregi(), > > etc) are missing in PHP for Windows? > > (I use PHP4.0.5RC1 from www.php4win.de) > > > > Thanks > > > > -- > > Yasuo Ohgaki > > > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
I thought i'd share with those of you unfamiliar with one of the cool things about developing php on win32 systems.. http://www.phpbuilder.net/columns/alain20001003.php3 This is a good article, but i don't think the author hit the nail on the head showing how useful this can be. Now, checkout this article: http://www.4guysfromrolla.com/webtech/040300-1.shtml Notice how he describes 1) how to build a com object & 2) how to call and use the com object from ASP. In php, this is how you would call the same object: <? $instance = new COM("Checkyear.LeapYear"); $isleapyear = $instance->IsLeapYear($year); $instance->close(); if($isleapyear) { echo "The <b>$year</b> is a leap year"; } else { echo "The <b>$year</b> is not a leap year"; } ?> I hope this helps someone.. you can contact me at [EMAIL PROTECTED] if you would like to discuss this further.