2 Replies - 424 Views - Last Post: 17 September 2011 - 11:51 PM Rate Topic: -----

#1 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

how to display news in my site php

Posted 17 September 2011 - 10:44 PM

Hi all,

I am developing a site where I wish to put "news" module to the site. I use php.
I want to display a news then blink and next news come. like that i want to do it.
problem is I dont know how to do that. If anybody have any idea plz give me a hint.
or example then I wil manage

thx in advance,
menuka
Is This A Good Question/Topic? 1
  • +

Replies To: how to display news in my site php

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4188
  • View blog
  • Posts: 11,857
  • Joined: 18-April 07

Re: how to display news in my site php

Posted 17 September 2011 - 11:12 PM

PHP can be used to fetch the news from an RSS site or web site. As for the transitions and scrolling/popping up/fading in is then controlled by Javascript. You can also fetch the news using AJAX calls to external sources.

So start by identifying which sites you would like to get the news from, find the sources and then look for PHP code that can fetch that data and parse it on your own site. Once you get this part done then you can work on the blink and presenting the next news story.

One site that shows you how to go about fetching RSS content is the link below...

How to Read an RSS Feed with PHP

This article results in a page that shows the news links as a list of items. Once you get to this point, then it is all about hiding elements and showing only the "active" ones. Blinking is done with manipulating CSS using the Javascript. Look at the styles for "Opacity" and "Visibility".

jQuery javascript code may make this much easier to do as well.

:)
Was This Post Helpful? 2
  • +
  • -

#3 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

Re: how to display news in my site php

Posted 17 September 2011 - 11:51 PM

thanks for ur hint. I wish to save news to database and retrieve it .
cant we print line by line giving some delay to print rows of the table in the database? If it is possible then huge work is limited.

thx
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1