External api call using wordpress

Your curl request should work from the command line. Put you will want to use make it in a PHP file: $ch = curl_init(); $url = “https://api.com/”; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); http_build_query(array(‘postvar1’ => ‘value1’))); // Receive server response … curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $api_output = curl_exec($ch); curl_close($ch); Which php file you put the curl … Read more

get content from json api to post

why are you using plugin to fetch data, simply use the jqeury ajax function or jquery get method save the data into the wordpress post. like:- $.get( “https://api.hasoffers.com/v3/Affiliate_Affiliate.json?Method=getAccountManager&api_key=MY_API_KEY&NetworkId=SAMPLE”, function( data ) { do what ever you to with data, insert to post or whatever });

Group posts by weekly or monthly

Sorry, but what’s the use scope of JSON API plugin here? The only thing you need is ad the week (or wahtever information you need) in the markup of the page. Assuming your loop is somethin like this: <ul id=”postlist”> <?php while( have_posts() ) : the_post(); ?> <li id=”post_<?php the_ID(); ?>” class=”post”> <h2><?php the_title(); ?></h2> … Read more