0) //If it's been crossposted, kill everything now. { exit(); } else //Otherwise carry on and update crosspost status. { $insertresult = mysql_query("INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES('$ID', 'xposted', '1')"); if (!$insertresult) { die('Invalid query: ' . mysql_error()); } } } function packagePost() //CREATES MESSAGE TO BE POSTED TO MYSPACE { global $mySubject, $postUrl, $blogContent, $blogUrl, $blogName, $row; $title=$row[5]; $content=$row[4]; $postUrl=$blogUrl.$row[12]; $mySubject=$title; //the following html really should be replaced with css... but... I'm lazy... $blogContent= "I've posted a new article entitled ".$mySubject." on my blog ".$blogName.".

Due to crossposting and formatting restrictions within the MySpace system, the article will not be posted here.

Please visit ".$blogName." or go directly to the article at:".$postUrl."

Enjoy!"; } function wpcloseDB() //CLOSES WP DB { global $link; mysql_close($link); } wpdbConnect(); fetchPost(); xpostCheck(); packagePost(); wpcloseDB(); $myspaceconnect = new myspace; $myspaceconnect->myspaceCreds($myspaceuser, $myspacepass); $myspaceconnect->login(); $myspaceconnect->blogPost($mySubject, $postUrl, $blogContent); $myspaceconnect->close(); ?>