Share » Forums » Developer » Programatically fetch links/images...

Programatically fetch links/images with PHP

Programatically fetch links/images with PHP

Friday 20 January 2006 12:55:05 am - 4 replies

Author Message

Bård Farstad

Friday 20 January 2006 1:33:33 am

Hi Felix,

not sure which parts you are looking for. Assuming that you already know how to parse the XML you have you can fetch the URL by id (if it's eZ publish URL's you have) like this:

       $href = eZURL::url( $linkID );

Then you can just print the href and the text to make up the URL.

--bård

Documentation: http://ez.no/doc

Felix Laate

Friday 20 January 2006 3:46:31 am

Hi Bård,

Thnak you for your answer!

This is what I need. Only problem is the I get the error <i>Undefined class name 'ezurl' </i> when I try to use it. I guess it has something to do with initiating.. a topic I don't know to much about..

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Felix Laate

Friday 20 January 2006 3:59:37 am

Hi again,

Got it! Just put:

include_once( "kernel/classes/ezurltype.php" );

at the top of my file.

Thanks for helping!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Felix Laate

Friday 20 January 2006 4:51:43 am

Me again..

Now I need the title and target of the link.. is there any good way to get a grab on these?

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu