<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Istanto Blog - Online Business, Short Reviews, Computers and Internet, Tips and Trick, Make Money Online. &#187; URL</title>
	<atom:link href="http://www.istanto.net/tag/url/feed" rel="self" type="application/rss+xml" />
	<link>http://www.istanto.net</link>
	<description>Online Business, Short Reviews, Computers and Internet, Tips and Trick, Make Money Online.</description>
	<lastBuildDate>Sun, 08 Jan 2012 02:56:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to: Created XML Sitemap Using PHP</title>
		<link>http://www.istanto.net/how-to-created-xml-sitemap-using-php.html</link>
		<comments>http://www.istanto.net/how-to-created-xml-sitemap-using-php.html#comments</comments>
		<pubDate>Fri, 06 May 2011 15:25:03 +0000</pubDate>
		<dc:creator>Istanto</dc:creator>
				<category><![CDATA[Computer And Internet]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Tips & Trick]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sitemap]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.istanto.net/?p=1670</guid>
		<description><![CDATA[This articles inspired to share from my experience when I need to created custom sitemap in XML format for some of my website. Basically we will using PHP to generated URL following the sitemap in XML format. Why should in XML format? because mostly a great search engine using sitemap with XML format as their [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This articles inspired to share from my experience when I need to created custom sitemap in XML format for some of my website. Basically we will using PHP to generated URL following the sitemap in XML format. Why should in XML format? because mostly a great search engine using sitemap with XML format as their standard.</p>
<p style="text-align: justify;">So we will using PHP script to generated URL (others will follows standard XML format). Example we have site using PHP and MYSQL we will need to query data from MYSQL and then echo it as URL. The problem is because not all website using same structure I can not give you working scripts to generate sitemap as the result may not working for your site.</p>
<p style="text-align: justify;">The good news, because mostly all website using same method (ex, PHP+mysql blabla) we can use same method to generated sitemap. First we need to make sure the first tag should be like this&#8230;</p>
<p style="text-align: justify;"><a href="http://www.istanto.net/wp-content/uploads/2011/05/ist-tag.jpg"><img class="aligncenter size-medium wp-image-1671" title="ist-tag" src="http://www.istanto.net/wp-content/uploads/2011/05/ist-tag-300x27.jpg" alt="" width="300" height="27" /></a></p>
<p style="text-align: justify;">On the second line here comes your job to generated your site URL to listed. The last thing just the closing tag. If you meet problems just read the protocols for sitemap XML standard from <a href="http://sitemaps.org/protocol.php" target="_blank">here</a>. Learn about each tag function and implement it as needed.</p>
<p style="text-align: justify;">Next step, after we have PHP script that works to generated sitemap we need to make it looks like static sitemap. This trick can be done from your .htacess file by rewrite sitemap.php to become sitemap.xml, Just put this line on your .htacess file (if you don&#8217;t have it created one).</p>
<p style="text-align: justify;"><em>RewriteEngine on</em><br />
<em>RewriteRule ^sitemap.xml$ sitemap.php [L]</em></p>
<p style="text-align: justify;">Done, it will rewrite sitemap.php to become sitemap.xml and looks like static sitemap. Next step, This sitemap will shown as XML in internet explorer but not in mozilla firefox so we need to declare it as XML. Just put this code on the first line..</p>
<p style="text-align: justify;"><em>header(&#8220;Content-Type: text/xml; charset=utf-8&#8243;)</em></p>
<p style="text-align: justify;">Next, If you have more than 5,000 URL you can generated it and saved each sitemap and giving parent sitemap.</p>
<p style="text-align: justify;">The result will shown like this sample:</p>
<p style="text-align: justify;"><a href="http://www.istanto.net/wp-content/uploads/2011/05/ist-php-sitemap-gen-result.jpg"><img class="aligncenter size-medium wp-image-1673" title="ist-php-sitemap-gen-result" src="http://www.istanto.net/wp-content/uploads/2011/05/ist-php-sitemap-gen-result-300x216.jpg" alt="" width="300" height="216" /></a></p>
<p style="text-align: justify;">In this sample I&#8217;m using PHP function to read folder and files because basically my site using folder and files to generated links. In another sample I&#8217;m using mysql query to generated my sitemap.</p>
<p style="text-align: justify;">If yours company need someone to making scripts like this I can do it for $100 &#8211; $10,000 deppend on how hard to coding it. That&#8217;s my share for today, sorry for not blogging over a month. I promised will write more in the future.</p>
<p style="text-align: justify;">Have a nice day <img src='http://www.istanto.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.istanto.net/how-to-created-xml-sitemap-using-php.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP: How To Blocking Bad Referrer Site</title>
		<link>http://www.istanto.net/php-how-to-blocking-bad-referrer-site.html</link>
		<comments>http://www.istanto.net/php-how-to-blocking-bad-referrer-site.html#comments</comments>
		<pubDate>Sat, 29 Jan 2011 12:59:02 +0000</pubDate>
		<dc:creator>Istanto</dc:creator>
				<category><![CDATA[Computer And Internet]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Tips & Trick]]></category>
		<category><![CDATA[ALLOWED]]></category>
		<category><![CDATA[block adf.ly referrer]]></category>
		<category><![CDATA[block bad referrer]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php script to block bad referrer]]></category>
		<category><![CDATA[SUCCESS]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://www.istanto.net/?p=1646</guid>
		<description><![CDATA[In this short tutorial we will learn how to blocking bad referrer site using php script. This idea coming into my head after I&#8217;m sick looking at bad referrer site which take opportunity to earn money using my articles. Example: the baddest shortest URL adf.ly, this site shorten URL but it&#8217;s reported contain spyware and [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">In this short tutorial we will learn how to blocking bad referrer site using php script. This idea coming into <span style="text-decoration: underline;"><em>my head</em></span> after I&#8217;m sick looking at bad referrer site which take opportunity to earn money using my articles. Example: the baddest shortest URL adf.ly, this site shorten URL but it&#8217;s reported contain spyware and malware on ads from that page.</p>
<p style="text-align: justify;">This will lead our site in problem because people may think we&#8217;re spreading spyware/malware. Even if we claim we don&#8217;t created that link I believe 99% people wouldn&#8217;t trust us. The best thing to stop this <span style="text-decoration: line-through;"><em>madness</em></span> is blocking that referrer site to stop referring people into our page.</p>
<p style="text-align: justify;">This php script will using php referrer function to detected referrer site. In this short code sample we may will be needed more manual working. I believe someone can created better one or maybe a nice plugins? you&#8217;re <strong>ALLOWED</strong> to use this script code.</p>
<p style="text-align: justify;">Before I&#8217;m going to write the code I just want to tell everyone I already try to blocking bad referrer via .htacces file but it&#8217;s not working, I believe there something missing on there&#8230; So here is the sample code:</p>
<blockquote><p>&lt;?php<br />
if ($_SERVER['HTTP_REFERER']){<br />
if ($_SERVER['HTTP_REFERER'] == &#8216;BAD-SITE-URL-HERE&#8217;) {<br />
echo &#8220;REFERRER FROM BAD-SITE-URL HAS BEEN BLOCKED&#8221;;<br />
exit;<br />
}<br />
}<br />
?&gt;</p></blockquote>
<p style="text-align: justify;">The problem is when we&#8217;re trying to block another bad site we have to edit this code manually. I hope someone would try to make plugins using this code. At least this code works when I try to blocking some referrer from adf.ly it&#8217;s <strong>SUCCESS</strong>!</p>
<p style="text-align: justify;"><a href="http://www.istanto.net/wp-content/uploads/2011/01/ist-bloked-bad-referrer.jpg"><img class="aligncenter size-medium wp-image-1649" title="ist-bloked-bad-referrer" src="http://www.istanto.net/wp-content/uploads/2011/01/ist-bloked-bad-referrer-300x216.jpg" alt="" width="300" height="216" /></a></p>
<p style="text-align: justify;">For wordpress user where to put this code? Open your admin panel and edit your header.php file, put this code in the top of your header code. This sample script will checking, if referrer coming from badsite it will stop loading pages and giving warning message. When it coming directly of safe site like google, yahoo, bing, etc it will work as usual.</p>
<p style="text-align: justify;">That&#8217;s my share for today, happy weekend everyone, enjoy your day <img src='http://www.istanto.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.istanto.net/php-how-to-blocking-bad-referrer-site.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP:Play with Current Page URL</title>
		<link>http://www.istanto.net/phpplay-with-current-page-url.html</link>
		<comments>http://www.istanto.net/phpplay-with-current-page-url.html#comments</comments>
		<pubDate>Sun, 09 Nov 2008 05:49:00 +0000</pubDate>
		<dc:creator>Istanto</dc:creator>
				<category><![CDATA[Computer And Internet]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Tips & Trick]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[raised CTR]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[URL function]]></category>

		<guid isPermaLink="false">http://www.istanto.net/phpplay-with-current-page-url.html</guid>
		<description><![CDATA[Here come to my attention to share this tips &#38; trick, Story started when there advertiser want to advertise their ad on specific URL on my site, I got confused on how to make it working.  Basically every PHP code I have are global and I need to make ads showing on specific URL only. [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Here come to my attention to share this <em>tips &amp; trick</em>, Story started when there advertiser want to advertise their ad on specific URL on my site, I got confused on how to make it working.  Basically every PHP code I have are global and I need to make ads showing on specific URL only. Thanks to google as my best online teacher I do <em>googling</em> and found some code but there is nothing really works 100%. Finally I do some modification and found out how to do it.</p>
<p align="justify">First, we have make PHP function here is the code:</p>
<p align="justify">&lt;?php<br />
function curPageURL() {<br />
$pageURL = &#8216;http&#8217;;<br />
if ($_SERVER["HTTPS"] == &#8220;on&#8221;) {$pageURL .= &#8220;s&#8221;;}<br />
$pageURL .= &#8220;://&#8221;;<br />
if ($_SERVER["SERVER_PORT"] != &#8220;80&#8243;) {<br />
$pageURL .= $_SERVER["SERVER_NAME"].&#8221;:&#8221;.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];<br />
} else {<br />
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];<br />
}<br />
return $pageURL;<br />
}<br />
?&gt;</p>
<p align="justify">In case if this code not working try to download the original <a href="http://www.istanto.net/wp-content/uploads/2008/11/currpage.txt" title="currpage.txt">currpage.txt</a></p>
<p align="justify">Then in your global code you need to specify the URL you want something to shown, Example:</p>
<p align="justify">&lt;?php<br />
$d=&#8221;http://www.mysite.com/specify/more/deep.html&#8221;;<br />
if ($d==curPageURL())<br />
echo &#8220;this is the code you want to shown&#8221;<br />
?&gt;</p>
<p align="justify">More specific you can coding more using <strong>else</strong> function.</p>
<p align="justify">What the benefit to play using this code? In case like adsense I do a little tricky to playing with visitor visions, sometimes I do shown my own ad and sometimes adsense ad, Result is google love it!, people not feel annoyed, my adsense CTR raised UP, <strong>YAY!</strong> <img src='http://www.istanto.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.istanto.net/phpplay-with-current-page-url.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SEO: URL Rewrite for 4images</title>
		<link>http://www.istanto.net/seo-url-rewrite-for-4images.html</link>
		<comments>http://www.istanto.net/seo-url-rewrite-for-4images.html#comments</comments>
		<pubDate>Sun, 20 Apr 2008 10:49:03 +0000</pubDate>
		<dc:creator>Istanto</dc:creator>
				<category><![CDATA[Computer And Internet]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Tips & Trick]]></category>
		<category><![CDATA[4images]]></category>
		<category><![CDATA[4images SEO]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Rewrite]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[URL Rewrite]]></category>

		<guid isPermaLink="false">http://www.istanto.net/seo-url-rewrite-for-4images.html</guid>
		<description><![CDATA[Well, I just have done optimize SEO for one of my website using 4images gallery system it&#8217;s on http://www.innovativedesktop.com basically I play with meta title, keywords, and description. And now I&#8217;m using URL rewrite. URL look cool and more search engine friendly I believe after a week or month it will indexed in lot of [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Well, I just have done optimize SEO for one of my website using 4images gallery system it&#8217;s on <a href="http://www.innovativedesktop.com" target="_blank">http://www.innovativedesktop.com</a> basically I play with meta title, keywords, and description. And now I&#8217;m using URL rewrite. URL look cool and more search engine friendly I believe after a week or month it will indexed in lot of search engine <img src='http://www.istanto.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p align="justify">Here is the way for you&#8217;re to using URL rewrite on 4images to make it more search engine friendly <strong>REMEMBER</strong> this will eat CPU resources. (<strong>before you doing this I recommended to backup your files first</strong>). Any alternative you can learn about <em>URL rewrite</em> yourself to make it works as you want (google is the best teacher).</p>
<p><strong>1. You need to make .htaccess file and put this code on it</strong></p>
<p>RewriteEngine On<br />
RewriteRule ^lightbox\.html$ lightbox.php?%{QUERY_STRING}<br />
RewriteRule ^lightbox\.([0-9]+)\.html$ lightbox.php?page=$1&amp;%{QUERY_STRING}<br />
RewriteRule ^search\.html$ search.php?%{QUERY_STRING}<br />
RewriteRule ^search\.([0-9]+)\.html$ search.php?page=$1&amp;%{QUERY_STRING}<br />
RewriteRule ^postcard([a-zA-Z0-9]+)\.html$ postcards.php?postcard_id=$1&amp;%{QUERY_STRING}<br />
RewriteRule ^postcard\.img([0-9]+)\.html$ postcards.php?image_id=$1&amp;%{QUERY_STRING}<br />
RewriteRule ^k_(.*)_([0-9]+).html categories.php?cat_id=$2&amp;%{QUERY_STRING}<br />
RewriteRule ^r_(.*)_([0-9]+).html details.php?image_id=$2&amp;%{QUERY_STRING}<br />
RewriteRule ^r([0-9]+).search.html details.php?image_id=$1&amp;%{QUERY_STRING}</p>
<p><strong>2. Open /include/sessions.php before the last line add this code</strong></p>
<p>//Mod_bmollet<br />
/**<br />
* Get the category url<br />
* @param int $cat_id The id of the category<br />
* @param string $cat_url The current status of the URL<br />
*/<br />
function get_category_url($cat_id,$cat_url = &#8221;)<br />
{<br />
global $site_db;<br />
$sql = &#8220;SELECT cat_name,cat_parent_id FROM &#8220;.CATEGORIES_TABLE.&#8221; WHERE cat_id = &#8216;&#8221;.$cat_id.&#8221;&#8216;&#8221;;<br />
$result = $site_db-&gt;query($sql);<br />
$row = $site_db-&gt;fetch_array($result);<br />
$row['cat_name'] = strtr($row['cat_name'], &#8220;éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ&#8221;,&#8221;eeeaeauoiaabcdefghijklmnopqrstuvwxyz&#8221;);<br />
$cat_url  = &#8216;_&#8217;.str_replace(&#8216;+&#8217;,'_&#8217;,urlencode($row['cat_name'])).&#8217;_&#8217;.$cat_id.$cat_url;<br />
// if you want full path of category in url, put next line in comment<br />
return $cat_url;<br />
if( $row['cat_parent_id'] != 0)<br />
{<br />
return get_category_url($row['cat_parent_id'],$cat_url);<br />
}<br />
else<br />
{<br />
return $cat_url;<br />
}<br />
}<br />
//Mod_bmollet<br />
/**<br />
* Get the image url<br />
* @param int $image_id The id of the image<br />
*/<br />
function get_image_url($image_id)<br />
{<br />
global $site_db;<br />
$sql = &#8220;SELECT cat_id,image_name FROM &#8220;.IMAGES_TABLE.&#8221; WHERE image_id = &#8216;&#8221;.$image_id.&#8221;&#8216;&#8221;;<br />
$result = $site_db-&gt;query($sql);<br />
$row = $site_db-&gt;fetch_array($result);<br />
$row['image_name'] = strtr($row['image_name'], &#8220;éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ&#8221;,&#8221;eeeaeauoiaabcdefghijklmnopqrstuvwxyz&#8221;);<br />
// if you want comlpete path to image in url, remove comment from following line<br />
//return get_category_url($row['cat_id']).&#8217;-&#8217;.str_replace(&#8216;+&#8217;,'-&#8217;,urlencode($row['image_name'])).&#8217;-&#8217;.$image_id;<br />
return &#8216;_&#8217;.str_replace(&#8216;+&#8217;,'_&#8217;,urlencode($row['image_name'])).&#8217;_&#8217;.$image_id;<br />
}<br />
<span id="more-100"></span><br />
<strong>3. Find this code on /include/sessions.php</strong></p>
<p>function url($url, $amp = &#8220;&amp;&#8221;) {<br />
global $l;<br />
$dummy_array = explode(&#8220;#&#8221;, $url);<br />
$url = $dummy_array[0];</p>
<p>if ($this-&gt;mode == &#8220;get&#8221; &amp;&amp; !preg_match(&#8220;/&#8221;.SESSION_NAME.&#8221;=/i&#8221;, $url)) {<br />
$url .= preg_match(&#8220;/\?/&#8221;, $url) ? &#8220;$amp&#8221; : &#8220;?&#8221;;<br />
$url .= SESSION_NAME.&#8221;=&#8221;.$this-&gt;session_id;<br />
}</p>
<p>if (!empty($l)) {<br />
$url .= preg_match(&#8220;/\?/&#8221;, $url) ? &#8220;$amp&#8221; : &#8220;?&#8221;;<br />
$url .= &#8220;l=&#8221;.$l;<br />
}</p>
<p>$url .= (isset($dummy_array[1])) ? &#8220;#&#8221;.$dummy_array[1] : &#8220;&#8221;;<br />
return $url;<br />
}</p>
<p><strong>Replace it with this code </strong></p>
<p>/* ORIGINAL CODE<br />
function url($url, $amp = &#8220;&amp;&#8221;) {<br />
global $l;<br />
$dummy_array = explode(&#8220;#&#8221;, $url);<br />
$url = $dummy_array[0];</p>
<p>if ($this-&gt;mode == &#8220;get&#8221; &amp;&amp; !preg_match(&#8220;/&#8221;.SESSION_NAME.&#8221;=/i&#8221;, $url)) {<br />
$url .= preg_match(&#8220;/\?/&#8221;, $url) ? &#8220;$amp&#8221; : &#8220;?&#8221;;<br />
$url .= SESSION_NAME.&#8221;=&#8221;.$this-&gt;session_id;<br />
}</p>
<p>if (!empty($l)) {<br />
$url .= preg_match(&#8220;/\?/&#8221;, $url) ? &#8220;$amp&#8221; : &#8220;?&#8221;;<br />
$url .= &#8220;l=&#8221;.$l;<br />
}</p>
<p>$url .= (isset($dummy_array[1])) ? &#8220;#&#8221;.$dummy_array[1] : &#8220;&#8221;;<br />
return $url;<br />
}<br />
*/<br />
function url($url, $amp = &#8220;&amp;&#8221;) {<br />
global $l, $user_info;<br />
$dummy_array = explode(&#8220;#&#8221;, $url);<br />
$url = $dummy_array[0];<br />
$url = str_replace(&#8216;&amp;&#8217;, &#8216;&amp;&#8217;, $url);<br />
if (!defined(&#8216;IN_CP&#8217;)) {<br />
if (strstr($url, &#8216;index.php&#8217;)) {<br />
$url = str_replace(&#8216;index.php&#8217;, &#8221;, $url);<br />
}<br />
elseif (strstr($url, &#8216;search.php&#8217;)) {<br />
if (strstr($url, &#8216;page=&#8217;)) {<br />
preg_match(&#8216;#page=([0-9]+)&amp;?#&#8217;, $url, $matches);<br />
if (isset($matches[1])) {<br />
$split = explode(&#8216;?&#8217;, $url);<br />
$url = $split[0];<br />
$query = @$split[1];<br />
$url   = str_replace(&#8216;search.php&#8217;, &#8216;search.&#8217;.$matches[1].&#8217;.html&#8217;, $url);<br />
$query = str_replace(&#8216;page=&#8217;.$matches[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;page=&#8217;.$matches[1], &#8221;, $query);<br />
$query = str_replace(&#8216;page=&#8217;.$matches[1], &#8221;, $query);<br />
if (!empty($query)) {<br />
$url .= &#8216;?&#8217; . $query;<br />
}<br />
}<br />
}<br />
else {<br />
$url = str_replace(&#8216;search.php&#8217;, &#8216;search.html&#8217;, $url);<br />
}<br />
}<br />
elseif (strstr($url, &#8216;lightbox.php&#8217;)) {<br />
if (strstr($url, &#8216;page=&#8217;)) {<br />
preg_match(&#8216;#page=([0-9]+)&amp;?#&#8217;, $url, $matches);<br />
if (isset($matches[1])) {<br />
$split = explode(&#8216;?&#8217;, $url);<br />
$url = $split[0];<br />
$query = @$split[1];<br />
$url   = str_replace(&#8216;lightbox.php&#8217;, &#8216;lightbox.&#8217;.$matches[1].&#8217;.html&#8217;, $url);<br />
$query = str_replace(&#8216;page=&#8217;.$matches[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;page=&#8217;.$matches[1], &#8221;, $query);<br />
$query = str_replace(&#8216;page=&#8217;.$matches[1], &#8221;, $query);<br />
if (!empty($query)) {<br />
$url .= &#8216;?&#8217; . $query;<br />
}<br />
}<br />
}<br />
else {<br />
$url = str_replace(&#8216;lightbox.php&#8217;, &#8216;lightbox.html&#8217;, $url);<br />
}<br />
}<br />
elseif (strstr($url, &#8216;categories.php&#8217;)) {<br />
if (strstr($url, &#8216;cat_id=&#8217;) &amp;&amp; strstr($url, &#8216;page=&#8217;)) {<br />
preg_match(&#8216;#cat_id=([0-9]+)&amp;?#&#8217;, $url, $matches1);<br />
preg_match(&#8216;#page=([0-9]+)&amp;?#&#8217;, $url, $matches2);<br />
if (isset($matches1[1]) &amp;&amp; isset($matches2[1])) {<br />
$split = explode(&#8216;?&#8217;, $url);<br />
$url = $split[0];<br />
$query = @$split[1];<br />
$url   = str_replace(&#8216;categories.php&#8217;, &#8216;cat&#8217;.$matches1[1].&#8217;.&#8217;.$matches2[1].&#8217;.html&#8217;, $url);<br />
$query = str_replace(&#8216;cat_id=&#8217;.$matches1[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;cat_id=&#8217;.$matches1[1], &#8221;, $query);<br />
$query = str_replace(&#8216;cat_id=&#8217;.$matches1[1], &#8221;, $query);<br />
$query = str_replace(&#8216;page=&#8217;.$matches2[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;page=&#8217;.$matches2[1], &#8221;, $query);<br />
$query = str_replace(&#8216;page=&#8217;.$matches2[1], &#8221;, $query);<br />
if (!empty($query)) {<br />
$url .= &#8216;?&#8217; . $query;<br />
}<br />
}<br />
}<br />
elseif (strstr($url, &#8216;cat_id=&#8217;)) {<br />
preg_match(&#8216;#cat_id=([0-9]+)&amp;?#&#8217;, $url, $matches);<br />
if (isset($matches[1])) {<br />
$split = explode(&#8216;?&#8217;, $url);<br />
$url = $split[0];<br />
$query = @$split[1];<br />
$cat_url = get_category_url($matches[1]);<br />
$url   = str_replace(&#8216;categories.php&#8217;, &#8216;cat&#8217;.$cat_url.&#8217;.html&#8217;, $url);<br />
$query = str_replace(&#8216;cat_id=&#8217;.$matches[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;cat_id=&#8217;.$matches[1], &#8221;, $query);<br />
$query = str_replace(&#8216;cat_id=&#8217;.$matches[1], &#8221;, $query);<br />
if (!empty($query)) {<br />
$url .= &#8216;?&#8217; . $query;<br />
}<br />
}<br />
}<br />
else {<br />
$url = str_replace(&#8216;categories.php&#8217;, &#8216;cat.html&#8217;, $url);<br />
}<br />
}<br />
elseif (strstr($url, &#8216;details.php?image_id=&#8217;)) {<br />
if (strstr($url, &#8216;image_id=&#8217;) &amp;&amp; strstr($url, &#8216;mode=&#8217;)) {<br />
preg_match(&#8216;#image_id=([0-9]+)&amp;?#&#8217;, $url, $matches1);<br />
preg_match(&#8216;#mode=([a-zA-Z0-9]+)&amp;?#&#8217;, $url, $matches2);<br />
if (isset($matches1[1]) &amp;&amp; isset($matches2[1])) {<br />
$split = explode(&#8216;?&#8217;, $url);<br />
$url = $split[0];<br />
$query = @$split[1];<br />
$url   = str_replace(&#8216;details.php&#8217;, &#8216;img&#8217;.$matches1[1].&#8217;.&#8217;.$matches2[1].&#8217;.html&#8217;, $url);<br />
$query = str_replace(&#8216;image_id=&#8217;.$matches1[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;image_id=&#8217;.$matches1[1], &#8221;, $query);<br />
$query = str_replace(&#8216;image_id=&#8217;.$matches1[1], &#8221;, $query);<br />
$query = str_replace(&#8216;mode=&#8217;.$matches2[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;mode=&#8217;.$matches2[1], &#8221;, $query);<br />
$query = str_replace(&#8216;mode=&#8217;.$matches2[1], &#8221;, $query);<br />
if (!empty($query)) {<br />
$url .= &#8216;?&#8217; . $query;<br />
}<br />
}<br />
}<br />
else {<br />
preg_match(&#8216;#image_id=([0-9]+)&amp;?#&#8217;, $url, $matches);<br />
if (isset($matches[1])) {<br />
$split = explode(&#8216;?&#8217;, $url);<br />
$url = $split[0];<br />
$query = @$split[1];<br />
$url   = str_replace(&#8216;details.php&#8217;, &#8216;img&#8217;.get_image_url($matches[1]).&#8217;.html&#8217;, $url);<br />
$query = str_replace(&#8216;image_id=&#8217;.$matches[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;image_id=&#8217;.$matches[1], &#8221;, $query);<br />
$query = str_replace(&#8216;image_id=&#8217;.$matches[1], &#8221;, $query);<br />
if (!empty($query)) {<br />
$url .= &#8216;?&#8217; . $query;<br />
}<br />
}<br />
}<br />
}<br />
elseif (strstr($url, &#8216;postcards.php?image_id=&#8217;)) {<br />
preg_match(&#8216;#image_id=([0-9]+)&amp;?#&#8217;, $url, $matches);<br />
if (isset($matches[1])) {<br />
$split = explode(&#8216;?&#8217;, $url);<br />
$url = $split[0];<br />
$query = @$split[1];<br />
$url   = str_replace(&#8216;postcards.php&#8217;, &#8216;postcard.img&#8217;.$matches[1].&#8217;.html&#8217;, $url);<br />
$query = str_replace(&#8216;image_id=&#8217;.$matches[1].&#8217;&amp;&#8217;, &#8221;, $query);<br />
$query = str_replace(&#8216;&amp;image_id=&#8217;.$matches[1], &#8221;, $query);<br />
$query = str_replace(&#8216;image_id=&#8217;.$matches[1], &#8221;, $query);<br />
if (!empty($query)) {<br />
$url .= &#8216;?&#8217; . $query;<br />
}<br />
}<br />
}<br />
}<br />
if ($this-&gt;mode == &#8220;get&#8221; &amp;&amp; strstr($url, $this-&gt;session_id)) {<br />
$url .= strpos($url, &#8216;?&#8217;) !== false ? &#8216;&amp;&#8217; : &#8216;?&#8217;;<br />
$url .= SESSION_NAME.&#8221;=&#8221;.$this-&gt;session_id;<br />
}<br />
if (!empty($l)) {<br />
$url .= strpos($url, &#8216;?&#8217;) ? &#8216;&amp;&#8217; : &#8216;?&#8217;;<br />
$url .= &#8220;l=&#8221;.$l;<br />
}<br />
$url = str_replace(&#8216;&amp;&#8217;, $amp, $url);<br />
$url .= isset($dummy_array[1]) ? &#8220;#&#8221;.$dummy_array[1] : &#8220;&#8221;;<br />
return $url;<br />
}</p>
<p>Not sure on what are you doing?! just download this package file and put it on your hosting server! <a href="http://www.istanto.net/wp-content/uploads/2008/04/seo.rar" title="seo.rar">seo.rar</a></p>
<p>And.. you&#8217;re done! congratulation <img src='http://www.istanto.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  You can modify the code to make it works like you want. Anyway if you need to make script more stronger for SEO you might need to coding auto sitemap each time there is new images added. I try but no luck (not sure if xml works fine and accepted by most search engine because it&#8217;s works on IE but not showing correctly on firefox) maybe next time I will write it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.istanto.net/seo-url-rewrite-for-4images.html/feed</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
	</channel>
</rss>

