In reply to: http://www.vbforums.com/showthread.p...98#post2574998
I already explained how to open a JPG. The file_get_contents() function is what you need, just replace the web address with the path to the file.
If you look at the date/time functions I linked to previously you'll see that you need the [http://www.php.net/strtotime]strtotime()[/url] function to convert the date string into a timestamp which you can use for comparisons.
The following constants will help:
PHP Code:
define('SECONDS_MINUTE', 60);
define('SECONDS_HOUR', SECONDS_MINUTE * 60);
define('SECONDS_DAY', SECONDS_HOUR * 24);
define('SECONDS_WEEK', SECONDS_DAY * 7);
define('SECONDS_YEAR', SECONDS_DAY * 365);
$difference = $toDate - $fromDate;
// find the number of years
$years = (int) ($difference / SECONDS_YEAR);
$remain = $difference % SECONDS_YEAR;
// find the number of days - number of years
$days = (int) ($remain/ SECONDS_DAY);
$remain = $remain % SECONDS_DAY;
// find the number of hours - number of days - number of years
$hours = $remain / SECONDS_HOUR;
echo("$years years(s), $days day(s), $hours hour(s)");