url = $url; $this->opts = $opts; $this->waveResponse = ''; } /** * Submits the HTML source for testing * * @param bool $printInfo whether or not to print the output from curl_getinfo (usually for debugging only) * * @return string the results, formatted as JSON */ public function submit( $printInfo = false ) { $wave_url = esc_url_raw( add_query_arg( $this->opts, $this->url ) ); $args = array( 'method'=>'GET', 'body' => '', 'headers' => '', 'sslverify' => false, 'timeout' => 60 ); $result = wp_remote_post( $wave_url, $args ); if ( true == $printInfo ) { echo '

Query Info

';
            print_r( $result );
            echo '
'; } if ( is_wp_error( $result ) ) { $this->waveResponse = $result->errors; } else { //the test results $this->waveResponse = $result; } } }