Jump to content
WebFrance
Sign in to follow this  
Galagala

Simpleplie - Je deviens fou!

Recommended Posts

Salut a tous,

J'essaye depuis quelque temps d'intégrer une feed du site Franceantilles.

J'ai suivi les étapes 1,2,3,4 trouvable ici http://simplepie.org/wiki/setup/setup

néanmoins je me retrouve avec seulement cela sur ma page:

< ?php // This shows where simple pie is located simplepie.inc. require_once('php/simplepie.inc'); // Your Feed Address $feed = new SimplePie('http://www.martinique.franceantilles.fr/rss/lea_Une.xml'); $feed->handle_content_type(); ?> < ?php foreach ($feed->get_items() as $item): ?>

< ?php echo $item->get_title(); ?>

< ?php echo $item->get_description(); ?>

Posted on < ?php echo $item->get_date('j F Y | g:i a'); ?>

< ?php endforeach; ?>

Voila le code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Feed</title>

</head>

< ?php


// This shows where simple pie is located simplepie.inc.

require_once('php/simplepie.inc');


// Your Feed Address

$feed = new SimplePie('http://www.martinique.franceantilles.fr/rss/lea_Une.xml');


$feed->handle_content_type();


?>


< ?php foreach ($feed->get_items() as $item): ?>


<h2>

<a href="<?php echo $item->get_permalink(); ?>">

< ?php echo $item->get_title(); ?></a>

</h2>

<p>< ?php echo $item->get_description(); ?></p>

<p><small>Posted on < ?php echo $item->get_date('j F Y | g:i a'); ?>

</small></p>


< ?php endforeach; ?>

Quelqu'un voit une grosse erreur? :unsure:

Merci beaucoup!

Share this post


Link to post
Share on other sites
Partagez cette page :

>> Nouveau : Découvrez la marketplace d'Achat / Vente de Sites !

Hmmm, je pense que j'ai bien enleve les espaces:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Feed</title>

</head>

<?php


// This shows where simple pie is located simplepie.inc.

require_once('php/simplepie.inc');


// Your Feed Address

$feed = new SimplePie('http://www.martinique.franceantilles.fr/rss/lea_Une.xml');


$feed->handle_content_type();


?>


<?php foreach ($feed->get_items() as $item): ?>


<h2>

<a href="<?php echo $item->get_permalink(); ?>">

<?php echo $item->get_title(); ?></a>

</h2>

<p><?php echo $item->get_description(); ?></p>

<p><small>Posted on <?php echo $item->get_date('j F Y | g:i a'); ?>

</small></p>


<?php endforeach; ?>

Merci :unsure:

Edited by Galagala

Share this post


Link to post
Share on other sites
Partagez cette page :

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

Partagez cette page :



© WebFrance - Contact - Annonceurs - Conditions générales - Legal

×
×
  • Create New...

Achat / Vente de Sites

Découvrez la marketplace WebFrance :

site.jpg