Jump to content

[SOLVED] RSS Using PHP


s4salman

Recommended Posts

I am trying to create RSS  using PHP but getting error message :

 

Parse error: syntax error, unexpected $end in /home/hesla/public_html/rss.php on line 127

 

I am using this code. Please help me in this.

 

 

<?php



if (!ini_get("register_globals")) {

    import_request_variables('GPC');

}

//&#1578;&#1608;&#1575;&#1601;&#1602; &#1606;&#1587;&#1582; &#1575;&#1604;&#1576;&#1610; &#1575;&#1578;&#1588; &#1576;&#1610;

$phpver = phpversion();

if ($phpver < '4.1.0') {

    $_GET = $HTTP_GET_VARS;

    $_POST = $HTTP_POST_VARS;

    $_SERVER = $HTTP_SERVER_VARS;

}

$phpver = explode(".", $phpver);

$phpver = "$phpver[0]$phpver[1]";

if ($phpver >= 41) {

    $PHP_SELF = $_SERVER['PHP_SELF'];

}



$dbhost="localhost";

$dbusername="user";

$dbpassword="password";

$dbname="hesla_test";



//Before you can perform any operation on a database you must connect to the MySQL server. The syntax for performing this operation is simple:

$connect = mysql_connect($dbhost, $dbusername, $dbpassword);

mysql_select_db($dbname,$connect) or die ("Could not select database");







        $result = mysql_query("SELECT * FROM 3gp LIMIT 10 ORDER BY id ",$connect);



        while($r = mysql_fetch_assoc($result))



             {	

   //the format is $variable = $r["nameofmysqlcolumn"];

   //modify these to match your mysql table columns

  

   

   $id=$r["id"];

   $name=$r["name"];

   $details=$r["details"];

   $url=$r["url"];

   $image=$r["image"];

     $embede=$r["embede"];
$mirrorimg=$r["mirrorimg"];
$mirror3gp=$r["mirror3gp"];
   

   

   

?>

<rss version="2.0">
<channel>
  <title>3GP VIDEOS</title>
  <link>http://funxy.com</link>
  <description>Latest 3GP Videos</description>
  <language>en-us</language>
  <copyright>Copy Right Resereved 2009-10</copyright>
  
  <image>
   <url>http://www.funxy.com/images/Untitled-1_01.gif</url>
   <title>Latest 3GP Videos @ Funxy.Com</title>
   <link>http://funxy.com</link>
   <width>114</width>
   <height>54</height>
  </image>
  <item>
   <title><?php echo "$name";

?></title>
   <link><?php echo "http://funxy.com/beta/3gp-downloads$id.html";

?></link>
   <description><?php echo "$details";

?> </description>
  </item>	
  
</channel>
</rss>
    

Link to comment
https://forums.phpfreaks.com/topic/152060-solved-rss-using-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.