• da_fonz

    (@da_fonz)


    I’m trying to post to a wordpress install using xmlrpc.php and I can’t for the life of me figure out the format I should be passing dateCreated.

    In line 1310 of the xmlrpc, we see the content struct being modified by the getISO() function, but how is that possible?

    $dateCreated = $content_struct[‘dateCreated’]->getIso();

    For what it’s wroth, here’s what I’m trying to pass as a date which as far as I know is within spec…

    $content[‘dateCreated’] = date(‘Ymd H:i:00’,mktime(0,0,0,12,12,2007));
    $content[‘dateCreated’] = str_replace(‘ ‘,’T’,$content[‘dateCreated’]);

    Thanks for any help you can provide

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should be able to pass a UNIX timestamp, so instead of
    $content['dateCreated'] = date('Ymd H:i:00',mktime(0,0,0,12,12,2007));
    do
    $content['dateCreated'] = mktime(0,0,0,12,12,2007);

    I’m also having this same problem, but I AM using a unix timestamp.

    This is line 1849 of the xmlrpc.php file.

    $dateCreated = $content_struct[‘dateCreated’]->getIso(); is trying to find the method “getIso” as a member of a string value…which frankly doesn’t make a lick of sense. It gives me the typical non member php error when it gets to that point in the mw_editPost function.

    I’m calling the metaWeblog.editPost function from a flash front end and everything runs fine up until that point, then the PHP dies.

    Is this just an error on the developers part or am I simply misunderstanding something there?

    Thanks for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘XML-RPC problems’ is closed to new replies.