Karl Groves

Tech Accessibility Consultant
  • Web
  • Mobile
  • Software
  • Hardware
  • Policy
+1 443.875.7343

The no-CURL way to submit a request to Tenon API

A few months ago, I posted Tutorial: Creating a PHP class to use with Tenon.io. Someone asked me “What about servers that don’t have CURL? Here you go. Use the class in that post, but swap out the submit() function for this:

function submit(){

    $content = http_build_query($this->opts);

    $options = array(
        'http' => array(
            'method' => 'POST',
            'content' => $content

    $context = stream_context_create($options);
    $this->tenonResponse = file_get_contents($this->url, false, $context);

In fact, using streams may even be faster than CURL!

I’m available for accessibility consulting, audits, VPATs, training, and accessible web development,¬†email me directly at karl@tenon.io or call me at +1 443-875-7343