06-05-2009, 11:49 AM
|
#4 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
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.
|
|
|