WordPress.org

Support

Support » Plugins and Hacks » Site Last Modified » [Resolved] Gr8 ;-)

[Resolved] Gr8 ;-)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author EXED internet

    @exed-internet

    Hi,

    Do I understand correctly that you wish to show the modification date on site 1 to be displayed on site 2? Is site 2 completely seperated from site 1?

    Thank you for your response 😉
    Yes, the websites would be separate.
    Different servers, different domains, eventually even different platforms.

    How to do?
    – PHP class >>> WP Plugin
    – Write modification date and url (Site 1) into a text file…
    – Site 2 (same plugin or PHP class) would read and display
    – Mechanism to report several sites…

    For example my other websites:
    http://www.Dogs.com (updated May 13th)
    http://www.Cats.com (updated May 12th)
    http://www.Frogs.com (updated May 12th)

    Plugin Author EXED internet

    @exed-internet

    Hi,

    When you have access to the database you could retreive the last modified timestamp of the posts directly.

    Otherwise you could indeed use a seperate textfile.

    Or as an alternative, more WordPress-like solution, you could create a new page and use the shortcode on that page. After that you can retreive that page from your other websites and destilate the timestamp from the page.
    You can make this a more easy job by adding some kind of id to the container element.

    Little example:

    • in the WordPress page, create something like
      <div id="last-modified">[site-last-modified]</div>
    • on another site, retreive the page (file_get_contents, but cUrl is also possible)
      $wppage = file_get_contents('url-of-file');
    • destilate the timestamp
      preg_match('|<div id="last-modified">([^<]*)</div>|is', $wppage, $timestamp);

    Cool 😉

    Plugin Author EXED internet

    @exed-internet

    Hi,

    Can I close this issue?

    Thank you, that’s very polite. I closed it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Gr8 ;-)’ is closed to new replies.
Skip to toolbar