1manfactory.com – Blog of Jürgen Schulze

Wordpress, PHP, MySQL, Plugins, Android, Amazon Kindle, eBooks

Zum Inhalt springen
  • Impressum
  • Kontakt
  • Datenschutzerklärung

Remote Bypass API – A wordpress API plugin

I was in need of a remote API to access my WordPress blog for writing, updating, deleting etc. of my posts driven by MySQL statements.

I tried to make head or tails out of the official Rest API plugin but got annoyed by too much overhead and stuff to learn. I needed a solution NOW!

So I decided to program my own server API to suite my needs.

It’s pretty easy to handle. You can use every build in WordPress function as you are used to.

Security

The server is secured by apache’s basic authentication (.htpasswd/.htaccess). Communication is encrypted by SSL (if installed). There is also a checksum to make sure that no bit of the command is lost or changed during sending.

Every generated API server on every machine is completely unique. All folders and sub folders and filenames are randomly generated. And of course all the credentials are randomly generated, too.

There is no need to remember any passwords (so you are not tempted to use simple ones). You only have to use the admin area download link to get your unique API client.

This generated small client code includes the function „call_server„. This function will send your command to the API server and wait for the result(s) coded in a handy json generated string.

Examples

require('./remote-bypass-api-client_inc.php');
print_r(json_decode(
	call_server(
	array('wpfunction'=>'get_users', 'args'=>array('role'=>'administrator'))
	)));

This will call the server. Parameters are name of function („get_users„) and an argument’s array as defined in https://codex.wordpress.org/Function_Reference/get_users.

This is the result in the brower’s source code view:

Another example, now with including a particular, needed function.

require('./remote-bypass-api-client_inc.php');
$attach_data=json_decode(call_server(
	array('wpfunction'=>'wp_generate_attachment_metadata', $attach_id, $file),
	null, // using default coder
	'wp-admin/includes/image.php' // needed for wp_generate_attachment_metadata
));

See, this plugin bypasses the WordPress function, hence the name.

DOWNLOAD

Use at your own responsibility. No guarantee, no support.

remote-bypass-api

Changelog

  • 0.6.1 (2017-03-04) (API Version 6)
    • bugfix: caching on some machines prevented generating of new API servers
  • 0.6 (2017-03-03) (API Version 6)
    • more bugfixes
    • set all the necessary include files in third parameter
  • 0.5 (2017-03-02) (API Version 5)
    • fixed: buggy catching of server path
    • suppress error messages in client
  • 0.4. (2017-02-15) (API Version 4)
    • hiding and randomizing basefolder
    • now accepting all kind of parameter arrays
  • 0.3 (2017-02-15) (API Version 3)
    • now handles pure strings as arguments as well
  • 0.2 (2017-02-11) (API Version 2)
    • checksumm check
    • Communication between client and server is crypted when ssl
  • 0.1 (2017-02-11) (API Version 1)
    • first version.

Ähnliche Beiträge:

  • Zwei-Faktor-Authentifizierung für WordPress mit Two-Factor
  • WordPress-Tuning, Teil 2: Cache-Plugins
  • WordPress-Tuning, Teil 1: Schlanke Themes - Gewicht und Leistung
  • Nginx & Ubuntu (+PHP-FPM)
  • Ein Child-Theme anlegen, schnell und einfach
Dieser Beitrag wurde am 11.02.2017 von Juergen Schulze in PHP, Wordpress veröffentlicht. Schlagworte: API plugin, get_users, Wordpres, Wordpress API Plugin, wp_generate_attachment_metadata.

Beitrags-Navigation

← Eine simple API für WordPress, Teil 4 Tweaking.com Windows Repair -Die Software gegen Krebs →

Suchen

Top 10 Posts

  • Create your own Kindle dictionary for every language for free - 150.418 views
  • Android New Micro SD Card – How to move all your data to the new card (Nandroid Backup) - 23.578 views
  • WordPress plugin: 404-to-start send every page not found error to start page - 22.250 views
  • WP-CleanUmlauts2-Plugin – WordPress Permalinks Umlaute automatisch konvertieren - 21.799 views
  • WordPress: Send Administrator E-Mails to all you users with Email Users 2 Plugin (Emu2) - 17.488 views
  • WordPress: Create unique content with Old Post Spinner - 14.789 views
  • Tutorial: Einfaches Backup von Debian mit Webmin, CurlFtpFS, Dump und Tar - 10.975 views
  • WordPress plugin: Display SQL Stats - 10.009 views
  • Sparkasse+ App Android Daten exportieren - 9.449 views
  • Eigene Kontaktdaten (per QR-Code) weitergeben - 9.069 views

Letzte Artikel

  • Wie synchronisiere ich ein Projekt mit einem schon existierendem Repository in GitHub?
  • Git und GitHub für Windows mit Sourcetree, Teil 3: Branches, Pull Requests und Fetch
  • Git und GitHub für Windows mit Sourcetree, Teil 2: Stages, Commit und Push
  • Git und GitHub für Windows mit Sourcetree, Teil 1: Grundlagen
  • Bash Script Vorlage mit Parameter-Verarbeitung

Letzte Kommentare

  • Git und GitHub für Windows mit Sourcetree, Teil 2: Stages, Commit und Push - 1manfactory.com - Blog of Jürgen Schulze bei Git und GitHub für Windows mit Sourcetree, Teil 1: Grundlagen
  • John Bent bei Create your own Kindle dictionary for every language for free
  • Juergen Schulze bei Kindle ohne Internet trotz WLAN (Fritz Box)
  • Ray bei Kindle ohne Internet trotz WLAN (Fritz Box)
  • Entwicklungsumgebung für Symfony auf Oracle VM mit Debian und Windows als Host, Teil 3 - 1manfactory.com - Blog of Jürgen Schulze bei Webmin für Debian installieren

Schlagwörter

  • ajax
  • Amazon
  • android
  • Apache
  • Apps
  • Backup
  • blog
  • Browser
  • client
  • Debian
  • Düsseldorf
  • Facebook
  • firefox
  • follower
  • git
  • github
  • Google
  • Googlemail
  • google map
  • ip
  • iphone
  • Kindle
  • Linux
  • Marketing
  • MySQL
  • Opera
  • PDF
  • PHP
  • Plugin
  • Plugins
  • Quick
  • repository
  • server
  • Service
  • SocialOomph
  • Software
  • spam
  • Template
  • tutorial
  • Tweetlater
  • Twitter
  • Wordpress
  • wordpress api
  • wordpress plugin
  • Xampp

Blogroll

  • de.fakenamegenerator.com Identitäten auf Knopdruck
  • iconspedia.com Jede Menge Icons und Sets
  • Ines-Biedermann Immobilen Düsseldorf Ines-Biedermann Immobilen Düsseldorf
  • iwebtool.com Free Webmaster Tools – Alles was man braucht auf einen Klick
  • Juergen Schulze Jürgen Schulze
  • MIGUmail.de Fighting Spam!
  • Null Papier Verlag Deutscher Verlag für digitale Publikationen. Kaufen Sie eBooks oder bieten Sie ihre Manuskripte an.
  • P2pbazar the next real eBay-Killer
  • Photovisi.com Online Collage erstellen
  • Picassotausch Meine Frau soll ihren Picasso bekommen
  • refollow.com Twitter Follower verwalten leicht gemacht
  • seitenreport.de Liefert eine automatisierte Websiteanalyse
  • SEO Tools SEO Tools – u.a. Search Engine Spider Simulator
  • Webmastercoffee Automatische Website-Analyse
Datenschutzerklärung Stolz präsentiert von WordPress