topical media & game development
professional-search-04-seophp-include-url-factory.inc.php / php
<?php
// include config file
require_once 'config.inc.php';
// prepares a string to be included in an URL
function _prepare_url_text(NOT_acceptable_characters_regex = '#[^-a-zA-Z0-9_ ]#';
NOT_acceptable_characters_regex, '', string = trim(string = preg_replace('#[-_ ]+#', '-', string;
}
// builds a link that contains a category and a product
function make_category_product_url(category_id,
product_id)
{
// prepare the product name and category name for inclusion in URL
category_name);
product_name);
// build the keyword-rich URL
clean_category_name . '-C' . clean_product_name . '-P' . url;
}
// builds a link to a media file
function make_media_url(name, clean_name = _prepare_url_text (url = SITE_DOMAIN . '/' . id . '.' . url;
}
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.