Skip to content

Instantly share code, notes, and snippets.

@tlovett1
Created June 17, 2014 16:23
Show Gist options
  • Save tlovett1/f5447b73e28507fd3583 to your computer and use it in GitHub Desktop.
Save tlovett1/f5447b73e28507fd3583 to your computer and use it in GitHub Desktop.
Test an Adobe Socket object to a WP multisite install
var server = 'observer.vipstage.10uplabs.com';
var page = '/wp-admin/admin-ajax.php?action=wp-browser-search';
var reply = "";
conn = new Socket;
conn.timeout=30;
conn.encoding = 'UTF-8';
if( conn.open( server + ':' + WPBrowserSearchPort ) ) {
conn.write( 'GET ' + page + ' HTTP/1.0' + "\n\n" );
reply = conn.read(999999);
alert(reply);
conn.close();
} else {
alert( 'Problem connecting to server' );
}
txt = reply.split( "\n\n" );
return txt[1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment