pilif.ch - a cuwps

[home]
stuff
some worldwide unique stuff
  • Daily Strips
  • PersistentHandler
  • Denis' Birthday
  • DVD-Region (1)
  • DVD-Region (2)
  • Defeating Miguel
  • Neuronal Interface ;-)
  • Swiss ADSL Check
  • Autodestructing Email
  • Fun with bounces
  • backstage
    backstage-reports of some of my paid projects
  • bookexchange.ch
  • info
    valuable information for my visitors
  • RasInTask
  •  
    introduction
    Who doesn't know those daily comic strips you can find all around the web? Wouldn't it be nice to have them deilivered daily to your mailbox? Without advertising, long click-paths, searching and so on?

    dailystrips is a perl script that does half the ting: It evaluates a config-file, downloads the stips and then creates a HTML-Page containing links the the downloaded or the images on the original server.

    What it cannot to is send them via email.

    I've created a small, simple PHP-Script to be run through the console which uses dailystrips to get the strips, then creates a proper layout and sends this as an HTML-Email with all the pictures attached and embedded.

    how does it work
    It does just work. Set up a cron job, configure your strips.def for dailystrips to know where to get the strips from and be happy.

    An earlier version of the script just send a HTML-Page containing references to the original server, but many HTML-mail-clients today refuse to load external images. Furthermore, nun-HTML-clients did not display anything at all, so I came to the conclusion that downloading the images and then attaching them to the email is the way to go, which is what the script currently does.

    Note that this thing is strictly for personal use as anything else would violate the terms of service of those strip-sites.

    In case you are interested: The group @pilif in my strips.def currently contains the following entries:

    • userfriendly
    • dilbert
    • calivnandhobbes
    • touche

    credits
    Many thanks to the team behind dailystrips: You saved me a lot of work. Many thanks to the PEAR-Team too: Without your Mail_Mime-Class, I would have had to create the whole MIME-Mess around HTML-Mails all for myself.

    This program is dedicated to my love, Evelyn.

    bugs
    There is one thing that bothers me: If a strip for a day gets added after the cron-job runs the script, it will never be included in the mail, as I could not find a way to convince dailystrips to try the previous day, if a strip could not be found. At least not without creating a real strip-archive which I don't want to do.

    license
    I release the script and its sourcecode under the classical BSD-Style-License:

    Copyright (c) 2002, Philip Hofstetter
    All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    • Neither the name Philip Hofstetter nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    download
    stripget.php


    © 2003 by pilif. cuwps stands for completely useless webpage and is a non-registered non-trademark by pilif - Last Modification: 11/14/03 at 18:17:21