I am working in Magento 1.9 . In some specific requirement i have to make a PHP file at Magento ROOT directory . Some API will hit that file and send some data to it . I have to save that data in DB in `core_config_data` . For this please see my code . 

```
<?php class Response{
public function __construct() { 
    umask(0); require "app/Mage.php"; 
    require "app/code/core/Mage/Core/Model/Config.php"; 
    $this->getResponse();}function getResponse(){
Mage::getConfig()->saveConfig("notification_data",json_encode($_GET));}}new Response(); 

```

> 
> But it gave the error Fatal error: Uncaught Error: Call to a member
>  function saveConfig() on null.
> 
> 
> 

Any body please help to fix the issue .