Pa eso estais ayudandonos SurKaiser, pa que os robemos los codigos, sino como íbamos a aprehender. Mira el archivo de subidas y escritura a.xml
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">
<head>
<?
require_once("config.php");
do_html("Sevilla guapa");
?>
<meta name="robots.txt" content="nofollow"/>
<meta name="lang" content="es"/>
<link rel="stylesheet" type="text/css" href="estyl.css" media="all" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<?
cabezera("Sevilla Guapa","<img alt='banse' src='imagenes/inicio/banse.png' height='90' title='Bandera de Sevilla' />",
"<img alt='circuito' src='imagenes/inicio/circuito.jpg' height='90' />");
menu();
if(!is_uploaded_file($_FILES["imagen"]["tmp_name"]))
{
echo "<b style='color:red'>Error al subir archivo</b>";
}
else {
$tipos = array("image/gif","image/jpeg","image/jpg","image/png");
$maximo = 5000000; //4.7 Mb
if (in_array($_FILES["imagen"]["type"],$tipos) && $_FILES["imagen"]["size"] <= $maximo)
{
include("conect.php");
$nombre = ($_FILES["imagen"]["name"]);
$nombre = str_replace(" ","_",$nombre);
$nombre = explode("/.",$nombre);
$peticion = mysql_query("INSERT INTO imagenes(nombre,url,nick) VALUES('".$nombre[0]."','subidas/".$nombre[0]."','".$_SESSION["usuario"]."')") or die(mysql_error());
move_uploaded_file(($_FILES["imagen"]["tmp_name"]),"subidas/".$nombre[0]);
$verificar = mysql_query("SELECT * FROM imagenes ORDER BY imagen_id DESC LIMIT 0,1");
$numeros = mysql_num_rows($verificar);
if($numeros <= 0)
{
echo "<b style='color: red;'>No se han encontrado imagenes</b><br/>";
}
else {
echo "<br/><h2>Esta es tu imagen subida ".$_SESSION['usuario']."</h2>";
if($imagen = mysql_fetch_array($verificar))
mysql_free_result($verificar); //Aqui libramos memoria del querry
{
if(($_FILES['imagen']['size'])>10000)
{
echo "<img width='500' heigh='auto' float='center' src=".$imagen['url'].">";
}
else {
echo "<img float='center' src=".$imagen['url'].">";
}
echo "<br/>".$imagen['nombre'];
echo "<br/><a href='tus_img.php'><h2>Ver tus imagenes.</h2></a>|<a href='mostrar_todas_Img.php'><h2>Ver todas las imagenes</h2></a>";
}
}
}
else {
echo "<b style='color: red;'>Revisa la extension o el tamaño del archivo</b></style>";
}
}
//desde aqui es para el rss
$verificar = mysql_query("SELECT * FROM imagenes ORDER BY imagen_id DESC LIMIT 10");
$archivo = fopen("feeds.xml" , "w+");
if($archivo){
fputs ($archivo, '<?xml version="1.0" encoding="ISO-8859-1"?>');
fputs ($archivo, '<rss version="2.0">');
fputs ($archivo, "<channel>");
fputs ($archivo, "<title>Mi Sevilla Guapa</title>");
fputs ($archivo, "<link>http://localhost/SevillaGuapa/principal.php</link>");
fputs ($archivo, "<description>Web Fotografica de Sevilla</description>");
while($imagen = mysql_fetch_array($verificar)) {
fputs ($archivo, "<item>");
fputs ($archivo, "<title>".$imagen['nombre']."</title>");
fputs ($archivo, "<link>http://localhost/SevillaGuapa/".$imagen['url']."</link>");
fputs ($archivo, "<description>subida por: ".$imagen['nick']."</description>");
fputs ($archivo, "</item>");
}
fputs ($archivo, "</channel>");
fputs ($archivo, "</rss>");
fclose ($archivo);
}
piePuzdle("<a href='".$_SERVER['HTTP_REFERER']."'>Volver</a>","<a href='logout.php'>Logout</a>","");
?>
Gracias un poquito a ti, otro poquito a otros (no os voy a nombrar a todos), se me aclaran las ideas y voy entendiendo el significado de los codes. Os recuerdo que soy
autodidacta de la red. [:D][:D]