This client library provides easy access to the API of the Textbroker marketplace.
Textbroker is a marketplace where you can get unique (text) content for your website.
Textbroker PHP5 Client
You can find our BSD licensed client on Github. The project is called textbroker-PHP5-Client.
Usage examples
Usage if budget information is defined in constants
1 2 3 4 | require_once 'TextbrokerBudgetCheckDAO.php'; // Invoke the BudgetCheckService class $aUsage = TextbrokerBudgetCheckDAO::singleton()->getUsage(); |
Usage if budget information is passed individually
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | require_once 'TextbrokerBudgetOrderDAO.php'; $budgetKey = 'YOUR-BUDGET-KEY'; $budgetId = 12345; # your budget ID $password = 'SECRET'; # your API budget password // Invoke the BudgetOderService class $budgetOrder = TextbrokerBudgetOrderDAO::singleton($budgetKey, $budgetId, $password); // Get the available categories $aCategories = $budgetOrder->getCategories(); // Create a new order $categoryId = 12345; $title = 'My order title'; $description = 'Write a text about anything and do it fast!'; $minLength = 350; $maxLength = 400; $rating = 4; $dueDays = 1; $aResult = $budgetOrder->create($categoryId, $title, $description, $minLength, $maxLength, $rating, $dueDays); // Check the status $aStatus = $budgetOrder->getStatus($aResult['budget_order_id']); |

