I want a php script that automatically adds data to my database from an api response (I already set the api response up)
here is what I currently have...
I basically just need it to automatically add data to database.
<?php
//connect to mysql db
$con = mysql_connect("myip","user","pw") or die('Could not connect: ' . mysql_error());
//connect to the employee database
mysql_select_db("dbname", $con);
//read the json file contents
$data = file_get_contents('http://urloffileconents/');
//convert json object to php associative array
//$data = json_decode($jsondata, true);
//
//get the employee details
$id = $data['customColumns']['totals'];
$name = $data['advertiserCost'];
$sql = "INSERT INTO db(another, one)
VALUES('$id', '$name')";
if(!mysql_query($sql,$con))
{
die('Error : ' . mysql_error());
}
?>
Hi, i hope you're doing well.
I've just read your project's description and i would like to help you with it.
I'm an experienced web developer with the necessary skills for getting this job done.
Responsibility and quality guaranteed,
Torricelli
$25 USD en 2 jours
5,0 (200 commentaires)
6,3
6,3
33 freelances proposent en moyenne $29 USD/heure pour ce travail
I can create php script to insert data into mysql database from API response. I will complete this work in next few hours.
Looking for your reply to start this work immediately.
Hi I can modify your script right now to add data to database . I will need database connection information , access to database. Allow me to handle this for you.
Dear Hiring Manager,
How are you?
I am able to do this work. I have more than 3 years of experience in PHP,MySQL.
I am ready to start right now.
Thank you.
Regards,
Keval Thacker
Hi, I have a bit of spare time on my hands now. Let's do this.
Your script looks almost correct, it must be specific field names and mapping between JSON -> MySQL table that you are having trouble with.
Happy to start right away. Look forward to your reply.
Regards.. Richard from New Zealand
Hi,
I'm experienced in programming PHP for 3 years. I also make my own optimized API for my project. I sometimes work with Facebook and Twitter's API too.
I think I can help your project.
#This is my first time to work by hour/week.
Hi, I am php developer and have recently completed a complete large project in php. I can show you demo. I can write php script for. I will love to discuss further details with you. Please contact me.
Thank you
Hi,
I have saw the project description and I have the skills you are looking for. I have good skills on mysql and php so i can fix your stuff done in quick time. I can give you daily update's as I am a professional Web Designer/ Developer. I will upload it to on my server so you can check daily how's going on. I can also fulfill your requirement with full efficiency as I am a professional Web Designer/ Developer.
With 3+ year of working experience I have always provide best quality work.
I am new on freelancer but I have positive attitude toward work.
hope to hear you.
Thanks,
Aditya.
Have worked on a previous project which did the same thing, will be able to do it pretty smooth because of exposure I have got.
Also will handle certain security measures before inserting data into database , will code for scalability