mysterbx Posted March 4, 2008 Share Posted March 4, 2008 Hello, I found this code on php.net <?php $ch = curl_init("http://www.mysticwarez.com/"); $fp = fopen("txt/example_homepage.txt", "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); ?> it writes info to the file, but how can I write it to mysql database? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted March 4, 2008 Share Posted March 4, 2008 IF (big if) you can write to a file on a remote server, you could have that server look for the file and use it to update a MySQL database. the more common way of accessing a remote MySQL database is via direct connection to MySQL using mysql_connect(); Quote Link to comment Share on other sites More sharing options...
mysterbx Posted March 4, 2008 Author Share Posted March 4, 2008 yes, i know that, but sometimes it doesnt work... If i start curl script and close it while it is in the middle of process, I get the results from my one site, bu I dont get them on my other sites... What the problem? It cant be the script since im using the same one on all the sites Quote Link to comment Share on other sites More sharing options...
mysterbx Posted March 6, 2008 Author Share Posted March 6, 2008 ok... ... then i'll use the first code Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.