Improve the SEO on your site (WcDDL V2)
Author Message
c0rrupt
Administrator


Posts: 251
Joined: Mar 2010
Post: #1
Improve the SEO on your site (WcDDL V2)
0
0
Some modifications to improve the SEO on your site.

Add to .htaccess

PHP Code: (Select All)
RewriteEngine On
Options 
+FollowSymlinks
RewriteRule 
^index.html$ /index.php [QSA,L,NC]
RewriteRule ^download-([^/]+)-([^/]+).html download.php?id=$[QSA,L,NC


Open funcs.php and find

PHP Code: (Select All)
mysql_query("INSERT INTO wcddl_queue (sid,title,type,url) VALUES ('".mysql_real_escape_string($sid)."','".mysql_real_escape_string($titles[$i])."','".mysql_real_escape_string($types[$i])."','".mysql_real_escape_string($urls[$i])."')"); 


Replace with

PHP Code: (Select All)
mysql_query("INSERT INTO wcddl_queue (sid,title,type,url) VALUES ('".mysql_real_escape_string($sid)."','".mysql_real_escape_string(remove_words($titles[$i]))."','".mysql_real_escape_string($types[$i])."','".mysql_real_escape_string($urls[$i])."')"); 


Find

PHP Code: (Select All)
?>


Add on a new line before

PHP Code: (Select All)
function remove_words($str){
$replace_str '';
$bad_words = array('DVDRIP','XviD','Limited DVDRip','DvDrip-aXXo','aXXo','PROPER','Rip','Cam','\!','\?','\#');

    if (!
is_array($bad_words)){ $bad_words explode(' '$bad_words); }
    for (
$x=0$x count($bad_words); $x++){
     
$fix = isset($bad_words[$x]) ? $bad_words[$x] : '';
     
$_replace_str $replace_str;
     if (
strlen($replace_str)==1){
     
$_replace_str str_pad($_replace_strstrlen($fix), $replace_str);
     }
     
$str preg_replace('/'.$fix.'/i'$_replace_str$str);
     
$string preg_replace('/[\s]+/''-'$string);
    }
    return 
$str;


Open index.php and Find

PHP Code: (Select All)
<a href="download.php?id=<?=$dl['id']?>"><?=$dl['title']?></a> 


Replace with
PHP Code: (Select All)
<a href="download-<?=$dl['id']?>-<?=str_replace(" ","-",$dl[title])?>.html"><?=$dl[title]?></a> 

Be sure to visit WCDDL.org Affiliates
07-04-2012 10:31 AM


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [WCDDLv2] Show the total amount downloads for a specific site c0rrupt 0 47 07-26-2012 04:37 PM
Last Post: c0rrupt
  phpBB3 Autosubmitter (for your DDL site) c0rrupt 0 162 04-17-2010 03:49 AM
Last Post: c0rrupt



User(s) browsing this thread: 1 Guest(s)

This forum uses Lukasz Tkacz MyBB addons.