background preloader

Php

Facebook Twitter

Dtcss - Google Code. DtCSS is a PHP script that preprocesses your CSS file. It speeds up CSS coding by extending the features to CSS. Such as nested selectors, color mixing and more. DtCSS reads the CSS file with special syntax written for DtCSS, and outputs the standard CSS. It also comes with a smart caching system. You can download DtCSS from the downloads page, or checkout from SVN. For detailed information of syntaxes in DtCSS, read the Syntax Guide. DtCSS processes this CSS file: And outputs: Some advanced features in the latest version of DtCSS #define mp margin, padding#define bg background#define fg color #define FONT Verdana, sans-serif Will produce this CSS: Add Power to Your PHP With Multi-Tiered Applications. Easy PDF Generation in PHP. Carron Media - Create an RSS feed with PHP. Create an RSS feed with PHP Posted by Ian Harris on March 18, 2009 Having an RSS feed on your website is a great way of sharing your content with the rest of the Internet.

It’s not a new technology and it’s probably something that you use on a daily basis. If you have a blog or use any form of CMS, that software will most likely handle the creation of your RSS feed for you. Sometimes, however, it might be necessary for you to create a RSS feed yourself. Perhaps you have just won a new client who’s current site has a old bespoke CMS which they like and want to keep, but you want to be able to publish their updated content via RSS. What is RSS? RSS, in its current form, stands for Really Simple Syndication and is a family of web formats to publish frequently updated content. The RSS format is based on XML that is built using standardised tags. Take a look at the RSS Wikipedia page for a full history of RSS and it’s various different versions. Creating the feed Conclusion Resources. How to Add Variables to Your CSS Files - Nettuts+

Let's try something different on nettuts+ today. Any designer who has worked with large CSS files will agree that its major weakness is its inability to use variables. In this article, we will learn how to implement variables by using PHP and Apache's URL rewrite mod. Preface This technique is somewhat simple. We will ask Apache to redirect any stylesheet to a specific PHP script. This script will open the stylesheet, and read it line by line to find and replace any user-defined variables. Please note that some basic PHP (OOP), Apache and HTTP knowledge are expected. Requirements: Apache with Rewrite mod onPHP 5 Step 1 - Build the Project Let's first create our simple project structure. Now, create a CSS file with the following variables and place it in a "css" folder Finally, create a blank PHP file named enhanced_css.php and a blank .htaccess file.

Now our project should look like this: Step 2 - Redirect CSS files to a PHP Script Now, edit your .htaccess file and add the following lines. Note: Manipulating Images using the PHP GD Library. By Patrick Lin PHP is a very versatile programming language with many available libraries. A popular one, the GD Library, enables you to manipulate images. This post will take you through the process of manipulating images using the PHP GD library. To begin any manipulation, one must access an image resource. Here are four functions to accomplish this: imagecreate( int $width, int $height ) – creates a blank image resource of the specified size.imagecreatefromgif( string $filename ) – creates an image resource from the specified GIF format file.imagecreatefromjpeg( string $filename ) – creates an image resource from the specified JPEG format file.imagecreatefrompng( string $filename ) – creates an image resource from the specified PNG format file.

All of these functions return ‘resources’, which are used in the GD Library as parameters. Let us start off with an image called sunburst.jpg. Sunburst.jpg has the dimensions 549×359, so the following code: will print 549 359. Imagecopy Code: Product: Création et optimisation d'un google Sitemap. Comme son nom l'indique, le Google SiteMap ou Plan SiteMap est un système créé et développé par Google. À ce jour, toujours en bêta, il est accessible via l'interface Webmaster Tools (Outils Google à l'attention des webmasters) de Google.

Dans cet article, nous allons découvrir comment créer et optimiser un Plan SiteMap. I-A. Pourquoi Google SiteMap ? ▲ L'indexation des pages de votre site, d'autant plus lorsqu'il est récemment créé, peut être un processus extrêmement long. I-B. Le plan SiteMap est un fichier XML représentant l'arborescence de votre site qui doit être transmis à Google. II-A. Le fonctionnement de Google SiteMap est très simple et se déroule en trois étapes : créer un ou des fichiers XML spécifiques contenant les URL de votre site ; placer le fichier XML sur votre site en respectant les contraintes d'emplacements et de tailles ; soumettre votre fichier SiteMap à Google. II-B. Votre fichier XML doit ressembler à celui-ci, nous le détaillerons ensuite. <? II-B-1. <url> ... <? <?