Creating children as image - php

Author Message

Bjarte Lunde

Tuesday 20 February 2007 11:31:10 am

Hello!

I'm creating a import script for finn.no REST data, and want to fetch images from finn.no and add them as children. Does anyone have a example code on how to do this?

- Bjarte

Bjarte Lunde

Monday 26 February 2007 2:27:28 pm

Found a solution!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:41:59
Script start
Timing: Jan 18 2025 18:41:59
Module start 'layout'
Timing: Jan 18 2025 18:41:59
Module start 'content'
Timing: Jan 18 2025 18:41:59
Module end 'content'
Timing: Jan 18 2025 18:41:59
Script end

Main resources:

Total runtime0.7102 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 589.0469152.6250
Module start 'layout' 0.00470.0027 741.671939.4453
Module start 'content' 0.00740.7016 781.1172416.6406
Module end 'content' 0.70890.0012 1,197.75788.1563
Script end 0.7102  1,205.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4522160.0002
Check MTime0.00130.1820160.0001
Mysql Total
Database connection0.00080.108410.0008
Mysqli_queries0.675995.1732520.0130
Looping result0.00040.0602500.0000
Template Total0.682596.120.3413
Template load0.00190.265920.0009
Template processing0.680695.835320.3403
Template load and register function0.00010.019610.0001
states
state_id_array0.00070.095610.0007
state_identifier_array0.00080.116420.0004
Override
Cache load0.00150.218080.0002
Sytem overhead
Fetch class attribute can translate value0.00070.095910.0007
Fetch class attribute name0.00100.134620.0005
XML
Image XML parsing0.00010.016510.0001
class_abstraction
Instantiating content class attribute0.00000.000820.0000
General
dbfile0.00060.0894100.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 4

Time used to render debug report: 0.0002 secs