1. Trang chủ
  2. » Công Nghệ Thông Tin

Webmapping with PHP

71 232 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 71
Dung lượng 4,01 MB

Nội dung

JULY 2004 VOLUME III - ISSUE 7 JULY 2004 VOLUME III - ISSUE 7 www.phparch.com The Magazine For PHP Professionals TM Plus: Tips & Tricks, Product Reviews, Security Corner and much more . Sign up before July 20th and save up to $100! Christian Mayaud — Getting Your OSS Business Funded , Rasmus Lerdorf — Best Practices for PHP Developers , Jim Elliott — Open Source: The View from IBM , Daniel Kushner — Attacking the PHP Market , Andrei Zmievski — Andrei’s Regex Clinic , Wez Furlong — Introducing PDO , Regina Mullen — OSS in Legal Technology , Derick Rethans — Multilingual Development with PHP , George Schlossnagle — PHP Design Patterns . and many, many more! php|w rks Toronto, Sept. 22-24, 2004 Three days of pure PHP http://www.phparch.com/phpworks Jump Right To It. 05 Editorial 06 What’s New! 43 Product Review MicroOLAP Database Designer for MySQL by Peter B. MacIntyre 61 Security Corner Form Spoofing 64 Tips & Tricks By John W. Holmes 68 exit(0); Constant Variables in an Invariant Environment by Andi Gutmans and Marco Tabini 10 Charted Data Mining with PHP and JpGraph by Jason E. Sweat 19 User Abandonment Tracking with PHP and DHTML by Darrell Brogdon 25 Webmapping with MapServer by Rodrigo Becke Cabral 37 Build Your Own Debugging Library Debug PHP—the Smart Way by Michael Paul Bailey 48 Socket Interprocess Communication Cool stuff with PHP, sockets and XUL by Rick Morris 3 July 2004 ● PHP Architect ● www.phparch.com TABLE OF CONTENTS II NN DD EE XX II NN DD EE XX php|architect Features Departments TM *By signing this order form, you agree that we will charge your account in Canadian dollars for the “CAD” amounts indicated above. Because of fluctuations in the exchange rates, the actual amount charged in your currency on your credit card statement may vary slightly. Choose a Subscription type: CCaannaaddaa//UUSSAA $$ 9977 9999 CCAADD (($$6699 9999 UUSS**)) IInntteerrnnaattiioonnaall AAiirr $$113399 9999 CCAADD (($$9999 9999 UUSS**)) CCoommbboo eeddiittiioonn aadddd--oonn $$ 1144 0000 CCAADD (($$1100 0000 UUSS)) ((pprriinntt ++ PPDDFF eeddiittiioonn)) Your charge will appear under the name "Marco Tabini & Associates, Inc." Please allow up to 4 to 6 weeks for your subscription to be established and your first issue to be mailed to you. *US Pricing is approximate and for illustration purposes only. php|architect Subscription Dept. P.O. Box 54526 1771 Avenue Road Toronto, ON M5M 4N5 Canada Name: ____________________________________________ Address: _________________________________________ City: _____________________________________________ State/Province: ____________________________________ ZIP/Postal Code: ___________________________________ Country: ___________________________________________ Payment type: VISA Mastercard American Express Credit Card Number:________________________________ Expiration Date: _____________________________________ E-mail address: ______________________________________ Phone Number: ____________________________________ Visit: http://www.phparch.com/print for more information or to subscribe online. Signature: Date: To subscribe via snail mail - please detach/copy this form, fill it out and mail to the address above or fax to +1-416-630-5057 php|architect The Magazine For PHP Professionals YYoouu’’llll nneevveerr kknnooww wwhhaatt wwee’’llll ccoommee uupp wwiitthh nneexxtt S ubscribe to the print edition and get a copy of Lumen's LightBulb — a $499 value absolutely FREE † ! In collaboration with: Upgrade to the Print edition and save! For existing subscribers Login to your account for more details. EXCLUSIVE! EXCLUSIVE! † Lightbulb Lumination offer is valid until 12/31/2004 on the purchase of a 12-month print subscription. July 2004 ● PHP Architect ● www.phparch.com EE DD II TT OO RR II AA LL RR AA NN TT SS php|architect Volume III - Issue 7 July, 2004 Publisher Marco Tabini Editorial Team Arbi Arzoumani Peter MacIntyre Eddie Peloke Graphics & Layout Arbi Arzoumani Managing Editor Emanuela Corso Director of Marketing J. Scott Johnson scott@phparch.com Account Executive Shelley Johnston shelley@phparch.com Authors Michael Paul Bailey, Darrell Brogdon, Rodrigo Becke Cabral, Andi Gutmans, John W. Holmes, Peter B. MacIntyre, Rick Morris, Chris Shiflett, Jason E. Sweat php|architect (ISSN 1709-7169) is published twelve times a year by Marco Tabini & Associates, Inc., P.O. Box 54526, 1771 Avenue Road, Toronto, ON M5M 4N5, Canada. Although all possible care has been placed in assuring the accuracy of the contents of this magazine, including all associated source code, listings and figures, the publisher assumes no responsibilities with regards of use of the information contained herein or in all asso- ciated material. Contact Information: General mailbox: info@phparch.com Editorial: editors@phparch.com Subscriptions: subs@phparch.com Sales & advertising: sales@phparch.com Technical support: support@phparch.com Copyright © 2003-2004 Marco Tabini & Associates, Inc. — All Rights Reserved J uly is, usually, a month whose highlights are just how good your tan got at the beach and how many days you managed to stretch those summer long weekends to—hardly front-page material. This year, however, two important events have taken place. First, as you undoubtedly know, PHP 5 is now out. The final release of the new version has been long- awaited—I remember talking about a release date over dinner with a few friends almost a year ago—and now that it’s out we should finally be able to see some real usage of it out there. The second event is the launch of the official Zend Certification program. PHP certification is a topic that has popped up several times over the past couple of years on blogs, websites and mailing lists, but most of us were waiting for a company like Zend to take the initiative and start a formal certification program that the industry at large could rely on. Having been part of the team that developed the certification exam itself, I think I can safely say that it is no pushover—although you should have no prob- lem passing it if you have a good working knowledge of PHP. We tried, however, to create a series of ques- tions that fairly test the candidate’s knowledge of PHP, with a very strong focus on the practical aspects of the language. If you’re going to take the test, expect lots of questions based on your ability to analyze and understand portions of code, rather than simple theo- retical questions, because that’s what we thought a professional developer is most likely to encounter as part of his day-to-day life. You will also find that none of the questions rely on your ability to understand English, rather than your knowledge of PHP—we felt that this was an important distinction to make, given how popular PHP is worldwide. At php|a, we believe firmly in the importance of the certification program, and have moved to place our full support behind it. It all starts with our Certification Central website ( wwwwww pphhppaarrcchh ccoomm//cceerrtt ), where we have collected a number of excellent resources with the goal of providing you with a one-stop shop for everything that you need to get certified, from online training, which starts in August, to the official guide, which we developed in collaboration with Zend, SAMS Publishing and some of the best PHP authors out there, practice exams and even a discount on the exam itself. It’s the training, in particular, that I want to discuss in a bit more detail here. IT training is, traditionally, quite expensive—it’s not unusual for a three or four- day course to cost upwards of $2,000, and that does- n’t include the fact that you have to leave your office, which causes lost work and transportation expenses. EDITORIAL Continued on page 9 . July 2004 ● PHP Architect ● www.phparch.com 6 NNEEWW SSTTUUFFFF What’s New! NN EE WW SS TT UU FF FF PHP 5 Final Released The PHP team is proud to announce the final release of PHP 5! Some of the key features of PHP 5 include: • The Zend Engine II with a new object model and dozens of new features. • XML support has been completely redone in PHP 5, all extensions are now focused around the excellent libxml2 library ( hhttttpp::////wwwwww xxmmllssoofftt oorrgg// ). • A new SimpleXML extension for easily accessing and manipulating XML as PHP objects. It can also interface with the DOM extension and vice-versa. • A brand new built-in SOAP extension for interoperability with Web Services. • A new MySQL extension named MySQLi for developers using MySQL 4.1 and later. This new exten- sion includes an object-oriented interface in addition to a traditional interface; as well as support for many of MySQL's new features, such as prepared statements. • SQLite has been bundled with PHP. For more information on SQLite, please visit their website. • Streams have been greatly improved, including the ability to access low-level socket operations on streams. • And lots more . For more information, visit hhttttpp::////wwwwww pphhpp nneett . version 5 PHPx 3.5.1 Released PHPx.org announces the release of PHPx 3.5.1. What is it? According to PHPx.org ”PHPX is a constantly evolving and changing Content Management System (CMS). PHPX is highly customizable and high powered all in one system. PHPX provides content management combined with the power of a portal by including in the core package modules such as FAQ, polls, and forums. PHPX uses dynamic-template-design, what this means is that you have the power to control what your site will look like. Themes are included, but not required. You can create the page however you want, and PHPX will just insert code where you want it. No more 3 columns if you don’t want it! Written in the powerful server language, PHP, and utilizing the amazingly fast and secure data- base MySQL, PHPX is a great solution for all size website communities, at the best price possible…free! “ Get more information from PPHHPPxx oorrgg . July 2004 ● PHP Architect ● www.phparch.com 7 NNEEWW SSTTUUFFFF Looking for a new PHP Extension? Check out some of the lastest offerings from PECL. Xdebug 1.3.2 The Xdebug extension helps you debugging your script by providing a lot of valuable debug information. The debug information that Xdebug can provide includes the following: • stack and function traces in error messages with: • full parameter display for user defined functions • function name, file name and line indications • support for member functions • memory allocation • protection for infinite recursions zeroconf 0.1.1 Provides an interface for browsing and publishing network services via ZeroConf using the Howl library. You can browse the network for specific services like database servers (PostgreSQL, Sybase, InterBase), Apple File Sharing, web services via Apache's mod_rendezvous, etc. and discover the IP address and port for each found service. imagick 0.9.11 imagick is a native php-extension that incorporates the functionality of the popular ImageMagick graphics- manipulation package. See the examples in the examples/ directory for some hints on how to use it. A compiled windows extension is available at hhttttpp::////kkrroommaannnn iinnffoo//ppeeaarr--ppeeccll pphhpp . You need the ImageMagick libraries from wwwwww iimmaaggeemmaaggiicckk oorrgg or GraphicsMagick libraries from hhttttpp::////wwwwww ggrraapphhiiccssmmaaggiicckk oorrgg// to get it running. ImageMagick 6 support is EXPERIMENTAL. Please report successes or failures. APC 2.0.4 APC is the Alternative PHP Cache. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. PhpMan 2.0 a Need help publishing your manuals or other text documents? PHPMan is here to help. According to the PHPMan home page PHPMan is a: ”PHP/MySQL based system to publish your manuals and documentations. This is a very easy-to-handle solution to publish manuals, documentations and other texts. The main feature is its use of nested sets to store the sections/chapters of the text in the database. Each chapter can be commented upon by users, similar to the php.net manual. Phpman is in i's very early stage of development, but the developers hope they can improve the code and the features when it's public. Phpman has also a nice search engine. One page can show all notes in a manual, another can display a printable version of the manual.“ Get More information from the PHPMan homepage ( wwwwww mmyyllaannssiittee oorrgg//iinnddeexx22 pphhpp??ssiittee==pphhppmmaann ). phpMyFAQ 1.4.0 RC 3 phpMyFAQ.de announces the release of the third release candidate of version 1.4.0. This version includes an improved IDN domain support. The password reset function now generates mnemon- ic passwords and there are many bug fixes. Do not use this version in production systems, but test this version and report bugs! Download from pphhppMMyyFFAAQQ ddee . July 2004 ● PHP Architect ● www.phparch.com 8 NNEEWW SSTTUUFFFF Check out some of the hottest new releases from PEAR. Net_NNTP 0.10.2 Package for communicating with NNTP/USENET servers. Includes features like post, view, list, authentication, overview, etc. HTML_Progress 1.2.0RC3 This package provides a way to add a loading bar fully customizable in existing XHTML documents. Your browser should be DHTML-compatible in order to use this component. Features: • Create horizontal and vertical bars, as well as circle, ellipse and polygons (square, rectangle) • Allows the usage of an existing external StyleSheet and/or JavaScript • All elements (progress, cells, string) are customizable by their html properties • Percent/string is floating all around the progress bar • Compliant with all CSS/XHMTL standards • Integration with all template engines is very easy • Implements an Observer design pattern. It is possible to add Listeners. • Adds a customizable UI monitor pattern to display a progress bar. The user can abort progress at any time. • Look and feel can be set by internal API or external config file. • Allows many progress bars to coexist on same page without the use of iframes. Auth 1.3.0r2 The PEAR::Auth package provides methods for creating an authentication system using PHP. Currently, it supports the following storage containers to read/write the login data: • All databases supported by the PEAR database layer • All databases supported by the MDB database layer • All databases supported by the MDB2 database layer • Plaintext files • LDAP servers • POP3 servers • IMAP servers • vpopmail accounts • RADIUS • SAMBA password files • SOAP Net_Server 0.11.3 Generic server class based on ext/sockets, used to develop any kind of server. File::Bittorrent 0.1.2 Alpha This package consists of two classes which handles the encoding and decoding of data in Bittorrent format. You can also extract useful informations from .torrent files. Text::Text_wiki 0.20.1 alpha This package abstracts the parsing and rendering of Wiki markup in structured plain text July 2004 ● PHP Architect ● www.phparch.com 9 In a recent survey on our website, almost 70% of the 3,000 people who answered expressed interest in some form of online training from php|a. We listened, and are planning a complete set of PHP courses that give you the best of a classroom and the Internet by providing you with a live instructor, with whom you can interact in real-time (either by speaking with him and the rest of the class or through text messaging), in a completely-online setting that doesn’t require you to leave your office. Thus, no matter where you are you can take advantage of a great learning experience as if you were in a real classroom, without the hassle of having to wait for a course to come to your town, and— most importantly—at a very convenient price. Our first training course is dedicated exclusively to the certification exam. It covers all the topics that are part of the exam itself in a total of over 18 hours of training spread over three weeks, and will be taught by Ilia Alshanetsky, who is a regular collaborator to php|a and a well-known PHP expert. It’s all available for a very con- venient price (particularly if you sign up before July 31st), and we’re even throwing in a special offer that includes a copy of the certification guide, an exam voucher and a full-copy of the Zend Studio IDE. As we prepare our fall lineup of training courses, it’s important that you let us know what you would like to learn about. Drop me a note at mmaarrccoott@@ttaabbiinnii ccaa with all your ideas, and I promise that we’ll do our best to design our training courses to fit your needs. Until next month, happy readings! Editorial: Contiuned from page 5 php|a EDITORIAL [...]... bugdb database for PHP as of December 11th, 2002 Many thanks to the July 2004 ● PHP Architect ● www.phparch.com PHP team for providing the data for these examples Please keep in mind that I was not involved with the data modeling or the PHP scripts that access the data from the bugdb tables In some cases, investigation of the PHP source for the http://bugs .php. net/ site provided me with a context for... examples that follow A Case Study: The PHP Bug Database PHP is the primary topic of this magazine Even though PHP is very flexible and powerful, it is not without problems Many people report these problems every day through the PHP bug web site (http://bugs .php. net/), and you see summary information regarding the bugs on the statistics page at http://bugs .php. net/bugstats .php This study is focused on what... ‘unchecked’); var sUrl = “http://example.com/processor .php? ” + ‘page=’ + window.location + ‘&product_id=’ + oProduct.name + ‘&action=’ + sAction; oHttp.open(‘GET’, sUrl, false); oHttp.send(null); } July 2004 ● PHP Architect ● www.phparch.com 23 Can’t stop thinking about PHP? Write for us! Visit us at http://www.phparch.com/writeforus .php Webmapping with MapServer F E A T U R E by Rodrigo Becke Cabral... course, that’s an easier task for *nix-ers than for Windows users); 2 Copy php_ mapscript_42.dll to your PHP extensions directory; REQUIREMENTS PHP: 4.3.4 OS: Any Other Software: MapScript/MapServer 4.2.0 http://www.maptools.org/local_dl/mapserver-4.2.0-win32 -php4 .3.4.zip July 2004 ● PHP Architect ● www.phparch.com 25 FEATURE Webmapping with MapServer 3 Copy all other support DLLs to your windows folder:... understand the requirements of installing and supporting PHP based applications Please visit http://www.favorhosting.com/phpa/ call 1-866-4FAVOR1 now for information July 2004 ● PHP Architect ● www.phparch.com 17 User Abandonment Tracking with PHP and DHTML F E A T U R E by Darrell Brogdon In this article, we will discuss the technique of using PHP and JavaScript to capture real-time information entered... Platypus < ?php } ?> July 2004 ● PHP Architect ● www.phparch.com 22 FEATURE User Abandonment Tracking with PHP and DHTML ed this was a good thing anyway? In this example, we’re just blindly sending the data to the server without ensuring... 23:55:23 -0600” 8781cd9b7669ee3325aa216ca9a99e3c,http://example.com/product .php, orange_ball,checked,”Mon, 21 Jun 2004 23:55:25 -0600” 8781cd9b7669ee3325aa216ca9a99e3c,http://example.com/product .php, red_ball,unchecked,”Mon, 21 Jun 2004 23:55:26 -0600” July 2004 ● PHP Architect ● www.phparch.com 21 FEATURE User Abandonment Tracking with PHP and DHTML Iframe is all well and good, but there is a simpler and... ‘bug_radar_graph .php? bug=’); $t = new Smarty; $t->autoload_filters = array(‘pre’=>array(‘showinfoheader’) , ‘output’=>array(‘trimwhitespace’)); $t->assign(array( ‘bug’ => $bug, ‘b1’ => $b1, ‘b2’ => $b2, ‘bugData’ => $bugData, ‘graphSrc’ => GRAPH_FILE, ‘selfLink’ => phpself() )); $t->display(TEMPLATE); ?> Figure 5 July 2004 ● PHP Architect ● www.phparch.com 16 FEATURE Charted Data Mining with PHP and JpGraph... helps rid the world of Spam and Viruses He has been writing PHP web applications for over seven years now and thus has to consciously refrain from beginning every thing he types with “< ?php To Discuss this article: http://forums.phparch.com/158 Dynamic Web Pages www.dynamicwebpages.de sex could not be better | dynamic web pages - german php. node news scripts tutorials downloads books installation...Charted Data Mining with PHP and JpGraph by Jason E Sweat F E A T U R E Data Mining transforms raw data into useful knowledge This article shows you how to use PHP, and the JpGraph library, to generate several kinds of graphs based on the PHP bug database as the raw data set D ata Mining is the art of transforming raw data into actionable knowledge PHP has some unique technical capabilities . Development with PHP , George Schlossnagle — PHP Design Patterns . and many, many more! php| w rks Toronto, Sept. 22-24, 2004 Three days of pure PHP http://www.phparch.com/phpworks. Charted Data Mining with PHP and JpGraph by Jason E. Sweat 19 User Abandonment Tracking with PHP and DHTML by Darrell Brogdon 25 Webmapping with MapServer by

Ngày đăng: 18/10/2013, 22:15

TỪ KHÓA LIÊN QUAN