Skip to content

ChrisRisner/UrlShortener-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener - PHP Website

The URL Shortener is a PHP website made to demonstrate how to create a simple web service layer using Windows Azure Websites, MySQL, and PHP. This sample consists of a simple web front end which can display all of the URLs that have been shortened. There are several web end points which can be consumed by other clients in order to view and add new shortened URLs.

This sample is designed to be deployed to Windows Azure Web Sites and uses a MySQL Database for persistence. You can run this site in either shared or reserved mode on Windows Azure Web Sites with any number of instances.

Below you will find requirements and deployment instructions.

Requirements

Additional Resources

Click the links below for more information on the technologies used in this sample.

#Installing Silex Silex is a Micro-PHP framework that is used for this site. You can download it from here. After downloading Silex, you should place the phar in the following directory under your site's root: vendor/Silex/

#Installing Twig Twig is a templating engine used to quickly get templated web pages up and running. You can download it from here. After downloading you should see place all of the Twig files in the following directory under your site's root: vendor/Twig/

#Specifying your connection string Once you've set up your Windows Azure Website and found your MySQL database connection string, open src/Khepin/UrlShortener.php and edit these lines with your database details:

	//Local
	private $db_server = 'localhost';
	private $db_user   = 'phptestuser';
	private $db_password = 'phptestuser';
	private $db_name     = 'shorty';

#Acknowledgements The source code for this site is based off of walkthrough for Silex. You can read more about the original site here.

Contact

For additional questions or feedback, please contact the team.

About

This repo houses a URL Shortening service written in PHP for Windows Azure Websites.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published