Skip to content

Instantly share code, notes, and snippets.

@kripul
kripul / IXR_Library.php
Last active September 19, 2017 15:36
PHP script to create wordpress new post using xmlrpc
<?php
/**
* IXR - The Incutio XML-RPC Library
*
* Copyright (c) 2010, Incutio Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
<VirtualHost *:80>
ServerAdmin your_email_address
ServerName domain1.net
ServerAlias www.domain1.net
DocumentRoot /var/www/domain1
<Directory />
Options FollowSymLinks
AllowOverride None
Require all granted
<?php
$jsonData = file_get_contents('http://pastebin.com/raw/1u67Dk86');
$result = json_decode($jsonData, true);
//print_r ($result);
echo $result['responses']['0']['textAnnotations']['0']['description'];
?>
{
"responses": [
{
"textAnnotations": [
{
"locale": "gl",
"description": "xougl\nxoUg\ner.net\n",
"boundingPoly": {
"vertices": [
{