Tag Archives: MySQL

Creating an Interesting Places application – take and share media in Windows Phone 7

I wrote a new article to Nokia Developer Wiki. This code example demonstrate how to take an image, record audio or video and save these captured media files to the Isolated Storage with the location information. These Interesting Places with media files can be later viewed and shared to the server side. This code example uses PHP server as a back end of this application. All captured media files are send 500 kB chucks with RestSharp and parsed together in the server side with PHP. This application is tested with 5 min recorded video (for example), then video file size was 55 MB and sent chucks count was more than 110. Sent was tested over normal cellular network and sending takes about 8 minutes. It worked really nice in Windows Phone 7 without Background Agents.

You can read the whole article and download source codes from here: Creating an Interesting Places application - take and share media in WP7.

Image Gallery with Flex, PHP and MySQL

There are many Image Galleries available on web, but time to time I want to make one of me own. This time I used Flex, PHP and MySQL. I found one excellent Flex Component from Doug McCune - CoverFlow Component and created my Image Gallery Menu with it.

Image Gallery Menu

Selected gallery is displayed with own state in Flex, thumbnails and image information are displayed in bottom of the screen.

Image Gallery Pictures

New galleries can be uploaded to server with Admin tool. Admin tool sends gallery information to PHP which adds gallery information to MySQL table. After gallery is initialized, all selected pictures will be send to server and thumbnails will be generated with PHP.

Image Gallery Admin

Here are sources and installation instructions:

1. MySQL tables
- create following tables
- if you change table names, edit PHP-files also

mysql> describe ptm_imagegallery;
+-------------+--------------+------+-----+---------+----------------+
| Field       | Type         | Null | Key | Default | Extra          |
+-------------+--------------+------+-----+---------+----------------+
| gallery_ID  | int(11)      | NO   | PRI | NULL    | auto_increment |
| name        | varchar(50)  | YES  |     | NULL    |                |
| description | varchar(100) | YES  |     | NULL    |                |
| date        | date         | YES  |     | NULL    |                |
| password    | varchar(45)  | NO   |     |         |                |
| count       | int(11)      | YES  |     | NULL    |                |
| size        | int(11)      | YES  |     | NULL    |                |
+-------------+--------------+------+-----+---------+----------------+

mysql> describe ptm_imagegalleryimages;
+------------+-------------+------+-----+---------+----------------+
| Field      | Type        | Null | Key | Default | Extra          |
+------------+-------------+------+-----+---------+----------------+
| image_ID   | int(11)     | NO   | PRI | NULL    | auto_increment |
| gallery_ID | int(11)     | YES  |     | NULL    |                |
| filename   | varchar(30) | YES  |     | NULL    |                |
| date       | date        | YES  |     | NULL    |                |
| width      | int(11)     | YES  |     | NULL    |                |
| height     | int(11)     | YES  |     | NULL    |                |
| views      | int(11)     | YES  |     | NULL    |                |
+------------+-------------+------+-----+---------+----------------+

2. PHP files
- copy PHP files to your server and edit needed MySQL variables

3. Flex project
- edit and compile Flex sources, use your own domain and path's

You can test my Image Gallery here:

PTM Image Gallery