Find your click

PicTour (pun on picture) provides a service that allows users to enter a location, and discover random cities/towns within their desired radius. The user is then presented with a series of pictures based on their input, and after choosing pictures that they thought worked for them are presented with their suggested destination.

Many websites offer comparisons for holidays and locations, but very few offer random locations. We wanted to attempt the daunting task of going through large amounts of (almost useless) data and trying to produce something that could be markatable, but also whilst having fun and enjoying our time here.

Our target user was the average College student or young Adult. Users between the ages of 18-25 will most likely want to travel a lot, but have no idea where to start. Our web application provides recommendations using their choices.

We built our own libraries to handle API calls and database calls:

Bing image search to grab images related to the random town/city

static function getBingImages($city, $state, $country) { $key = ''; $url = 'https://api.datamarket.azure.com/Bing/Search/' . 'Image?$format=json&$top=5&Query=';

    $auth = sprintf('Authorization: Basic %s', 
      base64_encode($key . ":" . $key) );

    $context = stream_context_create(array(
        'http' => array(
            'header'  => $auth

    $request = $url . urlencode( '\'' . $city . ' ' . $state . ' ' .  $country . '\'');

    $response = file_get_contents($request, 0, $context);

    $response_obj = json_decode($response);

    $photos = array();

    foreach ($response_obj->d->results as $key => $photo) {
        $media = $photo->MediaUrl;

        $photos[$key] = $media;

    return $photos;

Some functions used to gather information about the towns/cities

static function randomiseCities($cities, $address) { $cityTotal = count($cities); $currentCity = $address['city']; $currentState = $address['state'];

    // Check if first result is the users location.. it usually is
    if($cities[0]->City === $currentCity && $cities[0]->State === $currentState) {



    $newCities = array();

    for ($i=0; $i <=4 ; $i++) { 
        array_push($newCities, $cities[$i]);

    return $newCities;

static function getCityImages($cities)
    $cityImages = array();

    foreach ($cities as $location => $address) {
        $images = GeoImage::getBingImages($address->City, $address->State, $address->Country);

        array_push($cityImages, array($address->City => $images));

    return $cityImages;

Built with

Try it out