Sepehr Lajevardi's Library tagged → View Popular
MicroApache - A Portable Apache Server for Windows
This is a microscopic and very-heavily trimmed-down version of the standard, GPL Apache server. It was developed initially to meet a FloppyWeb Challenge to run Apache from a standard 1.44Mb floppy disk. My thanks to James Greenwood (no website, unfortunately) for coming up with the original idea. It has been gradually revised to provide a portable micro-server for home use which will run from a USB drive with no install and minimal configuration.
I have further reduced the size by another 50% and now it weighs in at around about 350kb for the most-minimal, fully-working version of Apache; with a legacy version of 1.3.x weighing-in at only 170Kb. Larger versions with bundled apps are still less than a megabyte. The object code is not modified and you can safely configure it or add modules in just the same way as "big" Apache. Many non-essential files are stripped-out and compression used to reduce the size of both EXE and DLL (SO) modules. Micro-PHP adds only another ~523kb to make a grand total of about 900kb. Micro-SQL modules are available using both MySQL and SQLite. Why bother with other less-flexible ultra-micro webservers when you can have genuine Apache, fully extendible and with practically limitless configuration in about the same digital footprint?. Start small and just add the bits you need until you're ready to install the full-blown server.
Creating a PHP based IRC Bot
By the end of this tutorial you will end up with a functioning IRC bot that can connect to a server, join channels, give and take operator, half operator, voice and protected status from a user. In the next tutorial I will discuss the different ways to “log” certain parts of the information processed by the bot, how to build a statistics table of various statistics like who has been on the longest, speaks the most, etc.
Right a few assumptions have been made, you have a text editor, at least a basic knowledge of object orientated PHP, access to an IRC client, a web server with PHP 5.3.0, preferably, if not a work around is needed later in the tutorial...
Deploying PHP applications with Vlad and SVN
In the following article, I'm going to describe how I went from there to deploying my Zend Framework-driven PHP apps with Vlad. To save yourself some time, feel free to skip the back story, the pre-requisite of installing ruby, gem and rake, or go straight to the deployment recipes.
I did the above method for a while, and realized quickly how much time is wasted by this process. Remembering my efforts of deploying PHP apps with Capistrano, I felt it was time to set up an automated deployment routine. While re-reading the article, thoughts returned of how unwieldy and badly documented Capistrano came across, and I started looking for something more lean, that wouldn't scare of my non-ruby colleagues who might have to do my job when I'm away.
Very quickly I was lead to Vlad the Deployer, replacing one deployment app where the person in charge of the name had one tipsy field day with, well, another.
Dynamic Drag’n Drop With jQuery And PHP
Drag’n drop generally looks hard-to-apply but it is definitely not by using JavaScript frameworks...
How to implement a Post-to-Wall Facebook-like
In the past months I received a lot of request to write a tutorial for beginners in order to explain how to implement a Post-to-Wall Facebook-like. So, I prepared this very simple example which helps everyone understand how to implement this feature in a website using just some lines of PHP and JavaScript code.
Writing powerful and easy config files with PHP-arrays - DASPRiD's v8
I was asked many times how I organize my config files, and my response was always the same, until some time ago when I switched began refactoring the codebase of my blog. I always used PHP config files in some way (as I got inspired to it by Matthew Weier O'Phinney). So first let's clearify the advantages of PHP-array config files:
· they allow to organize one config into multiple files
· they can be cached by an opcode cache
· they support constants
· they allow to create easily readable config trees
Looking at those advantages, you may ask now why not everbody is using them. Well the problem mostly is that you cannot create extend-sections (when working with Zend_Config for example). So in the past I always had to create separate config files for each development and production environment. When I started refactoring the codebase I thought about that problem and came to a very simple solution...
Create a Zip File Using PHP
Creating .ZIP archives using PHP can be just as simple as creating them on your desktop. PHP’s ZIP class provides all the functionality you need! To make the process a bit faster for you, I’ve coded a simple create_zip function for you to use on your projects.
Create a Basic Web Service Using PHP, MySQL, XML, and JSON
Web services are taking over the world. I credit Twitter’s epic rise to the availability of a simple but rich API. Why not use the same model for your own sites? Here’s how to create a basic web service that provides an XML or JSON response using some PHP and MySQL.
PHP class for using the Google Analytics API
Just quickly following up my post from earlier on today where I looked at how to log into the Google Analytics API using PHP and CURL using Username/Password Authentication I wrapped the login code up into a class with methods for logging in and then calling API functions. I'll look at parsing the XML result data at a later stage.
Update April 28th 2009: I've started a series about this. The full class, which I will continue to update over the next few days, can be downloaded here. The class presented below is an earlier version of it. Original post continues...
Log into the Google Analytics API using PHP and CURL
Google have finally made an API available for Google Analytics although it's currently in beta and the specs are subject to change. I've been playing around this morning logging in using ClientLogin Username/Password Authentication with PHP and CURL and show how to do this here. In future posts I'll look at how to actually use the API but this will get us all started for now.
The code example below attempts to log in using $email and $password which are the email address and password you would normally use to log into Analytics..
Aspect Oriented PHP
thought I’d share this idea I had for implementing an aspect oriented framework in PHP (yes, I know about http://aophp.net, but it requires an extension).
Mostly, it demonstrates how far you can take PHP without resorting to extensions (which would be faster I presume). I’m not recommending it as a cure all, I’m just presenting it as an interesting approach that few PHPers know about..
Domain Model Validation
Using some magic methods can integrate validation without having to implement get and set methods everywhere. ..
Alternative syntax for control structures
PHP offers an alternative syntax for some of its control structures; namely, if, while, for, foreach, and switch. In each case, the basic form of the alternate syntax is to change the opening brace to a colon (:) and the closing brace to endif;, endwhile;, endfor;, endforeach;, or endswitch;, respectively.
10 Free Scripts to Create Your Own Url Shortening Service
Since the popularity of Twitter started to rise and the 140 characters mania began, there has been an outburst of Url shortening services which allow you to sqeeze a long url in the given limited space. There are many url shortening services out there which are both free and easy to use. There is no doubt, that till services like Twitter are there, these url shortening services are no where to go...
Embedding PHP In CSS
Perhaps one of the most frustrating aspects of using PHP with websites, is getting variables into CSS. Having variables stored in an ini file, config file or even a database can make the updating of the look and feel of a site simple, however, CSS files, by default, do not parse PHP. Of course, the web server could be told to parse CSS as PHP in the same way it does for HTML...
Introduction To SimpleXML With PHP
XML creation and manipulation can be quite complex and so, PHP has provided several methods of handling XML. Each method has a varying degree of complexity, but perhaps the simplest of them all, is the appropriately named extension, SimpleXML
This tutorial requires a fundamental understanding of XML structures. If you lack this, it is highly recommended brushing up on XML and how it can be used.
Selected Tags
Related Tags
Sponsored Links
Top Contributors
Groups interested in php
-
Programming
Items: 59 | Visits: 96
Created by: Julian Knight
-
PHP+Apache+MySQL+PHPCMS学习计划
PHP+Apache+MySQL+PHPCMS学习计划
Items: 37 | Visits: 147
Created by: 刘 正刚
Diigo is about better ways to research, share and collaborate on information. Learn more »
Join Diigo
