PHP - Reason For Slow Loading Images?
I have this code below in a while loop, that gets looped through about 10 times and is simply resizing a slightly larger image to fit within a 50px max square. There is other code on my page, but I've narrowed the slowness down to this specific bit of code (i.e. if I take this snippet out, the page loads instantly). With this snippet, the page takes between 5 and 10 seconds to load, which seems absurd for 10 images. FYI, the original images are no larger than 200 px on either side, so it's not like it's looping through large image files.
Anyone know why this might be taking so long? Should I be doing it differently somehow? Code: [Select] list($width,$height) = getimagesize($myimage); if ($width > $height) { $datasofar .= "width=50 /></span>"; } elseif ($height > $width) { $datasofar .= "height=50 /></span>"; } else { //height and width must be equal so just set width = 50, but could just as easily set height to 50 $datasofar .= "width=50 /></span>"; } Similar Tutorialshi, when I made my website I thought it would be a good idea to put the information I'm outputting in a function so I could just call that function on a single template page. However, everytime I load a page on the server it loads all the static content first (ie, sidebar, logo, ect.) Then it loads the dynamic content. I'm okay with this, but it also doesn't add in the background until after it loads the dynamic content (which bothers me). Can I re-arrange my site's coding to prevent this? Thanks - charlie PS: my site is www.rushhunt.com would Java handle it faster? can PHP be made to handle it as fast? I really need help. check out my website and search cars for sale, then any distance and then 37919 zip. it takes too long and there are only 3351 cars on there now. before, when it only had about 2200 cars it was really fast. only about a 1000 cars made it slow. what could it be? nabacar.com It was returning results in about 15 seconds or less with 2200 cars. Now it is over a minute with only 1000 cars on it. I will have 150,000 on it when I get this sorted. http://nabacar.com some java was written to speed things up, but it didn't seem to help. Is it the server or the code causing this? Hello once again, i got this code that takes all images from a folder and displays them close to each other. Heres the code: <?php $dir = 'uploads/thumbs/watermarkedthumbs/'; $file_display = array ('jpg', 'jpeg', 'png', 'gif'); if (file_exists($dir) == false) { echo 'tt'; } else { $dir_contents = scandir($dir); foreach ($dir_contents as $file) { $file_type = strtolower(end(explode('.', $file))); if ($file !== '.' && $file !== '..' && in_array($file_type, $file_display) == true) { echo '<img src="', $dir, '/', $file, '" alt="', $file, '" />'; } } } ?> How do i add margins in between them? i wanna make it smth like 'margin-left:10px, margin-top-10px'. Also, how do i add an 'overflow'? i mean, my images currently are displayed in a div, and i wanna make it so that if the folder has lets say 9 images, it would only display 6 of them, and the rest would be displayed in the same div after i click a button or smth (like '1' for the first div and '2' would appear if theres an overflow, and when i click '2' the rest of the images would appear). To make these adjustments do i need to make a different php file or do i change something in this code? thanks in advance. for the below code, what does the get_magic_quotes_gpc part mean?... in simple terms Code: [Select] $photoname = $_FILES['photo']['name']; if(!get_magic_quotes_gpc()) { $photoname = addslashes($photoname); } Hey I have a script that builds an array but for some reason there is a loose integer in the variable which is confusing me and i think its the cause of my syntax errors in javascript. But i got no idea where it is coming from =/ Here is the function i use: Code: [Select] <?php function img($id) { $img = array(); $img['tiles'] = $this->db->getAll("SELECT DISTINCT t.id, CONCAT('data/tiles/',filename) AS f FROM `map_tiles` AS mt INNER JOIN `tiles` AS t ON (mt.tile=t.id) WHERE mt.map_id={$this->db->qstr($id)}"); echo print_r($img); die; //exit(json_encode($img)); // turned off for testing ?> The echo returns this: Code: [Select] Array ( [tiles] => Array ( [0] => Array ( [id] => 10 [f] => data/tiles/floor.png ) ) ) 1 <----- why does this appear? And could this cause a syntax error if sent back for JS processing? As you can see there is 1 showing at the end but i don't see why =/ Any ideas if thats suppose to happen ? Here are the two if statements: if (!($start <= 0)){ $prev_button = "<a href='forum.php?category_id=$category_id&start=$prev'>Prev</a>"; } if (!($start >= $record_num - $per_page)){ $next_button = "<a href='forum.php?category_id=$category_id&start=$next'>Next</a>"; } But they are not properly working. This is part of a pagination script for the next and previous buttons. I normally don't have a problem with concenation, but for some reason I can't get it work in this case. I have two form variables: firstname_ord and lastname_ord. I have tried concenating them several ways, and get nothing afterwards. attempt 1: $lastname = "firstname_ord" . " " . "lastname_ord"; attempt 2: $firstname = "firstname_ord"; $lastname = "lastname_ord"; $fullname = $firstname . " " . $lastname; attempt 3: $fullname = "firstname_ord"; $fullname = $fullname. " " . "lastname_ord"; attempt 4: $fullname = "firstname_ord"; $fullname .="lastname_ord"; attempt 5: $fullname = (string)"firstname_ord"; $fullname .= " "; $fullname .=(string)"lastname_ord"; Used to be a good option, but don't know anymore as password_hash() is now available.
Agree?
I understand that I shouldn't ever manually salt and disable the functions salting. That being said, is there any reason to add a bit extra to the user's password (such as an internal ID and some random constant)?
I've noticed some people don't use { } when they right statements, when I first started learning PHP a couple years ago, I thought you HAD to put the curly brackets, but apparently not, how does this work and why don't some people use them in their scripts? I spent the last hour or so typing this code up, and for some reason I am getting a query error. I have reviewed & revised the code up and down for the past half hour and can't seem to figure out the problem. Can someone look after this for me and tell me what I could be doing wrong? Yes, I know my code is a bit sloppy and may use bad practice techniques, but it works for me. Its a survey that I coded so I could collect data and place it on CPA ad listings. So I need this so work at some point soon. My code: <?php $user = $_POST['user']; $email = $_POST['email']; $password = $_POST['pass']; $paypal = $_POST['paypal']; $q1 = $_POST['q1[favsite]']; $q2 = $_POST['q2[isp]']; $q21 = $_POST['q2.1[bill]']; $email_services = $_POST['email_services']; $ebay = $_POST['ebay']; $amazon = $_POST['amazon']; $q6 = $_POST['q6[purchase]']; $q7 = $_POST['q7[social]']; $q8 = $_POST['q8[bookmarks]']; $q9 = $_POST['q9[search]']; $q10 = $_POST['q10[homepage]']; $q11 = $_POST['q11[5topsites]']; $q12 = $_POST['q12[state]']; if ($_POST['fin'] == "complete") { $dbc = mysqli_connect('localhost', 'root', 'password', 'database') or die('Could not connect'); $query = "INSERT INTO user_data (id, user, email, password, paypal, q1[favsite], q2[isp], q21[bill], email_services, ebay, amazon, q6[purchase], q7[social], q8[bookmarks], q9[search], q10[homepage], q11[5topsites], q12[state]) VALUES ('$user', '$email', '$password', '$paypal', '$q1', '$q2', '$q21', '$email_services', '$ebay', '$amazon', '$q6', '$q7', '$q8', '$q9', '$q10', '$q11', '$q12')"; mysqli_query($dbc,$query) or die('Error querying database'); include_once("../phpmailer/class.phpmailer.php"); $mail = new PHPMailer; $mail->ClearAddresses(); $mail->AddAddress('', ''); $mail->From = ''; $mail->FromName = ''; $mail->Subject = 'Thanks for finishing the survey!'; $mail->Body = "Hello, $user. This is a reminder that you have finished the survey and your credit is currently being processed. Please login to your account at ../../ to view the status of your credit & cash out. "; if ($mail->Send()) { echo "<center>Mail Sent.</center>"; } else { echo $mail->ErrorInfo; } echo "<center><h2>Thanks for completing the survey! Please <a href='login.php'>login</a> to your account to view the status of your credit & cash out.</h2></center>"; } ?> It has nothing to do with PHPMailer, I of course edited the variables just now so all my info wouldnt be public, but everything is fine untill you press submit & I get the or die() error message "Error querying database". What the hell did I do wrong? Is it possible that I cant name variables in the format I used with most of them ($var1 = $_POST['var[desc]']; ? Ok, so basically someone submits a file (doc) and I need to see if it is the same as another file. So instead of opening 300+ files and checking for word similarity, I put the file info into a table called newnotes. Then check the file size for each of the notes in "newnotes" against all of the notes in the table "approvednotes" this could be something like matching 20 file sizes to 300+ file sizes. The user gets returned back to a page and this is all done in backend by the click of a button the admins can use. But would doing this slow down my server/website? Hi, I am having a problem with a part of my query: "SELECT SQL_CALC_FOUND_ROWS jobs.id AS jobId, enquiries.id AS profId, users.username, entity_details.name AS entityName, branches.name AS branch, orderNumber, entity_vat_numbers.vatCode, entity_account_numbers.accountNumber, (SELECT symbol FROM parts_trading, currencies WHERE parts_trading.enquiryRef = enquiries.id AND parts_trading.sellingCurrency = currencies.id LIMIT 1) AS symbol, (SELECT SUM(quantity) FROM parts_trading WHERE enquiryRef = enquiries.id) - COALESCE((SELECT SUM(quantity) FROM invoices_out_reference WHERE jobRef = jobs.id), 0) AS differentPartsCount, (SELECT SUM(quantity*sellingNet) FROM parts_trading WHERE parts_trading.enquiryRef = enquiries.id) - COALESCE( (SELECT SUM(invoices_out.net) FROM invoices_out, invoices_out_reference WHERE invoices_out_reference.invoiceRef = invoices_out.id AND invoices_out_reference.jobRef = jobs.id ) , 0) AS netRemaining, (SELECT SUM(quantity*sellingVat) FROM parts_trading WHERE parts_trading.enquiryRef = enquiries.id) - COALESCE( (SELECT SUM(invoices_out.vat) FROM invoices_out, invoices_out_reference WHERE invoices_out_reference.invoiceRef = invoices_out.id AND invoices_out_reference.jobRef = jobs.id ) , 0) AS vatRemaining, (SELECT SUM(quantity*(sellingNet+sellingVat)) FROM parts_trading WHERE parts_trading.enquiryRef = enquiries.id) - COALESCE( (SELECT SUM(invoices_out.net+invoices_out.vat) FROM invoices_out, invoices_out_reference WHERE invoices_out_reference.invoiceRef = invoices_out.id AND invoices_out_reference.jobRef = jobs.id ) , 0) AS totalRemaining FROM jobs, enquiries, users, branches, entity_details LEFT JOIN entity_account_numbers ON entity_details.id = entity_account_numbers.entityRef LEFT JOIN entity_vat_numbers ON entity_details.id = entity_vat_numbers.entityRef WHERE enquiries.traderRef = users.id AND jobs.enquiryRef = enquiries.id AND users.branchRef = branches.id AND (SELECT SUM(quantity) FROM parts_trading WHERE enquiryRef = enquiries.id) - COALESCE((SELECT SUM(quantity) FROM invoices_out_reference WHERE jobRef = jobs.id), 0) > 0 AND enquiries.entityRef = entity_details.id" I know for certain that it is the part: "AND (SELECT SUM(quantity) FROM parts_trading WHERE enquiryRef = enquiries.id) - COALESCE((SELECT SUM(quantity) FROM invoices_out_reference WHERE jobRef = jobs.id), 0) > 0" That is causing the problem. Unfortunately this is a vital part of my query used for not displaying rows that have quantities matching the sum of what is in the other table . Is there are more efficient way to get the same result than that part of the query? hey i have a problem when i try to send email through php it seems to take a long time somethings it can be there quickly but somethings it takes forever is it something im doing wrong in the short script this is part of my script Code: [Select] // email profile owner $webmaster = "admin@website.com"; $headers = "From: mywebsite<$webmaster>"; $subject = "$username has commented on your profile"; $message = "Hello $firstname $lastname. $username has posted a comment on your profile on mywebsite.com"; $message .= " The message $username has posted with is below.\n"; $message .= "\n****************************************************************\n"; $message .= "$comment"; $message .= "\n\n****************************************************************\n\n"; $message .= "Click here to view $username's profile $site/profile?id=$userid\n"; $message .= "Click here to view your profile $site/profile?id=$getid\n"; // send email mail($email, $subject, $message, $headers); I am aiming to use setcookie to refresh the expiry of a cookie on EVERY page request. Is this slow? I'm sure I can design things so i don't need to reset it on every page request, but if it isn't a big deal then I'll do it. Is setcookie slow? Hi, I coded this website in php http://www.3gar.info but it seem very slow. I checked the server but they said everything is ok and the website run smoothly in server. I have another copy of this website in hostmonister it run very fast there. http://www.ibuj.org I have swift mailer setup to send two message and plain and HTML. I have followed a lot of different posts and came up with a solution that works. However when I send for example 7k emails only about 500 made it out before the 30sec timeout. So I switched my timeout to 600secs and only about 3k made it out. I now I can switch my timeout to 0 or 3600sec and it will go through but it doesnt seem like this should take so long. I use Debian 6.0, Zimbra 7, Postfix, and SwiftMailer I am using the mailer like this; / Create the Transport $transport = Swift_SmtpTransport::newInstance('localhost', xx) ->setUsername('xxx') ->setPassword('xxx') ; // Create the Mailer using your created Transport $mailer = Swift_Mailer::newInstance($transport); //Starts the loop to separate the to email addresses everything past here is built for each email $to1 = explode(", ", $to); for($i = 0; $i < count($to1); $i++){ // Create a message $message = Swift_Message::newInstance($subject) ->setFrom(array($from => 'xxx')) ->setTo(array($to1[$i])) ->setBody($plaintxt) ->addPart($htmltxt, 'text/html'); $plaintxt = substr($plaintxt, 0, -$plaindumplength); $htmltxt = substr($htmltxt, 0, -$dumplength); $emailcounter += $mailer->send($message); } Ok so I have a single mySQL database on a dedicated server hosted through hostgator.. In this database I have 1 table that is a very large table it has well over 900,000 rows on it and we anticipate another 8.1 million records to be added within another 6 months and from there expect the table to grow regularly. Right now my issue is and can only foresee it getting worse as the size gets larger. Is that my queries are running slower and slower. Sometimes even resulting in the DB crashing. So what I am trying to figure out is how do I speed this up. I've tried 101 ways to query the DB to speed it up and can't get it to load 10 results 10.. in less than 30 seconds. I know some of my issue is the fact that I need distinct results or unique ones rather. As there are several duplicate entries but I only need to pull out one of each for this particular function which is a search. So that said is there any advice one can give me to speed up my query results. I would offer up a sample of my current queries but its just your common query using distinct. I have the following simple code to test against collision on a primary key I am creating: Code: [Select] $machine_ids = array(); for($i = 0; $i < 100000; $i++) { //Generate machine id returns a 15 character alphanumeric string $mid = Functions::generate_machine_id(); if(in_array($mid, $machine_ids)) { die("Collision!"); } else { $machine_ids[] = $mid; } } die("Success!"); Any idea why this is taking minutes to run? Anyway to speed it up? Hi everyone, I have a data analysis system which, however, takes too long to insert data into the db. Can you help me understand where I went wrong? thank you DB MYSQL:
1 analytics_number bigint(20) AUTO_INCREMENT --------------------------------------------------------------------------- CLASS PHP Analytics.php class analytics {
public $search_sites; public function get_analytics_enter($visitor_ip, $visitor_visitor_id, $visitor_session_id, $visitor_pageview_id, $visitor_referrer, $visitor_url, $visitor_resolution, $visitor_viewport, $visitor_document){ try{
$GET_array = array("visitor_ip" => $visitor_ip, "visitor_visitor_id" => $visitor_visitor_id, "visitor_session_id" => $visitor_session_id, "visitor_pageview_id" => $visitor_pageview_id, "visitor_referrer" => $visitor_referrer, "visitor_url" => $visitor_url, "visitor_resolution" => $visitor_resolution, "visitor_viewport" => $visitor_viewport, "visitor_document" => $visitor_document);
$query = "SELECT * FROM analytics WHERE visitor_visitor_id = '".$visitor_visitor_id."'"; $visitor_ip_info = get_data_visitor($visitor_ip);
$visitor_visitor_pageview = 0;
$session_buffer = array();
$visitor_visitor_pages = array();
$analytics["visitor_session_landingpage"] = NULL;
foreach ($visitor_data as $visitor) {
if (!in_array($visitor["visitor_page_path"], $visitor_visitor_pages)) {
if ($visitor["visitor_session_id"] == $visitor_session_id) {
if ($visitor_session_pageview == 1) {
if (!in_array($visitor["visitor_page_path"],$visitor_session_pages)) {
if (!in_array($visitor["visitor_session_id"],$session_buffer)) {
if (!in_array($visitor_session_id,$session_buffer)) {
foreach($GET_array as $key => $value) {
$analytics["visitor_visitor_sessions"] = $visitor_visitor_session;
$analytics["visitor_visitor_pageviews"] = $visitor_visitor_pageview + 1; $analytics["visitor_visitor_time"] = "0";
$analytics["visitor_session_pageviews"] = $visitor_session_pageview + 1;
$analytics["visitor_enter_timestamp"] = date("d.m.Y, H:i:s");
$analytics["visitor_leave_timestamp"] = date("d.m.Y, H:i:s"); $analytics["visitor_pageview_time"] = "0";
$analytics["visitor_country"] = $visitor_ip_info["country"];
$analytics["visitor_referrer_url"] = $visitor_referrer;
$analytics["visitor_domain"] = $this->get_domain($visitor_url);
if (!in_array($analytics["visitor_page_path"], $visitor_visitor_pages)) {
if (!in_array($analytics["visitor_page_path"], $visitor_session_pages)) {
$analytics["visitor_visitor_pages"] = json_encode($visitor_visitor_pages);
if ($analytics["visitor_session_pageview"] == 1) {
$sql_1_1 = "UPDATE analytics SET " . "visitor_visitor_last_page" . "='" . "" . "' WHERE " . "visitor_visitor_id" . "='" . $visitor_visitor_id . "'";
$sql_1 = $sql_1_1."; ".$sql_1_2.";";
$analytics["visitor_visitor_last_page"] = "true";
$analytics["visitor_device"] = visitor_device(); $analytics["visitor_pageview_update"] = date("YmdHis");
$sql_2_1 = "INSERT INTO analytics ("; $this->_db->exec($sql_2_1); $sql_2_2 = "UPDATE analytics SET " . "visitor_visitor_sessions" . "='" . $analytics["visitor_visitor_sessions"] . "' WHERE " . "visitor_visitor_id" . "='" . $visitor_visitor_id . "'"; $sql_2_3 = "UPDATE analytics SET " . "visitor_visitor_pageviews" . "='" . $analytics["visitor_visitor_pageviews"] . "' WHERE " . "visitor_visitor_id" . "='" . $visitor_visitor_id . "'"; $sql_2_4 = "UPDATE analytics SET " . "visitor_visitor_pages" . "='" . $analytics["visitor_visitor_pages"] . "' WHERE " . "visitor_visitor_id" . "='" . $visitor_visitor_id . "'"; $sql_2_5 = "UPDATE analytics SET " . "visitor_session_pageviews" . "='" . $analytics["visitor_session_pageviews"] . "' WHERE " . "visitor_session_id" . "='" . $visitor_session_id."'"; $sql_2_6 = "UPDATE analytics SET " . "visitor_session_pages" . "='" . $analytics["visitor_session_pages"] . "' WHERE " . "visitor_session_id" . "='" . $visitor_session_id."'"; $sql_2_7 = "UPDATE analytics SET " . "visitor_session_landingpage" . "='" . $analytics["visitor_session_landingpage"] . "' WHERE " . "visitor_session_id" . "='" . $visitor_session_id."'"; $sql_2_8 = "UPDATE analytics SET " . "visitor_session_exitpage" . "='" . $analytics["visitor_session_exitpage"] . "' WHERE " . "visitor_session_id" . "='" . $visitor_session_id."'";
$sql_2 = $sql_2_2.";".$sql_2_3.";".$sql_2_4.";".$sql_2_5.";".$sql_2_6.";".$sql_2_7.";".$sql_2_8.";";
} catch(PDOException $e) { public function get_analytics_update($visitor_visitor_id, $visitor_session_id, $visitor_pageview_id, $visitor_pageview_time, $visitor_leave_url){
try{ $query = "SELECT MAX(" . "visitor_session_time" . ") FROM analytics WHERE " . "visitor_visitor_id" . "='" . $visitor_visitor_id . "' AND " . "visitor_session_id" . "='" . $visitor_session_id . "' ORDER BY " . "visitor_enter_id" . " DESC LIMIT 1"; $visitor_session_time = $this->_db->query($query)->fetchColumn();
$query = "SELECT MAX(" . "visitor_pageview_time" . ") FROM analytics WHERE " . "visitor_visitor_id" . "='" . $visitor_visitor_id . "' AND " . "visitor_session_id" . "='" . $visitor_session_id . "' AND " . "visitor_pageview_id" . "='" . $visitor_pageview_id . "' ORDER BY " . "visitor_enter_id" . " DESC LIMIT 1"; $analytics = array();
foreach($GET_array as $key => $value) {
$analytics["visitor_leave_timestamp"] = date("d.m.Y, H:i:s");
$analytics["visitor_visitor_time"] = $visitor_visitor_time + ($visitor_pageview_time - $visitor_pageview_time); $analytics["visitor_pageview_update"] = date("YmdHis");
if (isset($visitor_leave_url)) {
$sql_1_1 = "UPDATE analytics SET ";
} catch(PDOException $e) {
function visitor_referrer_type($referrer) {
if ($referrer == "") {
$referrer = explode(".",$referrer);
if (array_key_exists($referrer,$search_sites)) {
function visitor_referrer_name($referrer) {
if ($referrer == "") {
$referrer = explode(".",$referrer);
if (array_key_exists($referrer,$search_sites)) {
function visitor_leave_type($leave_url)
if ($leave_url == "") {
if (strpos($leave_url, $url_paz) !== false) {
function visitor_leave_name($leave_url) $leave_url = $this->get_domain($leave_url);
$leave_url = explode(".",$leave_url); } ?> analytics-db.php
<?php // Dataset IDs
array_push($database_structure["analytics"],"visitor_visitor_id"); // Dataset Visitor Data
array_push($database_structure["analytics"],"visitor_visitor_sessions"); // Dataset Session Data
array_push($database_structure["analytics"],"visitor_session_pageviews"); // Dataset Pageview Data // Dataset Enter Time
array_push($database_structure["analytics"],"visitor_enter_timestamp"); // Dataset Leave Time
array_push($database_structure["analytics"],"visitor_leave_timestamp"); // Dataset Geolocation
array_push($database_structure["analytics"],"visitor_country"); // Dataset Technology
array_push($database_structure["analytics"],"visitor_device"); // Dataset Referrer
array_push($database_structure["analytics"],"visitor_referrer_url"); // Dataset Page
array_push($database_structure["analytics"],"visitor_url"); // Dataset Time array_push($database_structure["analytics"],"visitor_pageview_time"); // Dataset Leave
array_push($database_structure["analytics"],"visitor_leave_url"); // Dataset Update
array_push($database_structure["analytics"],"visitor_pageview_update"); analytics-enter.php <?php
if(isset($_POST["visitor_ip"])){ ?> analytics-update.php <?php $analytics->get_analytics_update($_POST["visitor_visitor_id"], $_POST["visitor_session_id"], $_POST["visitor_pageview_id"], $_POST["visitor_pageview_time"], $_POST["visitor_leave_url"]); ?> JS FILE $(function(){
function create_cookie(name,value,days) {
var host = window.location.hostname;
document.cookie = name+"="+value+expires+"; path=/; domain=." + domain;
function read_cookie(name) {
while (c.charAt(0) == ' ') {
if (c.indexOf(nameEQ) == 0) {
function random_string(length, chars) {
function create_id() {
function create_visitor_visitor_id() {
function visitor_visitor_id() {
function create_visitor_session_id() {
function visitor_session_id() {
if (new URL(window.location.href).searchParams.get("analytics") != "true") { var analytics_script_location = "/analytics/controllers/";
var screen_width = screen.width;
var viewport_width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var document_width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var visitor_ip;
var visitor_visitor_id = visitor_visitor_id();
var visitor_enter_time = new Date();
var visitor_resolution = screen_width + "x" + screen_height; var visitor_leave_url = "NULL"; var current_time = 0;
var scroll_sum = 0;
var visitor_enter_sent = false;
var current_viewport_width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var current_viewport = current_viewport_width + "x" + current_viewport_height;
var current_document = current_document_width + "x" + current_document_height;
function track_a_href(event) {
function analytics_visitor_enter() {
$.ajax({
function analytics_visitor_update() {
$.ajax({
window.setInterval(function() {
function analytics_visitor_leave() {
function visitor_leave_delay(time) {
$(window).load(function() { analytics_visitor_enter(); }); } }); |