We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for bulk operations see pr ( work in progress ) Thnks.
Example call:
`<?php $subscribers = [ [ 'email' => '[email protected]', 'confirmed' => 1, 'htmlemail' => 1, 'password' => '', 'disabled' => 0, 'foreignkey' => '', 'subscribepage' => 0, ], [ 'email' => '[email protected]', 'confirmed' => 1, 'htmlemail' => 1, 'password' => '', 'disabled' => 0, 'foreignkey' => '', 'subscribepage' => 0, ]
]; $url = 'http://xxxx/lists/admin/?page=call&pi=restapi';
//initialize cUrl for remote content $c = curl_init(); curl_setopt( $c, CURLOPT_COOKIEFILE, 'phpList_RESTAPI_Helper' ); curl_setopt( $c, CURLOPT_COOKIEJAR, 'phpList_RESTAPI_Helper' ); curl_setopt( $c, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $c, CURLOPT_POST, 1 );
//Call for the session-id via /login curl_setopt( $c, CURLOPT_URL, $url ); curl_setopt( $c, CURLOPT_POSTFIELDS, 'cmd=login&login=admin&password=xxxx' ); $result = curl_exec( $c ); $result = json_decode( $result ); //Get all lists in phpList via /listsGet curl_setopt( $c, CURLOPT_URL, $url ); curl_setopt( $c, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $c, CURLOPT_POST, 1 ); curl_setopt( $c, CURLOPT_POSTFIELDS, "cmd=subscriberBulkAdd&subscribers=".urlencode(json_encode($subscribers)) ); $result = curl_exec( $c ); $result = json_decode( $result );
//Now close the cUrl when finished curl_close( $c );
//Dump all lists in phpList via /listsGet var_dump( $result->data );`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Support for bulk operations see pr ( work in progress )
Thnks.
Example call:
`<?php
$subscribers = [
[
'email' => '[email protected]',
'confirmed' => 1,
'htmlemail' => 1,
'password' => '',
'disabled' => 0,
'foreignkey' => '',
'subscribepage' => 0,
],
[
'email' => '[email protected]',
'confirmed' => 1,
'htmlemail' => 1,
'password' => '',
'disabled' => 0,
'foreignkey' => '',
'subscribepage' => 0,
]
];
$url = 'http://xxxx/lists/admin/?page=call&pi=restapi';
//initialize cUrl for remote content
$c = curl_init();
curl_setopt( $c, CURLOPT_COOKIEFILE, 'phpList_RESTAPI_Helper' );
curl_setopt( $c, CURLOPT_COOKIEJAR, 'phpList_RESTAPI_Helper' );
curl_setopt( $c, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $c, CURLOPT_POST, 1 );
//Call for the session-id via /login
curl_setopt( $c, CURLOPT_URL, $url );
curl_setopt( $c, CURLOPT_POSTFIELDS, 'cmd=login&login=admin&password=xxxx' );
$result = curl_exec( $c );
$result = json_decode( $result );
//Get all lists in phpList via /listsGet
curl_setopt( $c, CURLOPT_URL, $url );
curl_setopt( $c, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $c, CURLOPT_POST, 1 );
curl_setopt( $c, CURLOPT_POSTFIELDS, "cmd=subscriberBulkAdd&subscribers=".urlencode(json_encode($subscribers)) );
$result = curl_exec( $c );
$result = json_decode( $result );
//Now close the cUrl when finished
curl_close( $c );
//Dump all lists in phpList via /listsGet
var_dump( $result->data );`
The text was updated successfully, but these errors were encountered: