Re: [PHP] How to create RSS feeds with PHP?

2006-03-30 Thread Merlin

chris smith schrieb:

On 3/30/06, Merlin <[EMAIL PROTECTED]> wrote:

chris smith schrieb:

On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote:

Hi there,

I am wondering if there are already tools out there which do
create RSS feeds on the fly with the help of PHP.

My goal would be to create RSS dynamicly out of a LAMP App. to
syndicate the results.

Are there any tools you know about?

This might get you started:

http://www.phpclasses.org/browse/package/2957.html

--
Postgresql & php tutorials
http://www.designmagick.com/

Hi Chris,

thank you for that hint. That worked excellent. There is just one small thing I
can not figure out. Including images into that feed. Using your mentioned
classes I have following code:

$rss_channel = new rssGenerator_channel();
   $rss_channel->title = 'test';
   $rss_channel->link = 'test.com';
   $rss_channel->description = 'test';
   $rss_channel->language = 'en-us';
   $rss_channel->generator = 'RSS Feed Generator';
   $rss_channel->managingEditor = '[EMAIL PROTECTED]';
   $rss_channel->webMaster = '[EMAIL PROTECTED]';

   for ($i=0;$i<=$results_num;$i++){
   $item = new rssGenerator_item();
   $item->title= $ad[title][$i];
   $item->description= $ad[text][$i];
   $item->link = $ad[link][$i];
   $item->pubDate = $ad[date][$i];
   $rss_channel->items[] = $item;

 $rss_image = new rssGenerator_image();
 $rss_image->url = '/g/p/logo.gif';


Try it as a full url.

--
Postgresql & php tutorials
http://www.designmagick.com/


sorry that was an XML problem. Stupid me :-)
Here is the solution for anybody having the same problem:

		/>select="rss/channel/image/width" />name="height">/>		


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to create RSS feeds with PHP?

2006-03-30 Thread chris smith
On 3/30/06, Merlin <[EMAIL PROTECTED]> wrote:
> chris smith schrieb:
> > On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote:
> >> Hi there,
> >>
> >> I am wondering if there are already tools out there which do
> >> create RSS feeds on the fly with the help of PHP.
> >>
> >> My goal would be to create RSS dynamicly out of a LAMP App. to
> >> syndicate the results.
> >>
> >> Are there any tools you know about?
> >
> > This might get you started:
> >
> > http://www.phpclasses.org/browse/package/2957.html
> >
> > --
> > Postgresql & php tutorials
> > http://www.designmagick.com/
>
> Hi Chris,
>
> thank you for that hint. That worked excellent. There is just one small thing 
> I
> can not figure out. Including images into that feed. Using your mentioned
> classes I have following code:
>
> $rss_channel = new rssGenerator_channel();
>$rss_channel->title = 'test';
>$rss_channel->link = 'test.com';
>$rss_channel->description = 'test';
>$rss_channel->language = 'en-us';
>$rss_channel->generator = 'RSS Feed Generator';
>$rss_channel->managingEditor = '[EMAIL PROTECTED]';
>$rss_channel->webMaster = '[EMAIL PROTECTED]';
>
>for ($i=0;$i<=$results_num;$i++){
>$item = new rssGenerator_item();
>$item->title= $ad[title][$i];
>$item->description= $ad[text][$i];
>$item->link = $ad[link][$i];
>$item->pubDate = $ad[date][$i];
>$rss_channel->items[] = $item;
>
>  $rss_image = new rssGenerator_image();
>  $rss_image->url = '/g/p/logo.gif';

Try it as a full url.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to create RSS feeds with PHP?

2006-03-30 Thread Merlin

chris smith schrieb:

On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote:

Hi there,

I am wondering if there are already tools out there which do
create RSS feeds on the fly with the help of PHP.

My goal would be to create RSS dynamicly out of a LAMP App. to
syndicate the results.

Are there any tools you know about?


This might get you started:

http://www.phpclasses.org/browse/package/2957.html

--
Postgresql & php tutorials
http://www.designmagick.com/


Hi Chris,

thank you for that hint. That worked excellent. There is just one small thing I 
can not figure out. Including images into that feed. Using your mentioned 
classes I have following code:


$rss_channel = new rssGenerator_channel();
  $rss_channel->title = 'test';
  $rss_channel->link = 'test.com';
  $rss_channel->description = 'test';
  $rss_channel->language = 'en-us';
  $rss_channel->generator = 'RSS Feed Generator';
  $rss_channel->managingEditor = '[EMAIL PROTECTED]';
  $rss_channel->webMaster = '[EMAIL PROTECTED]';

  for ($i=0;$i<=$results_num;$i++){
  $item = new rssGenerator_item();
  $item->title= $ad[title][$i];
  $item->description= $ad[text][$i];
  $item->link = $ad[link][$i];
  $item->pubDate = $ad[date][$i];
  $rss_channel->items[] = $item;

$rss_image = new rssGenerator_image();
$rss_image->url = '/g/p/logo.gif';
$rss_image->title = 'image';
$rss_image->link = 'no link';
$rss_image->width = 88;
$rss_image->height = 31;
$rss_image->description = 'test image';
$rss_channel->image = $rss_image;

  }
  $rss_feed = new rssGenerator_rss();
  $rss_feed->encoding = 'UTF-8';
  $rss_feed->version = '2.0';
  header('Content-Type: text/xml');
  echo $rss_feed->createFeed($rss_channel);

The image will not apear no matter how I try it. Any idea how to do that?

Best regards,

Merlin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to create RSS feeds with PHP?

2006-03-28 Thread chris smith
On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote:
> chris smith schrieb:
> > On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote:
> >> Hi there,
> >>
> >> I am wondering if there are already tools out there which do
> >> create RSS feeds on the fly with the help of PHP.
> >>
> >> My goal would be to create RSS dynamicly out of a LAMP App. to
> >> syndicate the results.
> >>
> >> Are there any tools you know about?
> >
> > This might get you started:
> >
> > http://www.phpclasses.org/browse/package/2957.html
> >
> > --
> > Postgresql & php tutorials
> > http://www.designmagick.com/
> Thank you! That works great. Do you know about a class which does
> the other way around? I mean there are a couple of webservices out there
> which you can use to generate the JavaScript code on the fly via their php
> script. But that relies on an external website which is not my intention.
> My goal would be to have a PHP script which provides the possibility to create
> a JS file to parse the XML stream.
> So basicly to provide the people who would like to integrate my RSS feeds 
> with a
> few lines of copy and paste JavaScript code to include into their blogs.

This is how ajax works.. so yes it is possible.

Check out:
http://developer.apple.com/internet/webcontent/xmlhttpreq.html
http://www.xml.com/pub/a/2005/02/09/xml-http-request.html
http://jibbering.com/2002/4/httprequest.html

It's hard to give a specific example because some of it depends on the
clients website and how it works (whether it's tables, divs etc)...

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to create RSS feeds with PHP?

2006-03-28 Thread Merlin

chris smith schrieb:

On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote:

Hi there,

I am wondering if there are already tools out there which do
create RSS feeds on the fly with the help of PHP.

My goal would be to create RSS dynamicly out of a LAMP App. to
syndicate the results.

Are there any tools you know about?


This might get you started:

http://www.phpclasses.org/browse/package/2957.html

--
Postgresql & php tutorials
http://www.designmagick.com/

Thank you! That works great. Do you know about a class which does
the other way around? I mean there are a couple of webservices out there
which you can use to generate the JavaScript code on the fly via their php 
script. But that relies on an external website which is not my intention.

My goal would be to have a PHP script which provides the possibility to create
a JS file to parse the XML stream.
So basicly to provide the people who would like to integrate my RSS feeds with a 
few lines of copy and paste JavaScript code to include into their blogs.


Is this possible?

Thank you for any hint,

Merlin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to create RSS feeds with PHP?

2006-03-28 Thread chris smith
On 3/28/06, Merlin <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I am wondering if there are already tools out there which do
> create RSS feeds on the fly with the help of PHP.
>
> My goal would be to create RSS dynamicly out of a LAMP App. to
> syndicate the results.
>
> Are there any tools you know about?

This might get you started:

http://www.phpclasses.org/browse/package/2957.html

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] How to create RSS feeds with PHP?

2006-03-28 Thread Merlin

Hi there,

I am wondering if there are already tools out there which do
create RSS feeds on the fly with the help of PHP.

My goal would be to create RSS dynamicly out of a LAMP App. to
syndicate the results.

Are there any tools you know about?

Thank you in advance, Merlin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php