curl_setopt($ch, CURLOPT_FILE, $fp) which is used for output to a file. Is any way to set
output to database.
curl_setopt($ch, CURLOPT_FILE, $fp) which is used for output to a file. Is any way to set
output to database.
No - send the output to a variable, and then insert the data in the variable to a database using mysql_query.
In general, inserting data into a database is a lot more complex than inserting data to a file (how do you connect to the database? what sort of database? what table? what column? update or insert? etc).
Yes there is. You will need to capture the output of the request as a string:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
and write code to store it in the database :)