Get your directory fully indexed (tutorial + php code)

Discussion in 'Directories' started by ErectADirectory, Feb 14, 2007.

  1. brainet

    brainet Active Member

    Messages:
    1,383
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    90
    #21
    hmm. interesting tweaks, i'll try this on my new directory. thanks
     
    brainet, Feb 24, 2007 IP
  2. Blogmaster

    Blogmaster Blood Type Dating Affiliate Manager

    Messages:
    25,924
    Likes Received:
    1,354
    Best Answers:
    0
    Trophy Points:
    380
    #22
    Interesting. Will look into it as well and looking forward to some more feedback from other members.
     
    Blogmaster, Feb 24, 2007 IP
  3. m1t0s1s

    m1t0s1s Peon

    Messages:
    125
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #23

    You can give the directories RSS feed a link from the main page, in addition to the blog-style link tag inside the head tag:
    <link rel="alternate" type="application/rss+xml" title="Yourdirectory.com RSS 2.0 Feed" href="http://www.yourdirectory.com/rss.php" />
    
    
    Code (markup):
    Having an anchor link to the directories rss feed in your footer would be even better.

    And to erectadirectory, where is db_connect.php? I can't get mine to work.
     
    m1t0s1s, Apr 10, 2007 IP
  4. ErectADirectory

    ErectADirectory Guest

    Messages:
    656
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #24
    <?php
    
    $db_user    = "user_id"; // MySQL username
    
    $db_pass    = "password"; // MySQL password
    
    $db_host    = "localhost"; // MySQL host, mostly localhost
    
    $db_db      = "database_name"; // MySQL database
    
    $db_tbl     = "database_table"; // MySQL table
    
    $connect = mysql_connect($db_host,$db_user,$db_pass);
    if($connect == TRUE) {
     if(mysql_select_db($db_db) != TRUE) {
      exit("<span style='color: red'>Can't connect to the MySQL database. Please contact the webmaster.</body></html>");
     }
    }else{
     exit("<span style='color: red'>Can't connect to the MySQL server. Please contact the webmaster.</body></html>");
     }
    ?>
    
    PHP:
    Sorry, I thought that was a gimmie. It's just a standard database connection shown above.

    I clicked your site and it seems you have a header that is dropped in there with some links and a .js. That will not work with an rss feed. Nothing but xml is allowed.

    Hope this helps
     
    ErectADirectory, Apr 10, 2007 IP