I have the need to create/update a contact from an external site. If I understand correctly, the only way to do this is to use Rest API. In my test I had no problem to read the database, but when using the "create" action, as in the following PHP code:
$url='http://.../sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=...&key=...&json={"sequential":1,"first_name":"Gianni","last_name":"Predan"}';
$responsestr = file_get_contents($url);
I obtain the error "All requests that modify the database must be http POST, not GET."
What should I do? Thanks