How do i call an api in php to save in mysql using cron jobs...??
i have an api and wanted to display it on my site, but i dont have experience about php and mysql. i know everything about html and css only.
Now i want to save an api data in mysql using cron jobs in php script and after that i will show it on my site, help me plz
If you want to acces API via web, and get output of it. You can use cURL (Client URL) PHP.
Set the require parameter(s) on API, and cURL will get the output from API.
And then you only need insert its output to database.
First, you have to make a function for connecting to your db, mysql_connect('localhost', $username_db, $pass_db)
Then you have to get output of cURL.
Then you create sql query on your php, $query = 'INSERT bla.. bla... bla...'
Finally, execute thats query using sql query function,