Current time: 04-17-2014, 05:13 PM Hello There, Guest! (LoginRegister)

Post Reply 
Why no SimpleXML?
10-02-2006, 09:05 PM
Post: #1
Why no SimpleXML?
I was just wondering why a default extension in PHP like SimpleXML has been disabled? -- It has no inherant security flaws and its just a staple everywhere else.

Clues?
Find all posts by this user
Quote this message in a reply
10-02-2006, 10:53 PM
Post: #2
Why no SimpleXML?
Did you run a check against the phpinfo() function on your site? Please verify what version of php got installed. As you know, it's new as of version 5. I recently brought up a new subdomain using the default DH setup. Here's details from my phpinfo.

Configure Command: '--with-xml'
DOM/XML: enabled
libxml:
libXML support - active
libXML streams - enabled
SimpleXML:
Revision - $Revision: 1.151.2.10 $
Schema support - enabled

If it's not enabled for you, you might want to contact support.

http://benconley.net
http://teamshocker.com
Find all posts by this user
Quote this message in a reply
10-04-2006, 03:03 PM
Post: #3
Why no SimpleXML?
// cURL grabs the blog feed and puts it into $blogContents as a string
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://blog.yourdomain.com/feed.xml");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$blogContents = curl_exec($ch);
curl_close($ch);

// Done fetching feed, manipulate string
$xml = simplexml_load_string($blogContents);
$blog = $xml->channel;
$blogEntries = $blog->item;
echo '<a href="' . $blogEntries->link . '">' . $blogEntries->title . '</a>'

Works for me

Check out Gordaen's Knowledge, the blog, and the MR2 page.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: