function get_current_picture_profile($username) { $picture = str_get_html(get_url_content('https://twitter.com/' . $username))->find('img.ProfileAvatar-image'); if (isset($picture[0]->attr['src'])) { return $picture[0]->attr['src']; } else { return 'http://a0.twimg.com/sticky/default_profile_images/default_profile_5_200x200.png'; } }
function cron_get_page_details_from_fb($ids) { $datos = get_url_content('https://graph.facebook.com/fql?q=SELECT+page_id,username,name,about,description,pic_small,pic_cover,is_verified+FROM+page+WHERE+page_id+IN(' . $ids . ')'); $datosarray = json_decode($datos, true); if (isset($datosarray['data']) && count($datosarray['data']) > 0) { return $datosarray['data']; } return NULL; }
function generate_data_results($page_id) { error_log(' Generate Page (i): ' . date('d m Y H:i:s')); $json_data_page = get_url_content('http://www.owloo.com/wservice/table_results/facebook_pages.php?generate_new_page=true&generate_new_page_id=' . $page_id); error_log(' Generate Page (f): ' . date('d m Y H:i:s')); echo $json_data_page; error_log(' Generate Results (f): ' . date('d m Y H:i:s')); die; }
function cron_get_likes_talking_about_from_fb($ids) { /*$datos = file_get_contents('https://graph.facebook.com/fql?q=SELECT+page_id,fan_count,talking_about_count+FROM+page+WHERE+page_id+IN('.$ids.')');*/ $datos = get_url_content('http://23.88.103.193/~david/owl/gat_fb_data_like.php?ids=' . $ids); $datosarray = json_decode($datos, true); if (isset($datosarray['data']) && count($datosarray['data']) > 0) { return $datosarray['data']; } return NULL; }
function get_veoh($url) { // get the music_id $ari = explode("/", $url); $v_id = array_pop($ari); // retrieve xml files $data = get_url_content("http://www.veoh.com/rest/video/" . $v_id . "/details"); // retrieve path into music files $hasil = get_inbetween("fullPreviewHashPath", "fullPreviewToken=", $data); $hasil = str_replace(array('"', '='), "", $hasil); // yell it loud return trim($hasil); }
function get_current_picture_profile($username) { $html = get_url_content('http://instagram.com/' . $username); $doc = new DOMDocument(); $doc->loadHTML($html); foreach ($doc->getElementsByTagName('meta') as $meta) { if ($meta->getAttribute('property') == 'og:image') { if ($meta->getAttribute('content') != '') { return $meta->getAttribute('content'); } } } return 'http://a0.twimg.com/sticky/default_profile_images/default_profile_5_200x200.png'; }
function getNumAudience($code, $key_language, $_accessToken, $_accountId, $_pageId, $_pageName) { $numAudience = ""; try { $datos = get_url_content('https://graph.facebook.com/act_' . $_accountId . '/reachestimate?access_token=' . $_accessToken . '&accountId=' . $_accountId . '&bid_for=["conversion"]¤cy=USD&endpoint=/act_' . $_accountId . '/reachestimate&locale=es_LA&method=get&pretty=0&targeting_spec={"genders":[],"age_max":65,"age_min":13,"regions":[],"countries":[],"cities":[],"zips":[],"keywords":[],"connections":[],"friends_of_connections":[],"relationship_statuses":null,"interested_in":[],"college_years":[],"education_statuses":[],"locales":[' . $key_language . '],"user_adclusters":[],"user_os":[],"user_device":[],"wireless_carrier":[],"work_positions":[],"education_majors":[],"education_schools":[],"work_employers":[],"page_types":null,"geo_locations":{"countries":["' . $code . '"],"cities":[],"regions":[],"zips":[]},"excluded_geo_locations":{"countries":[],"cities":[],"regions":[],"zips":[]}}'); $datosarray2 = json_decode($datos, true); //print_r($datosarray2 ); die(); $numAudience = $datosarray2['users']; if ($numAudience != "" && is_numeric($numAudience)) { return $numAudience; } } catch (Exception $e) { return false; } return false; }
function instagram_user_posts($user_id, $max_id = NULL, $min_id = NULL, $pagination = NULL) { $limit = ''; if (!empty($max_id)) { $limit = '&max_id=' . $max_id; } if (!empty($min_id)) { $limit = '&min_id=' . $min_id; } if (empty($pagination)) { $data = get_url_content("https://api.instagram.com/v1/users/{$user_id}/media/recent/?client_id=" . INSTAGRAM_CLIENT_ID . "&count=" . INSTAGRAM_COUNT_DATA . $limit); } else { $data = get_url_content($pagination); } return json_decode($data, true); }
function handle_row($row, $conn) { global $row_tmp; $url = $row['url']; $content = get_url_content($url); if ($content == null) { return; } else { $row_tmp[$url] = array(); // 更新最後檢查的時間,先存入暫時的陣列 date_default_timezone_set('Asia/Taipei'); $row_tmp[$url]['last_check'] = date('Y/m/d l H:i:s', time()); // 日期減一,先存入暫時的陣列 $row_tmp[$url]['remaining'] = $row['remaining'] - 1; // 檢查推文數量是否有變化,先存入暫時的陣列 $row_tmp[$url]['push_count'] = substr_count($content, "push-content"); // 偵測到這篇文章有新增推文的話,就設定信件內容,等等再寄出 if ($row_tmp[$url]['push_count'] != $row['push_count']) { set_message($row); } } }
function getNumAudience($code, $age_min, $age_max, $gender, $_accessToken, $_accountId, $_pageId, $_pageName) { $numAudience = ""; try { $datos = get_url_content('https://graph.facebook.com/act_' . $_accountId . '/reachestimate?access_token=' . $_accessToken . '&accountId=' . $_accountId . '&bid_for=["conversion"]¤cy=USD&endpoint=/act_' . $_accountId . '/reachestimate&locale=es_LA&method=get&pretty=0&targeting_spec={"genders":[' . $gender . '],"age_max":' . $age_max . ',"age_min":' . $age_min . ',"regions":[],"countries":[],"cities":[],"zips":[],"keywords":[],"connections":[],"friends_of_connections":[],"relationship_statuses":null,"interested_in":[],"college_years":[],"education_statuses":[],"locales":[],"user_adclusters":[],"user_os":[],"user_device":[],"wireless_carrier":[],"work_positions":[],"education_majors":[],"education_schools":[],"work_employers":[],"page_types":null,"geo_locations":{"countries":["' . $code . '"],"cities":[],"regions":[],"zips":[]},"excluded_geo_locations":{"countries":[],"cities":[],"regions":[],"zips":[]}}'); $datosarray2 = json_decode($datos, true); //print_r($datosarray2 ); die(); if (isset($datosarray2['users'])) { $numAudience = $datosarray2['users']; if ($numAudience != "" && is_numeric($numAudience)) { return $numAudience; } } else { if (isset($datosarray2['error'])) { if ($datosarray2['error']['code'] != 190) { send_email('country_3_1', 'Owloo ERROR - Pais AGE 3.1', 'ERROR en la captura de datos.', true, 'Facebook error code - Pais - ID = ' . $_SERVER['argv'][1] . ' - Code: ' . $datosarray2['error']['code'] . ' - Mensaje: ' . $datosarray2['error']['message']); } } } } catch (Exception $e) { return false; } return false; }
function insert_url_temp($site_id, $url, $level) { global $db; $url_htmlcode = get_url_content($url); $url_htmlcode = get_encoding($url_htmlcode, "GB2312"); $links = get_links($url_htmlcode, $url, 1, $url); //echo $url; // print_r ($links); foreach ($links as $key => $value) { $array = array('no_id' => $key, 'site_id' => $site_id, 'updatetime' => $level, 'url' => $value); $query = $db->query("select * from ve123_links_temp where url='" . $value . "'"); $num = $db->num_rows($query); if ($num == 0) { $db->insert("ve123_links_temp", $array); } else { $db->update("ve123_links_temp", $array, "url='" . $value . "'"); } } }
function add_links($url, $is_index_page = true, $num = '') { global $db; $new_links = array(); $j = 1; $url_htmlcode = get_url_content($url); $url_htmlcode = get_encoding($url_htmlcode, "GB2312"); $links = get_links($url_htmlcode, $url, 1, $url); if ($is_index_page) { foreach ($links as $value) { $new_links[] = GetSiteUrl($value); } } else { $new_links = $links; } $new_links = distinct_array($new_links); foreach ($new_links as $value) { echo $value . "<br>"; flush(); $query = $db->query("select * from ve123_links where url='{$value}'"); $num = $db->num_rows($query); if ($num == 0) { if (!add_update_link($value, "", "", "add")) { continue; } $j++; if (!empty($num)) { if ($j >= $num) { exit; } } } } }
function get_fb_page_id_from_url($url) { if (strpos($url, 'facebook.com/') === false) { } else { $url = add_https_to_url($url); } $datos = get_url_content('https://graph.facebook.com/' . $url); //$datos = @file_get_contents('http://23.88.103.193/~david/owl/get_fb_data.php?url='.urlencode('https://graph.facebook.com/'.$url)); $datos = json_decode($datos, true); if (isset($datos['id'])) { return $datos['id']; } return NULL; }
function rebuild_search_indexes() { global $success_msg; global $error_msg; global $warning_msg; global $all_settings; global $indexable_folders; $index_folder = get_setting('search_indexes_folder', $all_settings); try { setlocale(LC_CTYPE, LOCALE); Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive()); $index = new Zend_Search_Lucene($index_folder, true); $files_to_index = get_website_files($indexable_folders); foreach ($files_to_index as $html_file => $page_url) { if (can_index_website_file($html_file)) { $f1 = strtolower($html_file); if (end_with($f1, 'html') || end_with($f1, 'htm')) { $file_content = file_get_contents($html_file); } elseif (end_with($f1, 'php')) { if (is_http_code_200($page_url)) { $file_content = get_url_content($page_url); } } if (isset($file_content)) { $file_content = '<html>' . strstr($file_content, '<head'); $doc = Zend_Search_Lucene_Document_Html::loadHTML($file_content, true, 'UTF-8'); $doc->addField(Zend_Search_Lucene_Field::Text('url', $page_url, 'UTF-8')); $index->addDocument($doc); flush(); } } } $broken_urls = array(); foreach (get_dynamic_urls(get_setting('search_dynamic_pages', $all_settings)) as $url) { if (is_http_code_200($url)) { $content = get_url_content($url); $content = '<html>' . strstr($content, '<head'); $doc = Zend_Search_Lucene_Document_Html::loadHTML($content, true, 'UTF-8'); $doc->addField(Zend_Search_Lucene_Field::Text('url', $url, 'UTF-8')); $index->addDocument($doc); flush(); } else { array_push($broken_urls, $url); } } if (file_exists($index_folder)) { if (count($broken_urls) > 0) { $warning_msg = '<p>The website was successfully indexed, but the following URL\'s were skipped because they are broken:</p>'; $warning_msg .= '<ul class="disc">'; foreach ($broken_urls as $broken_url) { $warning_msg .= '<li><a href="' . $broken_url . '">' . $broken_url . '</a></li>'; } $warning_msg .= '</ul>'; $warning_msg .= '<p>Please remove them from the "List of dynamic pages" field.</p>'; } else { $success_msg = 'The website was successfully indexed.'; } } else { $error_msg = 'An error occurred during the website indexing. The error message is: the folder that stores the website indexes couldn\'t be created'; } } catch (Exception $e) { $error_msg = 'An error occurred during the website indexing. The error message is: ' . $e->getMessage(); } }
<?php die; require_once '../config.php'; //UPDATE `facebook_country_3_1` c SET id_continent = (SELECT id_continent FROM country WHERE code = c.code) WHERE code in (SELECT code FROM country) $datos = get_url_content('https://graph.facebook.com/search?q=&type=adcountry&limit=1000'); $datosarray = json_decode($datos, true); //print_r($datosarray); foreach ($datosarray['data'] as $data) { $sql = "INSERT INTO facebook_country_3_1 VALUES(null, '\$1', '', '\$2', '', '', 0, 0, " . ($data['supports_region'] == 'true' ? 1 : 0) . ", " . ($data['supports_city'] == 'true' ? 1 : 0) . ", 1, 1);"; $res = db_query($sql, array($data['country_code'], $data['name']), true); } $datos = get_url_content('https://graph.facebook.com/search?q=&type=adcountry&limit=1000&locale=es_LA'); $datosarray = json_decode($datos, true); foreach ($datosarray['data'] as $data) { $sql = "UPDATE facebook_country_3_1 SET nombre = '\$1' WHERE code like '\$2';"; $res = db_query($sql, array($data['name'], $data['country_code']), true); } echo 'FIN';
echo 'Error while parsing the document'; exit; } $s = simplexml_import_dom($dom); $tmp_arr = simplexml2array($s); //printout($tmp_arr); //exit; foreach ($tmp_arr["itemclasses"]["itemclass"] as $category) { $recCat->code = $category["@attributes"]["code"]; $recCat->name_est = $category["@attributes"]["default_name"]; $recCat->master = $category["@attributes"]["master"]; $recCat->masters = $category["@attributes"]["masters"]; $arrCategories[$category["@attributes"]["code"]] = $recCat; unset($recCat); } $xml = get_url_content("/ocra_4room/transport/xmlcore.asp?get=1&what=item", "directo5.gate.ee", 443, "ssl://"); $dom = new domDocument(); $dom->loadXML($xml); if (!$dom) { echo 'Error while parsing the document'; exit; } $s = simplexml_import_dom($dom); $tmp_arr = simplexml2array($s); //printout($tmp_arr); //exit; foreach ($tmp_arr["items"]["item"] as $product) { $recProd->code = $product["@attributes"]["code"]; $recProd->name_est = $product["@attributes"]["default_name"]; $recProd->price = round($product["@attributes"]["retail_price"]); $recProd->special_price1 = $product["@attributes"]["special_price1"];
###### Controller ###### ############################################################ # Make instances $html = new simple_html_dom(); $zip = new ZipArchive(); # Transcript path $url = get_transcript($url); # Course path $path = get_path($url) or e("Unable to fetch transcript from: <strong><i>{$url}</i></strong>", TRUE); $zip_file = $path['full'] . '.zip'; # Check file: existence and lifetime if (file_exists($zip_file) && time() - filemtime($zip_file) < FILE_LIFETIME) { e(get_file_address($zip_file)); } # Get URL content $content = get_url_content($url) or e("Unable to load data from: <strong><i>{$url}</i></strong>", TRUE); # Load the DOM $html->load($content); $chs = $html->find('td.tChap') or e("Unable to find chapters on: <strong><i>{$url}</i></strong>", TRUE); if ($zip->open($zip_file, ZipArchive::CREATE) === TRUE) { for ($i = 0; $i < count($chs); $i++) { process_chapter($chs[$i], $path['course'], $i); } $zip->close(); $output = array('data' => get_file_address($zip_file), 'err' => FALSE); } else { $output = array('data' => 'Zip compression failed!', 'err' => TRUE); } # Clear DOM object $html->clear(); # Free memory
function add_links($url, $is_index_page = true, $num = '') { global $db; $new_links = array(); $j = 1; $url_htmlcode = get_url_content($url); $url_htmlcode = get_encoding($url_htmlcode, "GB2312"); $links = get_links($url_htmlcode, $url, 1, $url); echo "<br><b>url="; print_r($url); echo "<br></b>"; if ($is_index_page) { foreach ($links as $value) { $new_links[] = GetSiteUrl($value); } } else { $new_links = $links; } $new_links = distinct_array($new_links); foreach ($new_links as $value) { //echo $value."<br>"; //ob_flush(); //flush(); $query = $db->query("select * from ve123_links where url='{$value}'"); $num = $db->num_rows($query); if ($num == 0) { echo "<font color=#C60A00><b>抓取到:</b></font>" . $value . "<br>"; if (!add_update_link($value, "", "", "add")) { continue; } $j++; if (!empty($num)) { if ($j >= $num) { exit; } } } else { echo "<b>已存在了:</b>"; echo "<a href=" . $value . " target=_blank>" . $value . "</a>"; echo "<br>"; } ob_flush(); flush(); } }
} function get_page($id_page) { $sql = "SELECT id_page, fb_id, username\n FROM facebook_page\n WHERE id_page = " . mysql_real_escape_string($id_page) . ";"; $res = mysql_query($sql) or die(mysql_error()); if ($fila = mysql_fetch_assoc($res)) { return array('fb_id' => $fila['fb_id'], 'username' => $fila['username']); } return NULL; } $access_token = get_fb_page_access_token(); $query = "SELECT id_page, fb_id, username, parent\n FROM facebook_page\n ORDER BY 1 Limit 1000, 2000;"; $que = mysql_query($query) or die(mysql_error()); echo '<table>'; while ($fila = mysql_fetch_assoc($que)) { $global_brand = get_url_content('https://graph.facebook.com/' . $fila['fb_id'] . '?fields=global_brand_parent_page.username&access_token=' . $access_token); $global_brand = json_decode($global_brand, true); if (isset($global_brand['global_brand_parent_page'])) { echo '<tr>'; echo '<td>'; echo $fila['username']; echo '</td>'; echo '<td>'; echo $global_brand['global_brand_parent_page']['username']; echo '</td>'; echo '<td>'; echo $global_brand['global_brand_parent_page']['id']; echo '</td>'; if (!empty($fila['parent'])) { $parent = get_page($fila['parent']); echo '<td>';
function instagram_user_data($user_id) { $data = get_url_content("https://api.instagram.com/v1/users/{$user_id}/?client_id=" . INSTAGRAM_CLIENT_ID); return json_decode($data, true); }
<?php require_once __DIR__ . '/../../config.php'; include __DIR__ . '/simple_html_dom.php'; $picture = str_get_html(get_url_content('https://twitter.com/latamclick'))->find('img.ProfileAvatar-image'); echo $picture[0]->attr['src'];
function getHttpUrl($url, $rel = '') { return get_url_content($url); }
function instagram_user_posts($user_id) { $data = get_url_content("https://api.instagram.com/v1/users/{$user_id}/media/recent/?client_id=" . INSTAGRAM_CLIENT_ID . "&count=" . INSTAGRAM_COUNT_DATA); return json_decode($data, true); }
function add_job() { /* 如果沒有 404 的話,$content 的內容會是「整個 HTML」 e.g. <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width"> <meta name="robots" content="all" /> ... */ $content = get_url_content($_POST["url"]); if ($content == null) { $return_json["extra_message"] = "An error occurred when parsing the url. (404 page not found)"; } else { $return_json = fetch_meta_data($content); $return_json["extra_message"] = save_to_database($return_json); } // 以 AJAX 回傳結果給 client 端 echo json_encode($return_json); }
function instagram_search_username($username) { //$username = instagram_clean_username($username); $data = get_url_content("https://api.instagram.com/v1/users/search?q={$username}&client_id=" . INSTAGRAM_CLIENT_ID); return json_decode($data, true); }
<?php function get_url_content($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; } $tag = $_GET['tag']; $client_id = '04e770ce699e44eb80bcf26cf929aa5a'; $count_data = 100; echo '<h1>Cantidad de posteos:</h1>'; $data = get_url_content("https://api.instagram.com/v1/tags/{$tag}?client_id={$client_id}"); $data = json_decode($data, true); echo $data['data']['media_count']; echo '<h1>Últimos posteos:</h1>'; $data = get_url_content("https://api.instagram.com/v1/tags/{$tag}/media/recent?client_id={$client_id}&count={$count_data}"); $data = json_decode($data, true); ?> <table><tr><th>Tags</th><th>Comments</th><th>Likes</th><th>Post by</th><th>Link</th></tr> <? foreach ($data['data'] as $value) { echo '<tr><td>'.count($value[tags]).'</td><td>'.$value[comments][count].'</td><td>'.$value[likes][count].'</td><td>'.$value[user][full_name].'</td><td>'.$value[link].'</td></tr>'; } ?> </table><br><br><br> <? print_r($data);
<?php require_once __DIR__ . '/../config.php'; $query = 'SELECT owloo_user_id, owloo_screen_name FROM `twitter_user_master` WHERE owloo_user_twitter_id = \'0\' ORDER BY 1;'; $que = db_query_tw($query, array()); while ($fila = mysql_fetch_assoc($que)) { /***** 1 *****/ /*$data = get_url_content('http://mytwitterid.com/api/?screen_name='.$fila['owloo_screen_name']); $data = json_decode($data, true); if(isset($data[0]['id_str'])){ if(strtolower($data[0]['screen_name']) == strtolower($fila['owloo_screen_name'])){ $query = 'UPDATE `twitter_user_master` SET owloo_user_twitter_id = \'$1\' WHERE owloo_user_id = $2;'; $result = db_query_tw($query, array($data[0]['id_str'], $fila['owloo_user_id']), true); } }*/ /***** 2 *****/ $data = get_url_content('http://www.idfromuser.com/getID.php?service=twitter&username='******'owloo_screen_name']); if (!empty($data)) { $query = 'UPDATE `twitter_user_master` SET owloo_user_twitter_id = \'$1\' WHERE owloo_user_id = $2;'; $result = db_query_tw($query, array($data, $fila['owloo_user_id']), true); } else { echo 'Die: ' . $fila['owloo_screen_name']; die; } }
<?php require_once '../owloo_config.php'; $data = get_url_content('http://api.klout.com/v2/identity.json/twitter?screenName=katyperry&key=gy4u8x32rvmeugcqpdun634b'); $data = json_decode($data, true); if (isset($data['id'])) { $klout_data = get_url_content('http://api.klout.com/v2/user.json/' . $data['id'] . '/score?key=gy4u8x32rvmeugcqpdun634b'); print_r(json_decode($klout_data, true)); }
//print_r($data); //echo '<h1>Posteos:</h1>'; $data = get_url_content("https://api.instagram.com/v1/users/{$user_id}/media/recent/?client_id={$client_id}&count={$count_data}"); $data = json_decode($data, true); print_r($data); die; //echo '<h1>Posteos:</h1>'; $data = get_url_content("https://api.instagram.com/v1/users/{$user_id}/media/recent?count={$count_data}&max_id=328924686631226068_253310177&client_id={$client_id}"); $data = json_decode($data, true); //print_r($data); /*foreach ($data['data'] as $value) { echo ($count++).') '.$value['link'].'<br/>'; }*/ echo '<h1>Siguiendo a:</h1>'; $data = get_url_content("https://api.instagram.com/v1/users/{$user_id}/follows?client_id={$client_id}"); $data = json_decode($data, true); //print_r($data); /*foreach ($data['data'] as $value) { echo $value[full_name].'<br/>'; }*/ echo '<h1>Seguidores:</h1>'; $data = get_url_content("https://api.instagram.com/v1/users/{$user_id}/followed-by?client_id={$client_id}"); $data = json_decode($data, true); //print_r($data); /*foreach ($data['data'] as $value) { echo $value[full_name].'<br/>'; }*/ echo '<h1>Media:</h1>'; $data = get_url_content("https://api.instagram.com/v1/media/{$media_id}?client_id={$client_id}"); $data = json_decode($data, true); //print_r($data);
$data = get_url_content('http://api.klout.com/v2/identity.json/twitter?screenName=' . $fetch_cntr['owloo_screen_name'] . '&key=' . $klout_api_key); $data = json_decode($data, true); if (isset($data['id'])) { $klout_id = $data['id']; $qry = ""; $qry = " INSERT INTO owloo_klout_tw_data VALUES ("; $qry = $qry . " " . $fetch_cntr['owloo_user_id'] . ","; $qry = $qry . " " . mysql_real_escape_string($data['id']) . ")"; mysql_query($qry); } else { continue; } } else { $klout_id = $fetch_user['klout_id']; } $klout_data = get_url_content('http://api.klout.com/v2/user.json/' . $klout_id . '/score?key=' . $klout_api_key); $klout_data = json_decode($klout_data, true); if (isset($klout_data['score'])) { $qry = ""; $qry = " INSERT INTO owloo_klout_tw_data_record VALUES ("; $qry = $qry . " " . $fetch_cntr['owloo_user_id'] . ","; $qry = $qry . " " . mysql_real_escape_string($klout_data['score']) . ","; $qry = $qry . " " . mysql_real_escape_string($klout_data['scoreDelta']['dayChange']) . ","; $qry = $qry . " " . mysql_real_escape_string($klout_data['scoreDelta']['weekChange']) . ","; $qry = $qry . " " . mysql_real_escape_string($klout_data['scoreDelta']['monthChange']) . ","; $qry = $qry . " '" . mysql_real_escape_string($klout_data['bucket']) . "',"; $qry = $qry . " '" . Date("Y-m-d") . "')"; mysql_query($qry); } if ($count % 8 == 0) { sleep(2);