Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $username = "user";
- $password = "pass";
- $dbname = "dbname";
- mysql_connect($host,$username,$password) or die(mysql_error());
- mysql_select_db($dbname) or die(mysql_error());
- mysql_query("SET NAMES utf8");
- $graph = file_get_contents("https://holanu.com/json/log/post?id=33333"); // this is correct
- $decode = json_decode($graph);
- foreach ($decode->data as $account) {
- mysql_query(UPDATE car
- SET acc='.mysql_real_escape_string($account->acc).'
- WHERE user_id='mysql_real_escape_string($account->user_id)'
- );
- }
- // impt
- function get_html($url) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch, CURLOPT_FAILONERROR, 0);
- $data = curl_exec($ch);
- curl_close($ch);
- return $data;
- }
- ?>
Add Comment
Please, Sign In to add comment