Category Archives: Web
Ming vs Flash
Flash, oooohhhhh! Saviour of the universe!
No, not the evil warlord and his arch enemy, but the ming library for PHP and other languages.
Take a quick look through the examples. Interesting eh?
Of course, I want to do something that Ming itself might not be able to do: create a static .swf file that can load image files given on the URL command line. I’ve gone searching and I’m grappling with new ideas. It seems I’ll have to write actionscript to load the image (that’s obvious if you think about it, Ming is out of the way when a .swf file is created.)
None of the examples I’ve come across accept parameters. 🙁
I’m going to look at this over the weekend if I find the time.
Some links:
- Google Search: flash tutorial
- w3schools
- Macromedia
- Flash and Javascript – very interesting.
- The bitmaps example on the Ming examples page offers a clue.
// add a third bitmap of xmms using MX actionscript
$strAction = ”
createEmptyMovieClip(‘picxmms’,10);
picxmms._x=150;
picxmms._y=100;
picxmms.loadMovie(‘http://www16.brinkster.com/gazb/ming/xmms.jpg’);
“;
$movie->add(new SWFAction(str_replace(“\r”, “”, $strAction)));If I could replace the movie URL with a variable I’d be sorted!
Later.. I should have asked Google first. Here’s how to pass parameters to a Flash file. The variable name gets put into the _root name space automatically.
Writing, Briefly
Writing, Briefly – excellent.
trendalicious!
Irish Blogs and Bloggers
Irish Blogs and Bloggers – Here’s another agregator of Irish blogs, this time from the blogsome people.
This joins Planet ILUG as another source of Irish opinion and comment!
Millions of Pages Google Hijacked using ODP Feed
Millions of Pages Google Hijacked using ODP Feed – I don’t think so.
How to improve the Google ranking of your portfolio site
The other Martin Taylor provides a short article on how to increase the visibility of your photo portfolio on Google. All basic stuff, but if you don’t know ’em they’re invaluable!
The Interactive Web
Ajax or XMLhttpRequest using applications still have a long way to go. Gmail is more definitely the most advanced and best such app. Here’s some discussion on the subject:
- QuirksBlog: Ajax, promise or hype?
- About “Combining XMLHttpRequest and Rails to Produce More Efficient UIs”
- Applied Ajax
- Usable XMLHttpRequest in Practice
- AJAX and Accessibility
(Strange – several blogs listed and none have trackbacks that I can see!)
Another 302 redirect trick
Show Google one page, but when someone searches and clicks on the first link (remove the “_”, I’m not feeding them free ad clicks) the browser is sent off to an adfarm adclick script and finally to another site.
Visit the above site using wget, links or lynx and it won’t redirect!
Lighttpd, fastcgi, php and eAccelerator
lighttpd is a lightweight httpd server I came across on #wordpress (thanks michel_v!)
It took a while but I got it working on a server and it’s rather nice. You can run php scripts through it using the fastcgi interface. Here’s how I installed it on a Debian machine. Lines starting with “#” are commands that should be entered as the root user. (lots ripped from this tutorial)
# wget http://www.lighttpd.net/download/lighttpd-1.3.13.tar.gz # tar zxvf lighttpd-1.3.13.tar.gz # cd lighttpd-1.3.13 # dpkg-buildpackage
dpkg-buildpackage can be found in the package “cvs-buildpackage”. You’ll have to install a number of dependencies before this works. Just apt-get install packagename them as they come up.
# cd .. # dpkg -i lighttpd_1.3.13-1_i386.deb
This will install lighttpd and start it.
Now you need to install and configure php:
# apt-get install php4-cgi # vi /etc/lighttpd/lighttpd.conf
Look for the fastcgi.server section for php4 and change it so it looks like this:
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/bin/php4-cgi"
)
)
)
Download eaccelerator from their site and follow the instructions in the README. If you haven’t got phpize then install php4-dev.
Open up /etc/php4/cgi/php.ini and add the following at the top of the file:
extension="eaccelerator.so" eaccelerator.shm_size="32" eaccelerator.cache_dir="/tmp/eaccelerator" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.filter="" eaccelerator.shm_max="0" eaccelerator.shm_ttl="1800" eaccelerator.shm_prune_period="1800" eaccelerator.shm_only="0" eaccelerator.compress="1" eaccelerator.compress_level="9" eaccelerator.content="shm_and_disk"
You’ll have to create the tmp directory yourself. Read the README file and config docs for instructions on using the web frontend to the accelerator.
I think that’s it, have I forgotten anything?
