GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need a LAST MODIFED script (https://gfy.com/showthread.php?t=919443)

daveylapoo 08-02-2009 09:21 PM

Need a LAST MODIFED script
 
Hey, been surfing for hours now looking for script that functions like so:

Displays the URL and PAGE TITLE for a set number of LAST MODIFIED .html files as they exist on the server.

The idea being that a 'Whats new' area of a website displays the most recently uploaded files.

There's no shortage of javascripts that display the last time a page was modified, but I couldn't seem to find anything that would also display the URL and PAGE TITLE as well.

I'd be more than happy to pay a programmer for their time in creating this.

Thanks in advance!

Iron Fist 08-02-2009 09:23 PM

Well here's a start...

PHP Code:

<?php echo "Last modified: ".date"F d Y H:i:s."getlastmod() ); ?>


daveylapoo 08-02-2009 09:31 PM

Quote:

Originally Posted by sharphead (Post 16139562)
Well here's a start...

PHP Code:

<?php echo "Last modified: ".date"F d Y H:i:s."getlastmod() ); ?>


Go on...

;)

woj 08-02-2009 09:34 PM

sample is free, for full script need to pay up :)

daveylapoo 08-02-2009 11:37 PM

Quote:

Originally Posted by woj (Post 16139575)
sample is free, for full script need to pay up :)

Have you got some contact info?

SBJ 08-02-2009 11:39 PM

Quote:

Originally Posted by woj (Post 16139575)
sample is free, for full script need to pay up :)

:1orglaugh good stuff!

Killswitch - BANNED FOR LIFE 08-02-2009 11:43 PM

Quote:

Originally Posted by sharphead (Post 16139562)
Well here's a start...

PHP Code:

<?php echo "Last modified: ".date"F d Y H:i:s."getlastmod() ); ?>


That will only work for the page it's on, for what he wants, this is a better solution...

PHP Code:

<?php
// outputs e.g.  somefile.txt was last modified: August 03 2009 01:43:23.

$filename 'somefile.txt';
if (
file_exists($filename)) {
    echo 
"$filename was last modified: " date ("F d Y H:i:s."filemtime($filename));
}
?>


daveylapoo 08-03-2009 08:31 AM

Quote:

Originally Posted by Killswitch (Post 16139801)
That will only work for the page it's on, for what he wants, this is a better solution...

PHP Code:

<?php
// outputs e.g.  somefile.txt was last modified: August 03 2009 01:43:23.

$filename 'somefile.txt';
if (
file_exists($filename)) {
    echo 
"$filename was last modified: " date ("F d Y H:i:s."filemtime($filename));
}
?>


Thanks, that looks like it's close.

However, what I need is a div section that will call the last 3 (or an assignable number) of .html pages that have been uploaded to a site, then display their URLS as a list using their page titles as anchor text.

Here is a hack version of how the code 'might' look:

<div class = "pages last updated">
<h3>Recent Updates</h3>
{foreach from=$pagelastuploaded key=title item=url}
<li><a href="{$url}">{$title}</a><li>
</div>

Obviously that's not going to work, but hopefully gives a better idea of what I need done.

Again, happy to pay a programmer to hash this out.

GrouchyAdmin 08-03-2009 09:07 AM

Why do I have a feeling that any gfy solution will arbitrate the whole local directory with opendir() for each call?

calmlikeabomb 08-03-2009 10:46 AM

^ because most people on GFY don't know about PHP 5's built-in SPL and the RecursiveDirectoryIterator class.

I'll do it for $25.

Killswitch - BANNED FOR LIFE 08-03-2009 11:30 AM

Quote:

Originally Posted by calmlikeabomb (Post 16141399)
^ because most people on GFY don't know about PHP 5's built-in SPL and the RecursiveDirectoryIterator class.

I'll do it for $25.

:thumbsup:thumbsup:thumbsup

daveylapoo 08-03-2009 01:08 PM

Quote:

Originally Posted by calmlikeabomb (Post 16141399)
^ because most people on GFY don't know about PHP 5's built-in SPL and the RecursiveDirectoryIterator class.

I'll do it for $25.

Sounds good, do you have ICQ? Your site seems to be down...

calmlikeabomb 08-04-2009 03:01 PM

Sorry I didn't check back with this thread yesterday. I'm only using the calmdev domain for email. The script is already written, if you're still interested send me an email to [email protected]

I'll send you a link and you can check it out. Then if you want it I can send you the source. I prefer epass over paypal, but I'm cool with either.

This script requires php5.

Thanks

Killswitch - BANNED FOR LIFE 08-04-2009 03:12 PM

Awesome job Levi!


All times are GMT -7. The time now is 08:06 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123