View Single Post
Old 06-05-2009, 11:49 AM   #4 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

I don't know why but it appears to work for me when I make that change:

php Code:
$xmlobj = simplexml_load_file("http://www.colingilchrist.com/feeds/posts/default");
$channel = $xmlobj;

foreach ($channel->entry as $element) {

    $title = $element->title;
    $content = $element->content;
    $time = strtotime($element->published);
   
    #$check_query = mysql_query("SELECT * FROM `blog` WHERE `title` LIKE '%".$elemt->title."%'");
    #$check = mysql_num_rows($check_query);
   
    #if($check != 1) {
       
        $szSQL = "INSERT INTO `blog` (
            `user`,
            `title`,
            `message`,
            `time`) VALUES(
            'Colin',
            '"
.$element->title."',
            '"
.$element->content."',
            '"
.$element->published."')";
       
        echo $szSQL . '<br /><br />';
           
    #}
}
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote