Posts Tagged "Code"

  • phpPaypalPro version 0.2.0 has been released under the revised BSD license. Their catch phrase is “So Easy Even A Caveman Can Use It”. phpPaypalPro is an object-oriented framework developed in PHP5 to integrate easily with the Website Payments Pro SOAP 1.1 API from Paypal. The framework is very easy to deploy, allowing you to execute [...]

    Read More...
  • Looking for a good weather script to put up on your site? Here’s a very good one from Collin Grady, which pulls weather data from the weather.com servers and caches it locally in a MySQL database. The image below is from an actual implementation of Collin’s PHP Weather which I setup to test it out. [...]

    Read More...
  • My-Bic is an Ajax framework for PHP. It allows you to easily integrate Ajax features into your PHP applications. Let’s see how to create a feedback form with My-Bic. Installation and Setup: Download the latest version of My-Bic (v0.6.3) from http://www.litfuel.net/mybic/index.html?page=download and copy the files over a folder under the webroot of your server. You’ll [...]

    Read More...
  • Cleaning up your inputs from $_POST, $GET and $_REQUEST is an important task if you’re looking at security of your PHP applications. You can prevent most kinds on Cross Site Scripting (XSS) attacks if you know how to clean up the user inputs. Here’s how to do it using an Input filtering class from PHP [...]

    Read More...
  • Here’s a piece of code which will force download a pdf instead of showing it inline in the browser. < ?php header('Pragma: public'); header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: pre-check=0, post-check=0, max-age=0'); header('Content-Transfer-Encoding: none'); header('Content-Type: application/pdf; name="$path->pdfname”‘); header(‘Content-Disposition: inline; filename=”$path->pdfname”‘); readfile($path->pdfpath); ?> This code can be modifed [...]

    Read More...