Monday, May 7. 2012Trick your blog to act like a Wordpress one
Blogging is my little hobbyhorse, however not big enough to excite me. Nevertheless sometimes you feel challenged when some social networks linking professionals in (yes, I'm pointing the finger
Why would one do that obviously half baked thing limiting the RSS syndication to Wordpress only? I don't know, probably it's just politics and therefore the answer isn't really interesting. A more interesting approach would be a possibility to not to play by that rules. And here it is - after a couple of hours playing around I wrote a simple wordpress gateway for my blog. Continue reading "Trick your blog to act like a Wordpress one" Thursday, October 13. 2011Serendipity meets Varnish
I've been using Serendipity for a couple of years and really love it now. But sometimes I wish it could be faster. Different servers tell a difference, but an average generation time for example for one category listing with 15 entries takes about 5 seconds or more. So I couldn't wait any longer, since I've learned Varnish Cache, to toggle it between Serendipity and the end user. Of course, Varnish would limit some blogging features, but the benefits will be worth of that. Sounds interesting? So this article is for you.
Continue reading "Serendipity meets Varnish" Sunday, October 2. 2011SquirrelMail Change Password Plugin
A couple of years ago I've shared my expierience about how to setup virtual mail hosting with Postfix and Dovecot. Some time ago I needed to make that accessible via Web. So, a webmail.
After trying a couple of engines I've decided in favour of SquirrelMail. This worked like a charm with SSL, etc. so the full mailing functionality was available just out of the box. The one thing I was still missing was a possibility to change password. There are already several plugins to achieve the goal, for instance when logging in over LDAP, but nothing could really fit for me. That's because the maildir setup I'm using is non standard. Luckily, the SquirrelMail API is simple and just well documented, so I was able to write a custom change password plugin very fast. Continue reading "SquirrelMail Change Password Plugin" Tuesday, August 23. 2011Varnish Cache now for PHP and from PHP
There is a new PHP extension I've written to work with Varnish. The extension allows interaction from within a PHP script with a running Varnish instance. For now there is a basic useful functionality such as ban URLs or set/get Varnish configuration. There will be more with the time. For now I would give a couple of examples for the extension usage, as there is not really any docs for the extension here.
Continue reading "Varnish Cache now for PHP and from PHP"
Posted by Anatoliy Belsky
in C/C++, Linux, PHP5, PHP5 extentions, Web
at
22:34
| Comments (0)
| Trackbacks (0)
Thursday, June 3. 2010Using great Geonames database for geographical data handling
This time I needed some geographical data evaluation for one of my current projects. The data used to be opensource and as possible qualitative and complete. After spending some time in front of the famous search engine window there was a solution:
http://www.geonames.org/ That's the first sentence from the site: The GeoNames geographical database covers all countries and contains over eight million placenames that are available for download free of charge. Geonames is used by number of sites. Besides data it has also web services and code libraries in many programming languages to access them. Continue reading "Using great Geonames database for geographical data handling" Thursday, October 2. 2008Making server side playlist with PHP
Hi again,
whole last week I was mad about hearing music. I've heared tons of mp3's and radio stations over the internet. After a couple of days hearing music at work and at home I was really bored with creating and syncronizing playlists/files. Based on this, I came to the idea to make an online playlist which I would must update only one time and in one place and it would be accessible from anywhere. The idea was easy brougth out with PHP. So just a light reading for you: Continue reading "Making server side playlist with PHP" Wednesday, March 12. 2008Domains avaliability checker
About a month ago I've written a simple domain checker, which is using whois.net to get the domains availiable. The main goal was to find free 3-symbols domains.
BASH: #!/bin/sh if [ $# -lt 1 ] then echo "usage: `basename $0` extension Check domains avaliability examples: `basename $0` com "; exit 2; fi EXT=$1; LAST_FILENAME=/tmp/dc_$USER$EXT.last if [ -f "$LAST_FILENAME" ]; then LAST_DOMAIN=`cat $LAST_FILENAME`; fi for DOMAIN in {{0..9},{a..z},-}{{0..9},{a..z},-}{{0..9},{a..z},-} do if [ "$DOMAIN" \< "$LAST_DOMAIN" ]; then continue; fi trap "echo $DOMAIN > $LAST_FILENAME;exit;" SIGHUP SIGINT SIGTERM STATUS_STRING=`wget -qO - http://www.whois.net/whois_new.cgi\?d\=$DOMAIN\&tld\=$EXT | grep 'Status'` echo "$STATUS_STRING" | grep 'free' && echo "$DOMAIN.$EXT" >> ~/domains_found_$EXT.txt && echo "the domain is free: $DOMAIN.$EXT" | mail -c my@mail.com -s "free domain" other@mail.com sleep 7 done The thing is very simple and the results can be kept on. Additionally it sends mail messages about each found domain. Lets see, what it brought for the .de domains ( about 9000 free domains was found Continue reading "Domains avaliability checker" Sunday, December 23. 2007I know the future weather
A simply and cool script for the weather forecast. May be even correct
.. thanks to Weather::Underground perl module PERL: #!/usr/bin/perl use Weather::Underground; Continue reading "I know the future weather" Stop image hotlinking with Perl
Sometimes there are things, which can bring everyone to the rage accumulation. For example if traffic of the server is exceeded because of hotlinking and it's measured at least in hundreds of megabytes. | So, for me this is only a story about someone else because I'm always using the following script, if the traffic of the server is not unlimited. I've used Perl to convert or resize images, because according my measurements Perl was doing this at least twice as fast as PHP and more qualitatively as PHP (this concerns anyhow PHP4). Only the one weakness can prevent you from using this script - it works with HTTP_REFERER server variable and since some browsers, firewalls or proxies for any reasons don't sending this field to the webserver, you can punish innocent people, who want only to see your images. But the advantages are evident - you can place your images out of the web space and show them only if they has been called from your web site. Lets go on.
Continue reading "Stop image hotlinking with Perl"
(Page 1 of 1, totaling 9 entries)
|
CategoriesQuicksearchArchives |