
This interesting code snippet is from cedTag and let you retrieve WikiPedia description using OpenSearch API. It use the Client Url Library cURL. Released under GPL v3
/** * @param $searchTerm * @param string $wikipediaServer * @return array|string [text, description, url] */ public function getDefinitionFrom
($searchTerm, $wikipediaServer = 'http://en.wikipedia.org') { $url = $wikipediaServer.
'/w/api.php?action=opensearch&search=' .
urlencode($searchTerm) . '&format=xml&limit=1'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPGET, true); curl_setopt($ch, CURLOPT_POST, false); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_NOBODY, false); curl_setopt($ch, CURLOPT_VERBOSE, false); curl_setopt($ch, CURLOPT_REFERER, ""); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_MAXREDIRS, 4); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT,
"Mozilla/5.0"); $page = curl_exec($ch); $xml = simplexml_load_string($page); if ((string)$xml->Section->Item->Description) { return array((string)$xml->Section->Item->Text, (string)$xml->Section->Item->Description, (string)$xml->Section->Item->Url); } return ""; }
![]()
There's a new version of Xdebug released which fixes a major bug where inspecting static properties caused Xdebug to crash in XAMPP 1.8.0.
Unfortunately, you’ll need to update manually the version of Xdebug shipped with XAMPP to Xdebug 2.2.1 rather than 2.2.0:
Simply download the correct Xdebug binary (VC9 threadsafe PHP 5.4 VC9 TS (64 bit) (MD5: 81cacc87168c99c7f65ba202dc12c4b2)) and copy it in your XAMPP installation at xampp\php\ext\php_xdebug.dll
restart Apache and you can continue debugging!
The PDT project is working towards providing a PHP Development Environment framework. This project was formerly known as PHP IDE.
In order to be able to perform debugging using eclipse PDT, you must download one of the following extra packages: XDEBUG or ZEND debugger. I was not able to get the debugger running with XDEBUG even after reading many tutorials and trial error approach. Both packages are free, and it has work nicely for me with ZEND debugger after 5 minutes...
Unfortunately, XDEBUG/ZEND can not be packaged with PDT due to license restrictions, so both tools are not just running out of the box without few efforts.
PDT + Zend in one package thanks to Zend.com (118MB), highly recommended
OR PDT (105MB) and add Zend debugger through software update later
Open XAMPP Shell (start c:\xampp\xampp-control.exe and click on the button XAMPP-Shell), and run:
pear channel-discover pear.phpunit.de pear channel-discover components.ez.no pear channel-discover pear.symfony-project.com
pear install --alldeps phpunit/PHPUnit
pear install phpunit/DbUnit phpunit/PHPUnit_Selenium
pear install phpunit/PHPUnit_SkeletonGenerator
pear install phpunit/PHPUnit_Story phpunit/PHP_CodeCoverage
pear install PhpDocumentor
The major news I was waiting for:
![]() | ![]() |
Read the proposal here, If youre are in the area of Santa Clara, Zend is showing demo at EclipseCon. Do someone know what wwill happen wwith PHPeclipse.de ???
Privacy Statement | Copyright Notice | Licenses
© 1999-2012 Waltercedric.com. Designed by Cédric Walter. Sitemap
Reproduction without explicit permission is prohibited. All Rights Reserved. All photos remain copyright © their rightful owners. No copyright infringement is intended.
Disclaimer: The editor(s) reserve the right to edit any comments that are found to be abusive, offensive, contain profanity, serves as spam, is largely self-promotional, or displaying attempts to harbour irrelevant text links for any purpose.