Export Shopify Blogs

Shopify API Connection

Establish shopify API connection and build the base url.

Export_Import_Blogs_Shopify_API

Export Shopify Blogs

Please click here to refer other PHP tutorials and how to create blog post using shopify API.

 /**
 * Get base url and access the blog data
 * @return type
 */

public function getBlogs() {
    
    $api = 'blogs.json';
    $baseUrl = $this->objauth->getApiUrl();
    $blogs = $this->objaccess->getContent($baseUrl.$api);
    return $blogs;
    
}

/**
 * Get Data using api
 * @param type $url
 * @return type
 */
public function getContent( $url ) {
 
    $response = file_get_contents( $url );
    $data = json_decode( $response, true );
    return $data;
    
}

Share this Tutorial