put the php on a file (name.php)
then in your plugin use:
PHP Code:
require(DIR . '/path/to/file/name.php');
Example:
If you saved the file in the "includes" folder, you would use
PHP Code:
require(DIR . '/includes/name.php');
you can use require or require_once, it depends on the situation
change the path to file according to where you saved the file in relation to your forum root