Figure 4: Constructing the REST URL, part 2


<?php
function model_search($type, $title, $limit_num, &$items)
{ global $MODEL, $categories;
  if (!model_connect ())
  { False;
  }
  $link_id = $MODEL ['conn'];
  $items = array ( );
  switch($browsetype)
  { case 'title':
      $link_id .= "?type=title&title=$title";
      break;
    default:
      break;
  }