Created
June 17, 2014 16:23
-
-
Save tlovett1/f5447b73e28507fd3583 to your computer and use it in GitHub Desktop.
Test an Adobe Socket object to a WP multisite install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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