[TYPO3-english] Embedding Remote Content into Typo3 CMS Page

Adam Retter adam.retter at googlemail.com
Fri Jul 1 16:34:23 CEST 2011


I have managed to follow a tutorial on building an extension on the
Typo3 website, however I cannot seem to understand how to do the Web
Request to the remote server from my PHP script. I was trying to use
the http_get PHP function, but each time I do, Typo3 just gives me a
HTTP 500 error when I view my page.

Any suggestions please?

On 28 June 2011 21:45, Philipp Gampe <typo3.lists at philippgampe.info> wrote:
> Hi Adam,
>
> Adam Retter wrote:
>
>> 1) Cross Site Scripting - the URL I am requesting is from a different
>> domain! This is problematic in older browsers. But none the less, it
>> can be done.
>>
>> 2) I could not get it to work correctly inside the TYPO3 page. I made
>> an example which uses a pure minimal HTML page -
>> view-source:http://kjc-ws2.kjc.uni-heidelberg.de:8600/exist/apps/test-
> embedd1.html
>>
>> However when I reuse the JavaScript inside my TYPO3 page, I get
>> JavaScript errors, and I really cannot discern why, there seems to me
>> that there should be no difference. My TYPO3 page -
>> http://www.asia-europe.uni-heidelberg.de/index.php?id=1664
>
> I guess you run into trouble with other JS on the same site.
>
>> So maybe I was not clear, I need to do 1 request to the remote site,
>> and from the returned content, extract some items that must be
>> inserted into the <head> of the page, and some items that must be
>> inserted into the body of the page. So two separate approaches wont
>> work, I need a single approach whereby I can manipulate the entire
>> page output from TYPO3. I agree that JavaScript (client side) would
>> seem like a good idea, but as I have written above, I cant get it to
>> work inside a TYPO3 page. Any ideas?
>
> There is a hook to manipulate the whole output. The following extension uses
> it:
> http://typo3.org/extensions/repository/view/naw_securedl/current/
>
> This should give you an overview over the page rendering process:
>
>
>
>>> There are often different ways to reach your goal in TYPO3 as you may
>>> have noticed, I don't thinnk there is a "best way" for your problem.
>>> I'd try the pure javascript approach since it may be the easiest for you.
>>>
>>>> Also, it appears that TypoScript does not seem to be a full-fledged
>>>> Server side programming language, or am I missing something? If not,
>>>> is there something else as well like server side JavaScript in Typo3?
>>>
>>> Typoscript ain't a "programming language" at all :)
>>> See: http://tinyurl.com/6gtegxg (What is Typoscript)
>>
>> Ah right, So am I right in thinking that TYPO3, support call-outs to
>> PHP as the server-side language? If so, is there a mechanism in TYPO3,
>> for me to call a PHP script before the entire page is output from
>> TYPO3, and then somehow in PHP modify the DOM of that page, before
>> returning it to the web-browser?
> see above... there are plenty ways:
> http://buzz.typo3.org/people/stucki/article/typo3-frontend-rendering-
> explained/
>
> Best regards
> --
> Philipp Gampe
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>



-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk


More information about the TYPO3-english mailing list