Posted: November 27, 2015 at 9:36 am
|
Hi, when i try to open this in my browser: it show me the events, but when i use php cUrl ( CURLOPT_RETURNTRANSFER its true ) it just return 1 without any data… i cant find why |
Hi there, Can you post the code you’re using in context in a pastebin or a github gist so someone can take a look at the code? |
|
|
$curdate = date(“Y-m-d H:i:s”); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); $output=curl_exec($ch); curl_close($ch); Im using this simple snippet to test the api…. $ee3->getKey() generate an access key ( it works ) |
You might try removing the .pretty_json from the URL. Or try this: |
|
|
Hi, im using your script but it still return just 1… it works well with file_get_content, i cant figure out why cUrl dont. |
It works well with cURL for me. |
|
|
oh my bad… now it works… thanks |
You’re welcome. |
|
|
Hi again Josh, there is some example of request that create a registration to an event? |
Hi there, It’s in the documentation: https://eventespresso.com/wiki/json-api-add-on/#POST.2FPUT_.2Fregistrations |
|
|
Ok so it means that all that data are required? “body”=>json_encode(array( )) |
|
sorry for bad indentation…. ive created a pastebin |
Yes, the documentation says this:
I can advise that you follow the example in the documentation closely. |
|
The support post ‘ee3 curl API call return 1’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.