Official Maltego Documentation » Developer Portal » Local Transforms » PHP Local Transform Examples

PHP Local Transform Examples


This page provides further code examples for writing transforms in PHP using the standard local transform library.

Basic Example

This will create a Person Entity with a value of "Andrew MacPherson"

<?php
include_once("MaltegoTransform.php");
$mt = new MaltegoTransform();
$mt->debug("Starting Transform");
$mt->addEntity("Person","Andrew MacPherson");
$mt->returnOutput();


More Advanced Example

This creates a new entity and adds a strict property.

<?php
include_once("MaltegoTransform.php");
$mt = new MaltegoTransform();
$mt->debug("Starting Transform");
$NewEnt = $mt->addEntity("Person","Andrew MacPherson");
$NewEnt->setWeight(300); #Set the Weight of the entity
$NewEnt->addAdditionalFields("Age","Age Of Person","strict","24");
$mt->returnOutput();

Continue to the Python Local Transform Examples page.


Official Maltego Documentation
-»
Developer Portal
-»
Local Transforms
-»
PHP Local Transform Examples

© Copyright 2017, Paterva PTY Limited