You could try if you can turn them in to snippets. Snippets generally are just php scripts (when you start trying it out, just remove <?php from start and ?> from the end).
Once you have your snippet ready for testing, just use [!SnippetName!] in some document and see the results. You could also search the forums for IncludeFile snippet and use that to include the php scripts to your pages.
Or if you want quickly to wrap a complex php program in to your page, you would either install it working on your site in another location and do a Weblink to it and try to theme it to resemble your site as much as possible (think of forums and complex online store applications etc) or you could use a snippet to display them in a iFrame on your site, I think there is a ready made snippet somewhere to do that.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Hi ajayre,
Thanks for the reply,
I have gone through the same but unable to proceed further with the help available. Since , Im a new bee , is there any simple tutorial to make my custom snippets. Or Is there any way to embbed my PHP into MODX site so that SESSIONS and COOKIES also work .
Please help me in this regard,
Thanks in Advance.
Sessions and cookies works just the same as in your standalone script.. Just try writing some php code to a new snippet and call it on some page. It’s just that simple. Usually snippets collect the output in a string and finally returns it, but now days echo works too (it’s not adviced to use it though, your content could show up in wrong place).
so instead of
<?php
echo ('Your IP is: '.$_SERVER["REMOTE_ADDR"].'.');
?>
do:
$output = 'Your IP is: '.$_SERVER["REMOTE_ADDR"].'.';
return $output;
"He can have a lollipop any time he wants to. That's what it means to be a programmer."