Fotolia api does not work for us (it used to).

206 views
Skip to first unread message

Frank Vandereijden

unread,
Apr 17, 2015, 5:54:51 AM4/17/15
to fotol...@googlegroups.com
Hello all,

Since a few month the fotolia api does not work any longer. What I read in this forum is that the http call should be changed to https. But this does not work
what we dit was the following:
Original code
1. function callFotoliaMethod($methode_name, $request_array) {
2.    $request_param = xmlrpc_encode_request($methode_name, $request_array);
3.    $context = stream_context_create(array('http' => array( 'method' => "POST", 'header' => "Content-Type: text/xml", 'content' => $request_param)));
4.    $file = file_get_contents("http://api.fotolia.com/Xmlrpc/rpc", false, $context);
5. //$file = file_get_contents("https://api.fotolia.com/Rest/1/Xmlrpc/rpc", false, $context);
6.    $response = xmlrpc_decode($file);
7.    if ($response && xmlrpc_is_fault($response)) {
8.        @trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
9.    } else { 
10.        return $response;
11.   }

change 1 : line 4  $file = file_get_contents("https://api.fotolia.com/Xmlrpc/rpc", false, $context);
change 2 : aditional to change 1: line 3 $context = stream_context_create(array('https' => array( 'method' => "POST", 'header' => "Content-Type: text/xml", 'content' => $request_param)));

neither changes did work so back to original file

change 3 : line 4 //$file = file_get_contents("http://api.fotolia.com/Xmlrpc/rpc", false, $context);
                line 5 $file = file_get_contents("https://api.fotolia.com/Rest/1/Xmlrpc/rpc", false, $context);

This did not work either. Error: Warning: file_get_contents(https://api.fotolia.com/Rest/1/Xmlrpc/rpc) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in /home/folerderex/domains/folderexpert.nl/public_html/fotolia_page.php on line 28

Any ideas?

Regards,

Frank

Andrey @ Fotolia

unread,
Jun 23, 2015, 2:18:20 PM6/23/15
to fotol...@googlegroups.com
The XMLRPC API has been deprecated and turned off. Multiple e-mails have been sent in regards to this, you'll need to switch to the REST API in order to keep using the API.
Reply all
Reply to author
Forward
0 new messages