Friday, August 8. 2008Phurple - per se PHPurple
Hey you all (and me too) web developers. The huge important news today is - now we can send IMs from a script running within a web server - isn't it cool? Only one restriction conditioned by libpurple itself is there - use is definitely safe within CGI environment only. The second important news, as you see from the title - the project was renamed to Phurple. Furthermore there are a couple essential changes I was made as refactoring of the code was written so far.
Became interested? Lets look onto most important points in the changelog: Continue reading "Phurple - per se PHPurple"
Posted by Anatol Belski
in C/C++, Linux, PHP5, PHP5 extentions
at
21:58
| Comments (75)
| Trackbacks (0)
Tuesday, July 1. 2008PHPurple v0.3 alpha released
So, new PHPurple version was issued yesterday and is downloadable from sf.net. What's inside:
* PurpleAccount::isConnecting() added * PurpleAccount::getUserName() added * PurpleAccount::getPassword() added * PurpleClient::deleteAccount() added * PurpleClient::findAccount() added * PurpleClient::addAccount returns now a PurpleAccount instance (but was null) * PurpleClient::authorizeRequest() added The most interesting thing there is of course the remote client authorization. Continue reading "PHPurple v0.3 alpha released"
Posted by Anatol Belski
in C/C++, Linux, PHP5, PHP5 extentions
at
16:53
| Comments (19)
| Trackbacks (0)
Sunday, June 22. 2008Functions vs. inline code
Recently I had a little discussion about our style guide with one of the co-workers. And the matter was concerning the line length. Most default is to limit the line length with 79-85 characters - because of terminals, printing etc. But an other question took my head in the middle of the conversation: limiting the line length would mean for example to encapsulate deep included blocks of the code into functions - sounds not bad, but ...
Continue reading "Functions vs. inline code" Saturday, May 31. 2008PHPurple v0.2 alpha released
Today I've maked the second PHPurple release and changed it's status to alpha. The changes, came into it, are:
* fixed zts compatibility * implemented the loopHeartBeat method * the runLoop method was changed to set the heartbeat interval * fixed memory leak on empty alias * purple.debug_enabled is now boolean The most interesting on this release is the PurpleClient::loopHeartBeat() story, which is of course implemented with g_timeout_add. Take a look at the new example script to see how it works. Continue reading "PHPurple v0.2 alpha released"
Posted by Anatol Belski
in C/C++, Linux, PHP5, PHP5 extentions
at
05:44
| Comments (3)
| Trackbacks (0)
Friday, May 2. 2008Postfix+Spamassassin
Referencing my previous article about the mali server configuration, I'm continuing with spam and antivirus scanners setup. On my Debian box i'm installing the following:
BASH: user@host~$ apt-get install spamassassin With this groups spamd and clamav are automatically created. Before you start, keep in mind - if something goes wrong, allways check the /var/log/mail.* files. Continue reading "Postfix+Spamassassin" Sunday, April 27. 2008Don't underestimate SQL
Hi there.
The things I wanna to talk about today are - relational databases building. Particularly I would discuss such the attainments of relational sql as join and subselect. For my experiment I'll take PostgreSQL and Python. So, lets start: BASH: user@host~$ su postgres postgres@host~$ createuser -P test Enter password for new role: Enter it again: Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create more new roles? (y/n) n postgres@host~$ createdb test postgres@host~$ exit Continue reading "Don't underestimate SQL" 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" Saturday, March 8. 2008Map objects recursive in perl
One interesting thing I've got stucked on - if we have some multilevel arrays/hashes (which aren't the same in perl), there is no standard way to change all the object's values. The only thing I've found usefull is map function, which nevertheless works only for map arrays. However, it could be very usefull, to have a possibility to change each scalar element of some multilevel object. For example, if you ever used XML::Simple, you could observe the following behavior with values, which contain new lines.
XML: <root> <elem>asdf</elem> </root> Continue reading "Map objects recursive in perl" Wednesday, March 5. 2008Relicensing PHPurple
Just a short message. PHPurple is falling back to GPL. It will get neither PHP nor any other (commercial) license ever. The ground is simply, the libpurple is GPL'ed itself and the developers count is so much, that there is no chance to get a special permission to do this. If you interested in details of this discussion, take look at the libpurple's developers mailing lists.
Sunday, March 2. 2008PHPurple 0.1.0 pre-alpha
The first pre-alpha is released and can be downloaded at http://sourceforge.net/projects/phpurple/. The common documentation I've started to make was placed to http://phpurple.rubay.de/.
The main features implemented are: - send and recieve IMs - fully implemented account dsn like string - ability to make account specific settings - basic work with buddy, buddy group and buddy list Continue reading "PHPurple 0.1.0 pre-alpha"
Posted by Anatol Belski
in C/C++, Linux, PHP5, PHP5 extentions
at
15:14
| Comments (35)
| Trackbacks (0)
Friday, February 29. 2008Building static executables on Linux
An interesting question I had to answer a couple months ago was - how could I compile an executable statically, so then it works on various linux distributions without the need to install some additional libs. Of course, such the executables are bigger as that, which was compiled in order to use the dynamic libs. But if one wanna to have an independent production executable, this is what one could need.
So, I will explain the thing with the help of an example program, which uses ncurses. First I'm creating the project dir, for example: BASH: user@host~$ mkdir ~/programming/static_test user@host~$ cd ~/programming/static_test Continue reading "Building static executables on Linux" Sunday, January 20. 2008Postfix + Dovecot SMTP and IMAP on Debian Etch
Yesterday I was configuring the mail server on my hosting. Because I'm mostly doing programming, not administration, I'm writing this notes which are serving as a simple how to, if I must do it once more in a couple of years.
In spite of the fact I've done all on Debian, all the described things schould work on some other Linux distribution as well. First install Postfix and Dovecot The configuration will fulfill the following points:
Continue reading "Postfix + Dovecot SMTP and IMAP on Debian Etch" Saturday, January 12. 2008phpurple new oo design,
and so it will be in the future ...
Namely, i had the excellent oo design suggestion from the Alexey on the pecl mailing list (and it is better, than I could invent), and it works fully for php 5.3 and unfortunately partly for php 5.2. So lets take a look on it ... just get the latest version ... CODE: user@host~# svn co https://phpurple.svn.sourceforge.net/svnroot/phpurple/trunk phpurple
Continue reading "phpurple new oo design, "
Posted by Anatol Belski
in C/C++, Linux, PHP5, PHP5 extentions
at
18:43
| Comments (0)
| Trackbacks (0)
Monday, December 24. 2007phpurple
Some time ago i've started to write the binding for the libpurple, the im lib. About 3-4 weeks ago i had a simple functional implementation, which i've presented on php pecl and libpurple mailing lists. Subsequently i've completely revised the whole thing to be OO and would present it again. There is the same minimal functionality implemented, but all is OO. So, lets begin. First install the php development package and get the code:
CODE: user@host~# svn co https://phpurple.svn.sourceforge.net/svnroot/phpurple/trunk phpurple Continue reading "phpurple"
Posted by Anatol Belski
in C/C++, Linux, PHP5, PHP5 extentions
at
18:39
| Comments (20)
| Trackbacks (0)
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"
« previous page
(Page 2 of 3, totaling 37 entries)
» next page
|
QuicksearchCategoriesArchives |