Hits: 287 The PEAR package contains: * PEAR installer, for creating, distributing and installing packages * PEAR_Exception PHP5 error handling mechanism * PEAR_ErrorStack advanced error handling mechanism * PEAR_Error error handling mechanism * OS_Guess class for retrieving info about the OS where PHP is running on * System class for quick handling of common operations [...]
Hits: 367 Craigslist Scraper Tool parses and stores the Craigslist Post Location, PostID, Title, Email, Content etc. This tool can export scrapped data into CSV, XML, SQL, RSS, TXT, PDF, JSON, HTML Craigslist.org is a great source of quality, targeted offline clients. It’s organized by geography (by state, by region, by city) and by niche. Certain [...]
Hits: 274 We can use function json_print() to explore JSON data, since JSON has no spacing or indentation. The function json_print() make JSON data to display in the human-readable format. <?php function json_print($json) { $result = ”; $pos = 0; $strLen = strlen($json); $indentStr = ‘ ‘; $newLine = “\n”; $prevChar = ”; $outOfQuotes = true; [...]
Hits: 185 Amazon’s ECS is very good service for accessing Amazon’s product database. We can register to this web service quickly, It provides a free access key to access Amazon Store. Amazon have rich set of web services Web Services are used to access DATA over cross platform environments. Using ECS-driven websites and applications, we can earn [...]
Hits: 173 PHP have PECL (PHP Extension & Community Library) function to override built-in functions by replacing them in the symbol table. bool override_function ( string $function_name , string $function_args , string $function_code ) <?php override_function(‘strlen’, ‘$string’, ‘return override_strlen($string);’); function override_strlen($string){ return strlen($string); } ?> The above function “override_function()” require APD i.e. Advanced PHP Debugger. We [...]
Hits: 304 Hello Friends, I read some where “Quality is not a product.. it is a process ” I think process is hard-work we do and product is final result we get. But how we make our process to get a good product, as a LAMP developer I think track processes “Debug Log” is good sort [...]
Hits: 124 PEAR have rich library to access web based resources easily… <?php $sv = new SVTube(); $sv->download(“D7cm-yu-CP0″, “svnlabs.flv”) ?> Class: SVTube.php —————————— <?php require_once ‘HTTP/Client.php’; require_once ‘HTTP/Request.php’; class SVTube { var $req; var $debug = false; var $auth = false; function download ($video_id, $video_filename) { $url = “http://www.youtube.com/watch?v=”.$video_id; $this->req =& new HTTP_Request($url); $response = $this->req->sendRequest(); [...]
Hits: 227 We can use PEAR to process zip files in PHP using Archive_Zip…. First set PEAR path in php include path using set_include_path Make Zipped file <?php include (‘Archive/Zip.php’); // include PEAR ZIP package $obj = new Archive_Zip(‘test.zip’); // zipped file name $files = array(‘svnlabs/1.gif’, ‘svnlabs/resume.doc’, ‘svnlabs/invoice.xls’); // files add to zip if ($obj->create($files)) { [...]
Hits: 390 PHP supports upload file stream… we can stream data to server using PHP stream_open() & stream_write() functions. There is alternate method in PEAR to transfer files to server1 to server2. PEAR have HTTP package for uploading files. HTTP_Request supports GET/POST/HEAD/TRACE/PUT/DELETE, Basic authentication, Proxy, Proxy Authentication, SSL, file uploads etc. <?php require_once ”HTTP/Request.php”; $req =& new HTTP_Request(“http://domain.com/upload”); $req->setBasicAuth(“login”, ”pass”); $req->setMethod(HTTP_REQUEST_METHOD_POST); [...]







