Integrating PHP and Perl
Perl is a language often associated with text processing and CGI. PHP is
a language often associated with dynamic Web pages. Both are very popular
with Web developers. Often, each of these languages is used at the expense of
the other. Hard-core Perl developers would love to develop everything in
Perl, and PHP developers tend to stick with PHP.
As usual in the Open Source
world, there is a lot of zealotry between users of each language. If you
think that one of these languages is perfect and the other is lame,
this article is not for you! This article is for those who take a more
pragmatic approach and use what works best for them. Each language has
its strengths and limitations. Personally, I use both languages at work
and at home. With time, I have discovered which language is best for which
tasks and
try to integrate the strengths of each language as much as possible to
complete my work quickly.
Perl is extremely good at
system administration and extensive data processing, among other
things. This means, if you want to do some extensive processing on a text
report, Perl would be preferable, as it provides handy
regular-expression-enabled text comparisons, which make it so much easier to
search through a report. Perl also has extensive string manipulation
features. Perl, by virtue of being older than PHP and having an extensive
community, has thousands of extensions archived in CPAN, which allow
one to do virtually anything with the language, conveniently. from XML
processing to writing to parallel port devices, CPAN includes
everything. CPAN is the reason Perl continues to be useful to a
large number of developers to date. Although it is not impossible to do
everything described here with PHP and a mixture of other languages, it's
simply more convenient with
Perl.
PHP is extremely good at integration with Web pages and databases. PHP
integrates nicely with static HTML Web pages. That's why it's so
popular and has
相关文档:
<?php
$host = "www.abc.com"; //你要访问的域名
$target = "/test.asp"; //你要访问的页面地址
$referer = "http://www.abcdefg.com/abc.html"; //伪造来路页面
$fp = fsockopen($host, 80, $errno, $errstr, 30);
if (!$fp){
echo "$errstr($errno)<br />\n";
} ......
受影响系统:
PHP PHP 5.2.x
不受影响系统:
PHP PHP 5.2.11
描述:
BUGTRAQ ID: 36449
CVE ID: CVE-2009-3291,CVE-2009-3292,CVE-2009-3293,CVE-2009-3294
PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。
PHP的5.2.11之前版本的多个函数中存在安全漏洞,可能允许远程攻击者导 ......
PHP是使用最为广泛的开源服务器端脚本语言之一,当然PHP并
不是速度最快
的,但它却是
最常用的脚本语言
。这里有50个有益的PHP工具,可以大大提高你的编程工作:
调试工具
Webgrind
Xdebug
Gubed PHP Debugger
DBG
PHP_Debug
PHP_Dyn
MacGDBp
测试和优化工具
PHPUnit
SimpleTest
......