Display Images from mySQL Binary Data
Nov 10th
First of all we must connect to our database
<?php
$username = "";
$password = "";
$host = "localhost";
$database = "";
Storing Images/Binary Files to mySQL in PHP
Nov 10th
It is possible for us to store/save our images (binary files) into a mySQL database in PHP. In this article, we will discuss about “how to store images, audio, or another binary files into mySQL database with PHP script”. But, before we continue to the further step, you might want to consider some reason of why we should and why we shouldn’t store binary files in a database:
Reasons to store your images (binary files) in a database:
- Storing in a database allows better security for your files and images.
- Eliminates messy directory and file structures (this is especially true when users are allow to contribute files).
- Files/Images can be stored directly linking to user or advertiser information. Read the rest of this entry »
Create RSS Feed in PHP
Nov 8th
This is the easiest way to build a RSS feed in PHP. Because we don’t have to modify the feed file (feed.xml, or another xml file) anymore every we adding more content into the site.. And here’s the key concept:
Every the PHP file executed, the PHP file will output XML-based data to the browser by modifiying the PHP’s header.
In order to output a XML-based data by PHP, you will need to put this line into the PHP script:
header(’Content-Type: text/xml; charset=UTF-8′, true);
the line above will send an xml file to your browser with XML format. Read the rest of this entry »