Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

News ticker using PHP webserver

Links for php scripts

Moderators: macek, egami, gesf

News ticker using PHP webserver

Postby suvendu4urs » Tue Aug 30, 2011 5:17 am

Hello All......

I am a new guy to PHP world.
I want to develop a news sticker via PHP web server.

Instead of polling RSS feed via AJAX,i need to do it using PHP scripts.

Hope i will get some idea from you guys.

Thanks in advance.
suvendu4urs
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Aug 30, 2011 5:09 am

Re: News ticker using PHP webserver

Postby egami » Tue Aug 30, 2011 5:28 am

news ticker?
You mean a scrolling bar at the top of the page to display news?

This would be nothing to do with PHP directly, it's a Java/CSS with perhaps some AJAX/JQUERY on a backend PHP/MYSQL db.

You're going to need to do a little bit more research on this one.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: News ticker using PHP webserver

Postby suvendu4urs » Tue Aug 30, 2011 6:21 am

Yes its the scrolling bar at the top of the page to display news.
For getting the information definitely we need to help of RSS feeds.

By polling RSS feeds the synchronicity of news ticker is not proper(sometimes even the news ticker freezes).
So i need some solution to resolve this synchronicity issues.

I think we need to have a php webserver instead of polling the RSS feed.

Give your suggestions for this.
suvendu4urs
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Aug 30, 2011 5:09 am

Re: News ticker using PHP webserver

Postby egami » Tue Aug 30, 2011 7:15 am

This is an AJAX/JQUERY thing.
You can use PHP to gather the info, but you'll need something to query it, and then show it. Thus, AJAX/Javascript.

Good luck in your adventure.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: News ticker using PHP webserver and Jquery

Postby suvendu4urs » Fri Oct 07, 2011 6:07 am

I have developed the script to get all the news information to display it in 3 clients.For this i have used Jquery.ajax.

Currently everything is fine.It works for certain period of time.After that it freezes.One client might be showing weather information and other might be showing news.

I have attached the code for your reference.

jQuery.ajax({
url: './content.txt>',
type: 'GET',
dataType: 'xml',
error: function (xhr, status, e) {
echo('Error: ' + e + status);
},
success: function(feed) {
self.fetchingItems = false;
echo($(feed));
jQuery(feed).find('item').each(function(i) {
nextItems.push({
text: jQuery(this).find('description').text()
});
});

// no items received, turn off ticker
if (!nextItems.length)
nextItems.push({ text: '<p class="Bad">Very Bad!</p>' });
}
});


Let me know if you have any information to solve this issue.
suvendu4urs
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Aug 30, 2011 5:09 am


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron