Support

submit a bug report if you need technical support or have questions.

Documentation

Visit the Wiki extensive and up to date documentation at your fingertips.

Contact Me

Missing images/links, any comments, suggestions, need help? Contact me

Joomla extensions have moved!

Galaxiis (formely www.waltercedric.com) creates industry leading premium Joomla Extensions and is the longest running Joomla extensions provider since 2005.

Powerful Joomla extensions. - Excellent documentation. - Amazing support.

Visit now www.galaxiis.com

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 ""; }
comments powered by Disqus

You might like also

XAMPP 1.8.0 Xdebug stop working and make segmentation fault
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! …
1889 Days ago
Install PHPUnit and PHPDocumentor in XAMPP
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.compear install --alldeps phpunit/PHPUnitpear install phpunit/DbUnit phpunit/PHPUnit_Seleniumpear install phpunit/PHPUnit_SkeletonGenerator pear install phpunit/PHPUnit_Story phpunit/PHP_CodeCoveragepear install PhpDocumentor …
1893 Days ago
Eclipse PDT 2.0 is available
The PDT project is working towards providing a PHP Development Environment framework. This project was formerly known as PHP IDE. see PDT 2.0 New & Noteworthy see the eclipse PDT WIKI Make Eclipse PDT work for Joomla development Install a PHP debugger In order to be able to perform debugging using eclipse PDT, you must download one of the following extra packages:&160; XDEBUG or ZEND debugger. I was not able to get the debugger running with XDEBUG even after reading …
3217 Days ago
Eclipse Foundation, Zend Technologies, and IBM Announce the Approval of the PHP IDE Project
The major news I was waiting for:Eclipse Foundation, Zend Technologies, and IBM Announce the Approval of the PHP IDE Project The Eclipse Foundation, an open source community committed to the implementation of a universal software development platform, Zend Technologies and IBM, today announced that the Eclipse PHP IDE project has been approved by the Eclipse Foundation. The technology project was proposed by Zend and IBM on October 21, 2005. It will deliver a PHP Integrated Development Environment framework for the …
4233 Days ago
Recommended PHP reading list
An impressive sum of links and good articles on PHP, worth reading!This list of recommended reading material on PHP is compiled from a variety of online sources by Web application developers in IBM's Global Production Services organization. These resources have been selected with the intention of introducing IT specialists and architects to PHP, providing specific information about development and maintenance, and helping to integrate the technology with IBM products.PHP is an interpreted programming language run in an environment provided by …
4238 Days ago