title: Wordpress permalink from the database?
body: <p>I am trying to access selected post information from my WordPress database to display on a second website which is not a WordPress site nor is it php, it is in fact an asp.net website that i want to display the information on. </p>
  
  <p>I have a WordPress blog at blog.domain.com and another website at domain.com both running on different servers and I need to display the excerpt, title with link on my asp.net website for selected posts. I can easily grab the excerpt and title from the blog's database but the only problem is that the permalink is not in the database. </p>
  
  <p>I had the idea that maybe if I place a short piece of code on every blog to insert the permalink to a new table, i could then grab that to use over on the other website. But that didnt work, perhaps I am not doing it right. This is the code I used;</p>
  
  <pre><code>&lt;?php
   global $wpdb;
   $table_name = $wpdb-&gt;prefix . "posts_pages_url";
   $wpdb-&gt;insert($table_name , array('post_id' =&gt; the_ID(), 'url' =&gt; the_permalink()));
  ?&gt;
  </code></pre>
  
  <p>Some might say, "why dont you just use an RSS Feed?" Well if it comes down to it, I just might have to, but i would prefer not to as connecting to the database directly to access my selected posts is much more flexible. </p>
  
  <p>I would be very grateful if anyone had any suggestions on how I can access the permalink via a database call.</p>
  
  <p>Many thanks </p>