circle.ch weblog by Urs Gehrig |
|
|
|
| Academic, Android, Apache, Apple, Art, Best Of, Biotech, Civil Society, Content Management, Cooking, Copyright, Creative Commons, Crosspost, Culture, Database, Deutsch, DRM, Economy, Education, Event, Gadget, General, Geodata, Government, Health, Howto, Humor, Innovation, Intellectual Property, Java, Language, LaTeX, Law, Linux, Media, Moblog, Mozilla, Music, Office, Open Content, Open Source, P2P, PHP, Podcast, Politics, Privacy, Projects, Random Thought, Rant, Science, Search, Social Network, Software, Sport, Talks, Technology, Technology Transfer, Travelling, Weblog, Wiki, Wireless and Mobile, XML
|
|
01. June 2007
Liip is hiring - again, again, more and more As a small sidenote - if you get hired by Liip, just mention to them to send that iPod to Basel ;) [1] http://blog.liip.ch/archive/2007/05/23/liip-is-hiring-yet-again.html Comments (0) Permalink del.icio.us 02. March 2007
adfinis is hiring Zur Unterstützung unseres jungen Teams bei Neuprojekten und Wartung/Erweiterung von bestehenden Lösungen suchen wir per sofort eine/n PHP Entwickler/in mit Pensum nach Vereinbarung, ca. 80-100%.More details can be found on their blog [1]. [1] http://www.adfinis.com/node/177 Comments (0) Permalink del.icio.us 12. July 2006
zlyfe - Blogs, Bilder, Community et.al. zlyfe is the place where you can tell others about the most memorable, astonishing, or funniest moments in your life.Grundsätzlich kann man das und vieles mehr auch auf anderen Plattformen. zlyfe [1] pflegt aber einen besonderen Bezug zur Schweiz - sprich - die Technologie kommt aus Bern [2]. [1] http://www.zlyfe.net [2] http://www.adfinis.com/node/176 Comments (0) Permalink del.icio.us 01. September 2005
Open Office Dokument des Hanbuchs zu PHP und MySQL [1] http://circle.ch/wiki/?page=HandbuchPHP Comments (0) Permalink del.icio.us 30. August 2005
Freetag - a tagging and folksonomy system Freetag [1] is a module that implements a simple, fairly robust beginning of a tagging and folksonomy system. It works with PHP4 and MySQL 3.23 so far, and i imagine that if it gets popular, it should be easy to port to additional databases and/or languages.Maybe a way to build up its own tagging repository. Acutally I haven't tried, but according to the docs it is promising. As to feed the database, one could use his own tags or category names first. There are probably at least two ways to tag a blog post. Either tags selected by hand at the time of writing or as a self-tagging system (algorithm), that takes e.g. the content of a blog post, analyzes it and applys the tags to the post. Some more thoughts on tagging and retagging at overstated.net [2]. [1] http://getluky.net/freetag/ [2] http://overstated.net/04/10/09-migrating-to-delicious Comments (0) Permalink del.icio.us 29. August 2005
Get Tags with Yahoo! Term Extraction The Term Extraction service provides a list of significant words or phrases extracted from a larger content.It can be implemented by making use of the Yahoo! API [1]. One might then need to sort out the result set a bit and use them as "tags". Since this blog has no cache and the API only lets me have a limited number [2] of requests a day, I will not dive into it yet ;) For those using PHP, there is a so called yahoolib availabe. [1] http://developer.yahoo.net/search/content/V1/termExtraction.html [2] http://developer.yahoo.net/search/rate.html [3] http://sourceforge.net/projects/yahoolib Comments (0) Permalink del.icio.us 28. August 2005
Related posts on b2/cafelog ALTER TABLE b2posts ADD FULLTEXT post_related ( post_title, post_content )A typical SQL query looks like: SELECT ID, post_title, post_content,The you only need to handle the results and format it with a little bit of HTML. Thats it. Comments (0) Permalink del.icio.us
An unexpected T_PAAMAYIM_NEKUDOTAYIM [1] http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php Comments (0) Permalink del.icio.us
TagCloud to analyze my blog I guess either with MySQL FULLTEXT search [2] or Bayesian classification [3] one could handle out something similar on his own blog. [1] http://www.tagcloud.com/User/index.php?TC_Cloud_ID=5920 [2] http://dev.mysql.com/doc/mysql/en/fulltext-search.html [3] http://www.xhtml.net/php/PHPNaiveBayesianFilter Comments (2) Permalink del.icio.us 03. August 2005
PHP Developers for blog.ch [1] http://blog.ch/blog/?p=148 Comments (0) Permalink del.icio.us 18. July 2005
Einführung in PHP [1] http://www.circle.ch/wiki/HandbuchPHP Comments (1) Permalink del.icio.us 08. June 2005
Not 1, 2, 3, 4, 5, 6, 7, 8, 9 but 10 years of PHP [1] http://blog.bitflux.ch/archive/2005/06/07/a-decade-of-php.html [2] http://groups.google.ch/groups?selm=3r7pgp%24aa1%40ionews.io.org Comments (0) Permalink del.icio.us 05. April 2005
Access to Desktop Search results DNKA is a search tool for remote computers. It acts as a web server by interacting as a layer between Google Desktop Search (GDS) and the user. It allows other users to search, view and download your files, emails, chats and web history.Basically it is wonderful; you get a full search access to the indexed content of a remote computer. IMHO this application should be filed under "As long as You know what You are doing.". I tried it out in an intranet and got full access to the root drive C:\. Then later on I found Baagle [2]. The principle is similar to the above but the tools are different. Baagle is a set of Perl scripts wrapped around the search engine Swish-e. Baagle provides a standalone webserver and an indexer. But compared to GDS it is up to you to configure and restrict the indexing to the data directories of your desire. If you like to figure out a similar solution with PHP have a look at the earlier mentioned nanoweb or nanoserv webserver built with PHP [3] and a Swish-e wrapper written in PHP [4]. Once decided to go for Swish-e (on Windows) you need a couple of tools to handle various file mime types, among others pdftotext, ps2ascii, antiword and one that I found today to convert Excel files to text, called xlhtml. Just search.ch for them ;) Well, now the only thing I could not find is a few lines of code to get a configurable search field to be integrated in the Windows task bar as we know it from GDS. Anyone up with a solution? [1] http://dnka.com [2] http://floatingsheep.com/baagle.html [3] http://nanoweb.si.kz [4] http://www.neokraft.net/articles/swish-e/ Comments (0) Permalink del.icio.us 23. March 2005
Multiuser Worpress evolved - http://blogs.linux.ie/xeer/2005/03/15/wpmu-snapshot-2/ - http://blogs.linux.ie/download/wpmu/ChangeLog-wpmu.txt - http://www.proyectoisla.com/planetawp/?cat=10 - http://incsub.org/blog/?p=266 Most coding seems to be done by donncha. Comments (0) Permalink del.icio.us 15. March 2005
Maguma Open Studio A PHP IDE that includes features for class browsing, ftp support, snippets, debugging and project management. The Open Source version of Maguma Studio.[1] http://sourceforge.net/projects/openstudio/ Comments (0) Permalink del.icio.us 10. February 2005
Bug #2415 - No UTF-8 decoding of header [1] http://pear.php.net/bugs/bug.php?id=2415 Comments (0) Permalink del.icio.us 27. January 2005
ffmpeg - The upcoming tool for video conversion Grabbing a frame out of a video is as simple as follows. It took me quite some time to figure out the appropriate options, since the web and the documentation did not yet satisfy my needs: $ ffmpeg -i test.3gp -f singlejpeg -img jpeg -y test.jpgI am sure this will boost video blogging enormously [4]. I first was heading for mplayer, but mplayer is IMHO kind of related to X and we do not really want X to be installed on a production server, do we? Finally, I would like to talk about animated GIF files and provide an example. As with a combination of Imagemagick and ffmpeg, it is a matter of two command lines evtl. one (I am not a pipe specialist ;). As shown below, ffmpeg generates a set of 10 images and Imagemagick converts them to an animated GIF: $ ffmpeg -i test.3gp -f image -img gif -t 1.0 test%03d.gifFeeback always welcome ;) [1] http://ffmpeg.sourceforge.net [2] http://www.circle.ch/wiki/MpegToJpeg [3] http://ffmpeg-php.sourceforge.net [4] http://www.circle.ch/wiki/3gpVideo Comments (6) Permalink del.icio.us 24. January 2005
s9y podcast plugin by Hannes [1] http://hannes.kaywa.com [2] http://s9y.lebureau.mediagonal.ch/archives/200501.html [3] http://blog.koehntopp.de/archives/649-Warum-podcasting-nervt.html Comments (0) Permalink del.icio.us 30. December 2004
JPEG image problem with PHP GD Imagemagick handles such problems in some - to me unknown - way and resizes the image properly, regardless of the problem pointed out. But there is currently only GD available and with that few lines of code I get a black resized thumbnail. The message pointed out above gets printed out when calling imagecreatefromjpeg(). A random thought was to rewrite a function from scratch in PHP that creates a valid image resource [1] in spite of the corrupt JPEG format. But as we have 23p.m. now, I am just too tired now ;) So I am stuck. A corrupt image can be found here [2]. [1] http://lxr.php.net/source/php-src/ext/gd/libgd/gd_jpeg.c#238 [2] http://circle.ch/blog/media/bild015.jpg Update: Problem-walk-around, as I got imagemagick support on the server ;) Comments (2) Permalink del.icio.us 14. December 2004
PECL Bit Torrent Comments (0) Permalink del.icio.us 03. December 2004
Standalone PHP script viewer for Win32 You blogged about my ScriptViewer (PHP without a dedicated web server) app many many moons ago, and I have updated it recently.Oh, I am a "moons away" blogger. So here we go [1]. [1] http://www.angorasoftware.com/scriptviewer.html Comments (0) Permalink del.icio.us 25. November 2004
Atom enabled Weblog in PHP This project is a school essay about dealing with atom format, HTTP request and XSL transformation.The code is available under the GPL license. Let's hope this will ignite some further implementations. Yoan also has a short presentation available [2]. [1] http://atom.dosimple.ch [2] http://atom.dosimple.ch/docs/pres/ Comments (0) Permalink del.icio.us 18. November 2004
Gmail photo album Goollery is a GMail based photo gallery. You can upload pictures from a website. The pictures will automatically be stored in your gmail accout.Via David Duret [2] [1] http://www.wirzm.ch/goollery/about/about.php [2] http://pilgrim.maleo.net/archives/2004/11/18/gmail-antispam-en-ligne/ Comments (0) Permalink del.icio.us 07. November 2004
PHP5 on OSX [1] http://www.entropy.ch/home/000012.html Comments (0) Permalink del.icio.us 05. November 2004
Bitflux is hiring [1] http://blog.bitflux.ch/archive/work-at-bitflux.html Comments (0) Permalink del.icio.us 20. October 2004
Cropping, rotating and resizing images in Wordpress [1] http://www.circle.ch/php/files/edit-images.phps [2] http://www.walterzorn.com/dragdrop/dragdrop_e.htm [3] http://php.amnuts.com/index.php?do=view&id=12 [4] http://www.circle.ch/blog/p1371.html Comments (0) Permalink del.icio.us 19. October 2004
Outlook to iCal export The outlook2ical utility is a VB macro that can be used to export a set of appointments from an Outlook Calendar to the iCal format. The end result is a *.ics file. My motivation for developing this macro is that I am not happy with the "Save As Web Page" option in Outlook. The main problem is that it saves all appointments associated with an Outlook calendar. I would like to only export appointments of a selected category or categories. I also wanted to be able to view the exported calendar using PHP-iCalendar, which has a far superior appearance when viewed on the web.[1] http://phpicalendar.sf.net [2] http://www2.et.byu.edu/~njones/share/outlook2ical/ [3] http://phpicalendar.net/forums/viewtopic.php?t=492 Update: Have a look at other tools: http://circle.ch/wiki/CalendarTools Comments (4) Permalink del.icio.us 18. October 2004
W3C link checker [1] http://validator.w3.org/checklink [2] http://www.phpkitchen.com/viewableCode/linkchecker.phps Comments (0) Permalink del.icio.us 17. October 2004
Rewrite of captcha-like feature [1] http://en.wikipedia.org/wiki/Captcha [2] http://pear.php.net/pepr/pepr-proposal-show.php?id=80 Comments (0) Permalink del.icio.us 12. September 2004
Gmail as a blog engine [1] http://ion.gluch.org.mx/files/Hacks/gallina/ Comments (2) Permalink del.icio.us 15. August 2004
Designing labels with SVG and convert them to PDF with PHP FPDF [http://fpdf.org ] is quite a nice library for creating PDFs, however, the thought of hardcoding up all the locations in PHP, for all the text on both applications horrified me.That is how we implemented our label printing system for LOTS 2004. Positioning a few lines of text and an image is easily done with FDPF for "design once, use many" labels. [1] http://blog.akbkhome.com/blog/archives/26_PHP_SVG_and_PDFs.html [2] http://www.sodipodi.com [3] http://www.circle.ch/blog/p1396.html Comments (0) Permalink del.icio.us 09. August 2004
Minimalistic CMS [1] http://editthispagephp.sourceforge.net [2] http://www.lifewithalacrity.com/2003/12/editthispagephp.html Comments (0) Permalink del.icio.us 30. July 2004
Fulltext search in PHP files on Windows [1] http://weblogtoolscollection.com/?p=464 Comments (0) Permalink del.icio.us 26. July 2004
PHP on Symbian? [1] http://groups.google.ch/groups?selm=b4g8vt%24jbq%241%40FreeBSD.csie.NCTU.edu.tw Comments (1) Permalink del.icio.us 07. July 2004
Livesearch - let's talk about usability [1] http://www.x1.com [2] http://blog.bitflux.ch/p1736.html Comments (0) Permalink del.icio.us 06. June 2004
Single-file PHP Auth class http://phpauth.sourceforge.net Comments (0) Permalink del.icio.us 02. June 2004
PEAR XML_FOAF package [1] http://my.opera.com/CloCkWeRX/journal/39 [2] http://www.circle.ch/blog/p909.html [3] http://pear.php.net/package/XML_FOAF/ Comments (0) Permalink del.icio.us 19. May 2004
PHP Layers Menu - dynamic menu trees [1] http://phplayersmenu.sourceforge.net Update: Just found another DHTML menu on sourceforge: http://xmenu-xlayer.sourceforge.net Comments (0) Permalink del.icio.us 10. May 2004
DB_Table - working differently with Tables and Forms What it does; it creates a defined table at first run if there is no such table yet in the database. Paul explains in small steps how you could build a guestbook with it. One of the nice parts of DB_Table is the ready-to-use QuickForm configuration. While defining a column for the table you give additional QuickForm information to that regarding that certain field. Building forms is therefore quite easy. ThanQ Paul for those contributions. [1] http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table Comments (0) Permalink del.icio.us 27. March 2004
De- and encoding Base64, UUEncoding, XXEncoding and Yenc files with PHP [1] http://php-attcodec.sourceforge.net Comments (0) Permalink del.icio.us 24. March 2004
Apache2 with PHP5 CGI and PHP4 module on OS X As below, this is what you can type to get PHP 5.0.0 RC1:#:~/src/php-4.3.4 urs$ ./configure \ I have chose specific configuration paths for each version. As far as I can see, you need to give the path and the filename as well. Especially for the CGI version, you should specify the option --enable-force-cgi-redirect.#:~/src/php-5.0.0RC1 urs$ ./configure \ Now the tricky part was to get a working configuration for the virtual hosts. The idea behind is to have a PHP 4 module installed as default and a per-virtual-host-configuration for other versions of PHP; that might be PHP 5 or 3. So on port 86 php scripts will be processed by PHP 5.0.0 RC1. I collected various links and jotted down some eventually interesting information in the (Wiki/PHP5). Comments (2) Permalink del.icio.us 22. March 2004
Image cropping with PHP and Javascript ![]() The image above show the result of an implementation of one library together with some PHP image handling which was done by Andrew Collington [3]. It was very easy to implement it into my Wordpress Image Handler. [1] http://www.walterzorn.com/dragdrop/dragdrop_e.htm [2] http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm [3] http://www.zend.com/codex.php?id=1340&single=1 Comments (5) Permalink del.icio.us 21. March 2004
PHP5 CGI parallel to PHP4 module on Windows The downloaded PHP 5.0.0RC1 zip package has been unpacked to c:\php5. Then I renamed the php.ini-dist to php.ini and restarted Apache. [1] http://seric.cowiki.org/17.html Comments (0) Permalink del.icio.us 16. March 2004
Just no win-win situation if (stristr(PHP_OS, "WIN")) {This worked usually perfect for scripts moved between Windows and Linux based systems. But one has to be more precise for scripts to run additionally on OS X. Since OS X comes with a PHP_OS string consisting of "Darwin". If you are wondering, why your scripts do not work on Mac try this: if (stristr(PHP_OS, "Windows")) { Comments (0) Permalink del.icio.us
A Wiki Blog joint-venture by Elke [1] http://purplegreen.abstrakt.ch/blog/archives/000214.html [2] http://engelwiki.var.cc [3] http://wiki.ciaweb.net/view.php?wiki=Text_Wiki Comments (1) Permalink del.icio.us 14. March 2004
Image Handler for Wordpress ![]() [1] http://www.circle.ch/php/files/edit-images.php.html [2] http://www.wordpress.org Comments (0) Permalink del.icio.us 11. March 2004
How to walk back N directories - /home/project/user/www/ (web root folder ) - /home/project/user/www/images (folder for images ) - /home/project/user/www/include/dummy/script.php (script to handle images ) The problem was, that the function to scan the images folder (tree) in script.php did not handle absolute path properly (access rights?). So I was looking for a solution to give the relative path from the working directory of script.php back to the absolute path. The following few lines in PHP did it quite well: $p1 = substr_count(realpath(ABSPATH), DIRECTORY_SEPARATOR);A possible result would be "../../images", while $image_base_dir is set to "images". Eventually I missed a simple function this topic easier, if so, let me know ;-) Comments (0) Permalink del.icio.us 06. March 2004
HTMLarea with enhanced Image Handler The Image Handler allows to upload and treat images such as rotating, resizing etc. It runs as well under Mozilla as IE. A modified version is available for Coldfusion [2]. [1] http://www.zhuo.org/htmlarea/?view=flat [2] http://huizen.ddsw.nl/bewoners/slopera/projects/projects.htm Comments (0) Permalink del.icio.us 04. March 2004
Japha - expandable implementation of Java in PHP [1] http://japha.xzon.net Comments (2) Permalink del.icio.us
foresite PRS - a GPL Project Reporting System mojito:~/foresitePRS urs$ chmod 0777 config/prs.iniYou will be pointed to an installation routine. The installation process indicated that the init.sql could not be found. If this is the case just upload the init.sql from the config/ folder with e.g. phpMyAdmin. Nice work of the foresite Programmers. [1] http://foresite.ch/Download.html Comments (1) Permalink del.icio.us 27. February 2004
[RT] Handling SQLite remote files with PHP Just the other day I checked in some code into the CVS of sourceforge. The code is not much more than a hack for now. Anyway. To come to the point of this post: SF does not yet support the sqlite extension. So the title here suggests that there could/should be a way to handle sqlite remote database files. PHP does allow to handle remote files but IMHO the sqlite extension does not. If this is secure or not is to discuss afterwards. PHP5 will generally offer sqlite support. Nevertheless I ask myself if there are any applications that would make sense to have sqlite databases handled remotely. Maybe for portable devices such as mobile phones or handhelds, if they ever offer PHP support (some actually _do_ offer already Python [3]). Since they offer limited storage space, it could be a solution. Contradictions, comments? [1] http://codeconsult.ch/bertrand/ [2] http://sourceforge.net/projects/wikita [3] http://www.mobilewhack.com/programming/python/python_on_nokia_screenshots.html Comments (1) Permalink del.icio.us 26. February 2004
Sleepycat DB XML 1.2.1 with PHP API Sleepycat Software is pleased to announce the release of Berkeley DB XML [1] http://www.merrells.com/john/dbxml/archives/cat_release_history.html#000229 Comments (0) Permalink del.icio.us 24. February 2004
Andi Gutmans on the PHP5 final release schedule Rob: How much time we looking at between RC1 and a final release?Guess-timate; I always wondered how they scheduled releases... ;-P [1] http://marc.theaimsgroup.com/?l=php-cvs&m=107752000920056&w=2 Comments (0) Permalink del.icio.us 28. January 2004
SqliteManager for your Browser [1] http://sqlitemanager.sourceforge.net Update: There are some fixes I had to add to make it running on OS X: Changed the file: common.lib.php, function SQLIteCheckOk()Furthermore the folder and its files did not have the correct owner which generated the following message: Warning: sqlite_query(): unable to open database file inSo changing the owner fixed that problem too: #:/Library/WebServer/Documents me$ sudo chown -R www:www SQLiteManager-0.9.1/Update: Just found another SQLite web manager. This one requires PHP5: http://www.phpro.org/sqlite/ Comments (0) Permalink del.icio.us 06. January 2004
PHP and Web Standards Conference UK 2004 [1] http://pawscon.com Comments (0) Permalink del.icio.us 11. December 2003
Wiki parser in PEAR [1] http://ciaweb.net/free/textwiki.php [2] http://pear.php.net/package/Text_Wiki Comments (0) Permalink del.icio.us 23. October 2003
SMS package for PEAR As seen at the ITU Swisscom offers now a new Outlook plugin called "Desktop SMS" [2]. Since they shut down the free SMS service on gomobile.ch one needs to pay for each message now. [1] news.php.net [2] http://www.swisscom-mobile.ch/sp/UEOAAAAA-de.html Comments (1) Permalink del.icio.us 17. October 2003
Bayesian Filtering of Spam There is currently no PHP implementation so I started to convert the C implementation of Paul Graham's "A Plan for Spam" [1] by Craig Morrison [2]. Unfortunately I got stuck because the PECL sqlite extension does not yet include the sqlite_compile and sqlite_step functions which are used in Craig's version to do some fun stuff with SQLite: sqlite_compile() is used as a precursor to sqlite_step(). It takes anCraig was answering me via email as I asked him if there is a possible workaround to come along without the mentioned functions. Thanks to Craig. [1] http://www.paulgraham.com/spam.html [2] http://sourceforge.net/projects/bayesiancfilter Comments (0) Permalink del.icio.us 09. October 2003
MozPHP - running PHP in Mozilla MozPHP [1] is a Mozilla PHP integration package. With MozPHP you can execute PHP scripts in Mozilla directly without the need for a local HTTP server.This reminds me of an earlier server-less approach by Scriptviewer [2] dated back to 2001. As far as I can see MozPHP only installs on Windows and Linux but not yet on Mac OS X. A full crossplatform integration would probably be nescessary to make MozPHP interesting for CD-ROM distributions of PHP applications. MozPHP and Sqlite would make a nice couple too, especially for distributable but offline use. [1] http://www.thomas-schilz.de/MozPHP/ [2] http://www.angorasoftware.com/phpviewer.html Comments (0) Permalink del.icio.us 24. September 2003
Smarty Tidy Output Filter [1] http://coggeshall.org/show_source.php?filename=outputfilter.tidyrepairhtml.php Comments (0) Permalink del.icio.us 17. September 2003
Disable functions per directory in PHP 4.3.3 [1] http://www.zend.com/lists/php-dev/200309/msg00120.html Comments (0) Permalink del.icio.us 16. September 2003
PECL Tidy extension for Windows <?phpThis produces the currently available functions in this extension: ArrayCredits to John [3] for implementing Tidy. [1] http://kromann.info/pear-pecl.php [2] http://pear.php.net/package-info.php?package=tidy [3] http://coggeshall.org Comments (0) Permalink del.icio.us 11. September 2003
Serendipity presented by coWiki [1] http://www.s9y.org [2] http://www.develnet.org Comments (3) Permalink del.icio.us
Using PEAR to cache cafelog/b2 Hacking cafelog/b2 can be a pain. I tried to add some caching based on PEAR::Cache while adding it to the code of b2. There was no reasonable way to do so within an acceptable amount of time. But the pages went slow on the blog and there was something to do about it. So I think there is a way to handle it; at least it looks like. The caching now done is based on the idea, that I take an application and say something like "start caching" at the very beginning of the script and "stop it" at the very end. A way to control such mechanism is done by the Apache directive php_value, where one can reconfigure the Apache server configuration. Therefore the parameters auto_prepend_file and auto_append_file have been used. They allow exactly a handling of such a start-stop mechanism. What follows is some lines of code of PHP, split up into two files, the prepend.php and the append.php. This solution is probably suboptimal but it improved the accessability of the blog posts at least subjectively but hopefully not only. Any improvements are welcome. Lots of good discussions about caching can be found on Simons blog [1]. 01 <?php 02 // $Id: prepend.php,v 1.1 2003-09-11 01:31:17+02 urs Exp urs $ 03 04 /** 05 * Quick & dirty way of caching a blog. 06 * Put this into your .htaccess file: 07 * php_value auto_prepend_file /home/example.com/htdocs/prepend.php 08 * php_value auto_append_file /home/example.com/htdocs/append.php 09 * 10 * References: 11 * - http://ch.php.net/manual/de/ref.outcontrol.php 12 * - http://www.onlamp.com/lpt/a/1227 13 * - http://www.ulf-wendel.de/php/show_source.php?file=cache_dem_file 14 * - http://iamcal.com/publish/articles/php/processing_html/ 15 */ 16 17 // Include the package 18 require_once 'Cache/Output.php'; 19 20 // Set some variables 21 $cache_path = array( 22 'cache_dir' => "/home/example.com/cache/", 23 'filename_prefix' => "cache_" 24 ); 25 26 // Create a Cache object 27 $objCache = &new Cache_Output('file', $cache_path ); 28 29 // Compute unique cache identifier for the page 30 $cache_params = array( 31 'url' => $_SERVER['REQUEST_URI'], 32 'post' => $_POST, 33 'cookies' => $_COOKIE 34 ); 35 36 $urltest = parse_url("http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] ); 37 if( preg_match('#([cmp]+)([0-9]{1,}).html#', $urltest['path'] , $match ) 38 OR ( trim($urltest['path'], "/") == "blog") ) { 39 40 // Set an ID for this cache 41 $cache_id = $objCache->generateID($cache_params ); 42 43 // Query the cache 44 if ( $content = $objCache->start($cache_id ) ) { 45 46 // Cache Hit 47 echo $content; 48 exit("[Cache hit]"); 49 } 50 } 51 52 ?> 01 <?php 02 // $Id: append.php,v 1.1 2003-09-11 01:29:08+02 urs Exp urs $ 03 04 /** 05 * Test if there is any cached data. If not obtain it, 06 * save and display it. 07 * 08 */ 09 if( strlen($objCache->start($cache_id)) < 1 ) { 10 // This should not be here either, but it is obviously required. 11 // Tell me if You know any better... 12 ob_end_clean(); 13 14 // Cache pages starting with pXXX.html, cXXX.html and mXXX.html. The main 15 // page http://example.com/blog/ is being cached using a parse_url trick. 16 if( preg_match('#([cmp]+)([0-9]{1,}).html#', $urltest['path'] , $match ) 17 OR ( trim($urltest['path'], "/") == "blog") ) { 18 // Store page into cache 19 echo $objCache->end(3600); 20 } 21 } 22 ?> [1] http://simon.incutio.com/archive/2003/06/21/ Comments (0) Permalink del.icio.us 06. September 2003
IP to Country - PHP implementation update [1] http://www.appelsiini.net/~tuupola/archives/110/ [2] http://ip-to-country.directi.com Comments (0) Permalink del.icio.us 02. September 2003
PHP to IL compiler It does not yet seem to have a completed solution around, but if one gets stuck, he or she might like to try the ASM to IL compiler [3] as a last possibility. [1] http://www.compisoft.ch/BLog/Default.aspx?EntryId=e4c6ab78-1e70-4dff-b568-71900c08c4d9 [2] http://www.edwardbear.org/blog/archives/000216.html [3] http://home.worldonline.dk/viksoe/asmil.htm Comments (0) Permalink del.icio.us 15. August 2003
Error page 404 and RSS autodiscovery <link rel="alternate" type="application/rss+xml" title="RSS" href="http://circle.ch/blog/b2rss.php">Unless you have that link tag in your (x)html source, the result of autorss.py is the passed URL. [1] http://diveintomark.org/archives/2002/08/15/ultraliberal_rs [2] http://diveintomark.org/archives/2002/08/15/ultraliberal_rss_locator.html [3] http://diveintomark.org/archives/2002/05/31/rss_autodiscovery_in_python Comments (0) Permalink del.icio.us 11. August 2003
Tidy into PECL HTML Tidy, including both TidyLib and the command line utility, uses the W3C license:That sounds not too bad and finally: The copyright holders and contributing author(s) specifically permit, without fee, and encourage the use of this source code as a component for supporting the Hypertext Markup Language in commercial products.From the legal side it should be possible to have tidy compiled into PHP. Please notify me if you have a different point of view. [1] http://tidy.sf.net [2] http://pear.php.net/package-info.php?package=tidy Comments (0) Permalink del.icio.us 09. July 2003
IP to country conversion pear install http://www.appelsiini.net/~tuupola/php/download/I18N_IP2Country-0.2.0.tgzThe relation between the IP and the country is constructed via information [3] put into a database: CREATE TABLE ip2country ( [1] http://www.geobytes.com/IpLocator.htm?GetLocation [2] http://www.appelsiini.net/~tuupola/php/I18N_IP2Country/docs/ [3] http://www.ip-to-country.directi.com/latest/ip-to-country.csv.zip Comments (1) Permalink del.icio.us
Fancy PHP debugging [1] http://www.zend.com/zend/tut/tutorial-DebugLib.php [2] http://dev.izibox.isa-geek.org/NiceDebug/ Comments (0) Permalink del.icio.us
DOM Abstraction Classes for PHP require_once("DOM_Document.php");Why should this be of any use? Since one can work with an abstraction of DOM it will be much easier to upgrade the written applications from PHP4 to PHP5. Update: The installation should work like: pear install http://matt.online-canarias.com/dom/DOM.tar.gz [1] http://matt.online-canarias.com/dom/ Comments (2) Permalink del.icio.us 07. July 2003
SQLite documentation on Zend [1] http://www.zend.com/manual/ref.sqlite.php Comments (1) Permalink del.icio.us 29. June 2003
PHP 5.0.0 Beta 1 Some of the more major changes include:
Note: This is a beta version. It should not be used in production or even semi-production web sites. There are known bugs in it, and in addition, some of the features may change (based on feedback). We encourage you to download and play with it (and report bugs[2] if you find any!), but please do not replace your production installations of PHP 4 at this time. [0] http://marc.theaimsgroup.com/?l=php-general&m=105691130207273&w=2 [1] http://www.mysql.com/products/licensing.html [2] http://bugs.php.net/ Comments (0) Permalink del.icio.us 26. June 2003
Parsing FOAF with PHP [1] http://www.semanticplanet.com/2003/05/parsingFOAFWithPHP.html Comments (1) Permalink del.icio.us
Turck MMCache for PHP on Windows The installation in the php.ini is pretty straight forward and well documented in the README: zend_extension_ts="c:\php\extensions\mmcache.dll"[1] http://www.turcksoft.com/en/e_mmc.htm [2] http://sourceforge.net/project/showfiles.php?group_id=69426 Comments (0) Permalink del.icio.us 25. June 2003
Having SQLite per default in PHP5? On the other hand there was a thread on disabling MySQL by default [4] and a request for enabling PostgreSQL instead [5]. [1] http://news.php.net/article.php?group=php.internals&article=2563 [2] http://news.php.net/article.php?group=php.internals&article=2715 [3] http://article.gmane.org/gmane.comp.php.devel/15705 [4] http://article.gmane.org/gmane.comp.php.devel/15621 [5] http://article.gmane.org/gmane.comp.php.devel/15826 Comments (0) Permalink del.icio.us 23. June 2003
PHPTAL - PHP Template Attribute Language PHPTALES is the equivalent of TALES, the Template Attribute Language Expression Syntax, it defines how are handled xml attribute values. XML/HTML templates exists to separate logic from presentation in web services. This separation brings more than one benefits in its luggage. * better application design * easier task repartition * better maintainability * web skins I came across that implementation while reading about Simon's own work [2]. [1] http://phptal.sourceforge.net [2] http://simon.incutio.com/archive/2003/06/17/theHolyGrail Comments (0) Permalink del.icio.us
PEAR version 1.2 RC1 released Version: 1.2RC1-stable (2003-06-23 08:45:00)and Tomas V.V. Cox worked out a new DB release too Version: 1.5.0RC1-stable (2003-06-23 01:09:00) [1] http://pear.php.net Comments (0) Permalink del.icio.us 16. June 2003
Sun will support PHP in Java [1] http://www.computerwoche.de/index.cfm?pageid=254&artid=49919 Comments (0) Permalink del.icio.us 15. June 2003
Micropayment - PHP and Paypal [1] http://www.zend.com/zend/tut/tutorial-paypal.php Comments (0) Permalink del.icio.us 12. June 2003
Fanmail for Rasmus [1] http://www.edwardbear.org/blog/archives/000201.html [2] http://lerdorf.com/fanmail.txt [3] http://trash.chregu.tv/instructions.txt Comments (0) Permalink del.icio.us
YAML for PHP [1] http://www.yaml.org [2] http://whytheluckystiff.net/syck/ [3] http://yaml4r.sourceforge.net/cookbook/ Comments (0) Permalink del.icio.us 11. June 2003
RAP - RDF API for PHP [1] http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html Comments (0) Permalink del.icio.us 27. May 2003
SQLite wrapper for PEAR:DB [1] http://www.circle.ch/php/files/DB_sqlite/ Comments (1) Permalink del.icio.us 22. May 2003
Themes for PHP-GTK on Windows [1] http://www.cweiske.de/phpgtk_themes.htm Comments (0) Permalink del.icio.us
PHP a threat for ASP .NET? [1] http://www.castagnetto.org [2] http://www.infoworld.com/article/03/05/09/19OPcringely_1.html [3] http://msdn.microsoft.com/library/en-us/dnaspp/html/phpvsaspnet.asp [4] http://www.edwardbear.org/blog/archives/000180.html Comments (0) Permalink del.icio.us 20. May 2003
OpenOffice Impress (*.sxi) docs to pres2 Just uncompress the *pres.sxi to a folder tmp and use xsltproc.exe to run the XSLT. It should work. Some discussion on what a basic sxi file needs to look like can be found on a OOo mailinglist [5] or at Raymond Yee's site [6]. [1] http://circle.ch/blog/p802.html [2] http://cvs.php.net/cvs.php/pres2 [3] http://circle.ch/pdf/gehrig_030521_OOo2pres.pdf [4] http://circle.ch/pdf/gehrig_030521_OOo2pres.sxi [5] http://xml.openoffice.org/servlets/ReadMsg?msgId=645904&listName=dev [6] http://iu.berkeley.edu/rdhyee/discuss/msgReader$755 Update: Forgot to mention "OpenOffice.org XML transformation to HTML/WML/PALM HTML 3.2" [7]. [7] http://xml.openoffice.org/sx2ml/ Comments (2) Permalink del.icio.us
HttpAuthPlus for PHP I did not try it out; the user handling was just to mention here. [1] http://sourceforge.net/projects/httpauthplus/ Comments (0) Permalink del.icio.us 18. May 2003
Apache-PHP-Horde-Win32 installation [1] http://www.graftonhall.co.nz/mikes/Apache-Mysql-Php-Horde/ Comments (0) Permalink del.icio.us 17. May 2003
OpenOffice slides to PHP pres2 [1] http://www.edwardbear.org/blog/archives/000179.html Comments (1) Permalink del.icio.us 14. May 2003
Flat file database supporting SQL [1] http://www.c-worker.ch/txtdbapi/index_eng.php Comments (1) Permalink del.icio.us 13. May 2003
Undocumented feature in trim() <?phpI found that in a script of Rasmus. Comments (3) Permalink del.icio.us 12. May 2003
PECL SQLite installation # pear install SQLite-0.9.tgz Comments (1) Permalink del.icio.us 09. May 2003
Perl embedded in PHP [1] http://www.schlueters.de/perl-pre0.1.tar.bz2 [2] http://news.php.net/article.php?group=php.pear.dev&article=15811 [3] http://msalem.translator.cx/perlinphp.php And there is one more: Thies [4]: you may want to look at [4] http://news.php.net/article.php?group=php.pear.dev&article=16066 Comments (0) Permalink del.icio.us 08. May 2003
PHP embedded in Mysql mysql> SELECT php('','hello, world!');The source files are available at his site [2]. [1] http://talks.php.net/show/myphp/ [2] http://www.sklar.com/page/article/myphp Comments (1) Permalink del.icio.us
phpize uses automake #:/usr/local/src/SQLite-0.9# phpizeSo an "# apt-get install automake" did the job. It had nothing to do with locales. Comments (0) Permalink del.icio.us 06. May 2003
PECL binaries for Windows Comments (1) Permalink del.icio.us 05. May 2003
Handling JPEG metadata with PHP require_once 'Image/JPEG.php';A similar package found already its way into PEAR lately [2]. [1] http://www.zonageek.com/tmp/JPEG.php.txt [2] http://cvs.php.net/cvs.php/pear/Image_IPTC/ Comments (0) Permalink del.icio.us
Securing PHP on Debian Linux [1] http://www.pookey.co.uk/php-secure.php Comments (0) Permalink del.icio.us Fatal error: Maximum execution time of 120 seconds exceeded in /home/circle.ch/htdocs/blog/b2comments.php on line 184 | |