Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7446651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:22:20+00:00 2026-05-29T12:22:20+00:00

I did not include my website url, it is a vbulletin forum and all

  • 0

I did not include my website url, it is a vbulletin forum and all rss/xml options are enabled. (that i know of anyways)

<?php
// this is the url of the rss feed that you want to display
$feed = curl_init('http://myvbforum.com/external.php?type=rss2&forumid=33');
curl_setopt($feed, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($feed, CURLOPT_HEADER, 0);
$xml = simplexml_load_file($feed);
curl_close($feed);
//if the feed exists, then continue...
if ($xml!=''){
foreach ($xml->channel->item as $item){
// create variables from the title and description (can also be used for images and  links)
$title = $item->title;
$description = $item->description;
$date = $item->pubDate;
$user = $item->dc:creator;
// displays the title and description on your website, formatted any way you want
echo '<p><b>'.$title.'</b> - On '.$date.' by '.$user.' <br />'.$description.'</p>';
}}
?> 

This is the code i am using. I didnt have the date on it before but i figured that out by going through my rss2 feed from my forum. However, i cannot figure out how to get who the author of the post is to appear. When i reviewed the rss2 page the only reference to a author i can find is the dc:creator variable. Which i tried adding to my code. However i keep getting a

Parse error: syntax error, unexpected ‘:’ in /public_html/bfdm/1/rss.php on line 16

It apparently does not like the :.

I have tried using the DOM load ( $xml = new DOMDocument();
$xml->load($feed); ) but neither work.

Basically i just want to pull the subject, date, user and thread content from my Vbulletin posts. Its been driving me crazy for days.

Now all of a sudden im getting

Warning: simplexml_load_file() expects parameter 1 to be string, resource given in /public_html/bfdm/1/rss.php on line 6

On the code above with

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:22:21+00:00Added an answer on May 29, 2026 at 12:22 pm

    This should work (or at least working when it has a -):

    $user = $item->{'dc:creator'};
    

    And the same has to be done with some other special characters in name, like -.

    Edit: not in this case. However, the final, working code should be:

    <?php
    // this is the url of the rss feed that you want to display
    $feed = 'URL OF THE RSS'; //replace this with the RSS's URL
    $xml = simplexml_load_file($feed);
    //if the feed exists, then continue...
    if ($xml!=''){
    foreach ($xml->channel->item as $item){
    // create variables from the title and description (can also be used for images and  links)
    $title = $item->title;
    $description = $item->description;
    $date = $item->pubDate;
    $user = $item->children('dc', true)->creator;
    // displays the title and description on your website, formatted any way you want
    echo '<p><b>'.$title.'</b> - On '.$date.' by '.$user.' <br />'.$description.'</p>';
    }}
    ?> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I did not find any suitable questions answered yet, so I'd like to know
I did search the forum and did not find a similar question. I'm looking
Before someone said that I did not read I may say that I read
First of all I did not write this code. I found it on somebody
Did not have luck with these examples: Javascript File remove Javascript FSO DeleteFile Method
Did not upgrade anything, nothing should have changed, but I may have a silly
I did not make any changes on the code. I dont receive any errors
I did not find an answer to this question. I have a VOIP application.
My fellow programmers did not think to add timestamps to every tables of our
I spent about hour and did not find any clue how to highlight my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.