Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5845357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:25:23+00:00 2026-05-22T12:25:23+00:00

I am trying to purge a file through the MaxCDN API but it’s not

  • 0

I am trying to purge a file through the MaxCDN API but it’s not working. Here’s the code I’m using. The print_r doesn’t return any result.

function purge() {
    date_default_timezone_set('America/Los_Angeles');
    $date = date('c');
    $apiid = 'myapiid';
    $apikey = 'myapi';
    $auth_key = hash('sha256', $date.':'.$apikey.':purge');
    $url = 'http://softsailor.alexdumitru.netdna-cdn.com/wp-content/themes/ss3/includes/sprite.jpg';
    if (!class_exists('IXR_Client')) {
        require_once (ABSPATH . WPINC . '/class-IXR.php');
    }
    $client = new IXR_Client('api.netdna.com','/xmlrpc/cache',80);
    $client->timeout = 30;
    $client->query('cache.purge', $apiid, $auth_string, $date, $url);
    print_r($client->getResponse());
}

I turned debug on and I’m getting the following error
Something went wrong – -32300 : transport error – HTTP status code was not 200

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:25:23+00:00Added an answer on May 22, 2026 at 12:25 pm

    Hey Alex. I work at MaxCDN and here is a code example that I took from our Wiki:

    <?php
    date_default_timezone_set('America/Los_Angeles');
    include("lib/xmlrpc.inc");
    $cur = date('c');
    $apiKey = 'api-key';
    $apiUserId = 'api-user-id';
    $namespace = 'cache';
    $method = 'purge';
    $authString = hash('sha256', $cur . ':' . $apiKey . ':' . $method);
    
    // this is the url to purge
    $url= 'http://static.jdorfman.netdna-cdn.com/static/images/frugal-it-logo.png';
    $f=new xmlrpcmsg("$namespace.$method", array(php_xmlrpc_encode($apiUserId),
    php_xmlrpc_encode($authString), php_xmlrpc_encode($cur),
    php_xmlrpc_encode($url)));
    $c=new xmlrpc_client("/xmlrpc/cache", "api.netdna.com", 80,'http11');
    $r=&$c->send($f);
    print_r($r);
    ?>
    

    If you have any other questions or concerns feel free to get in contact with me: jdorfman at maxcdn dot com

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write some code using pure SQL using ASP.NET MVC. I assume
I've been using http://code.google.com/p/phpbrowscap/ for a project, and it usually works nice. But a
I'm trying to open a project file in the main editor of kdevelop, but
I've been at this for hours but it just isn't working. I'm trying to
I'm trying to create a simple file upload form for my website. I'm using
I am trying to make a dropdown menu with pure html and css, but
There's another post on SO relating to .NET -- not us. Pure PHP. Trying
I'm trying to port an application from using HAL to using pure udev. It
I'm experimenting with clojure and am trying to get a feel for using 3rd
I'm trying to export a javascript design element to a file in a Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.