How to show online users in PHP?

I need help with javascript and php?

  • im making a site where users can upload images using this script i found and now i need help with getting some variables out of the javascript into php variables, the variables i need is the name of the pictures and the location after uploading. the script look like this. $(function(){ $('#swfupload-control').swfupload({ upload_url: "upload-file.php", file_post_name: 'uploadfile', file_size_limit : "4096", file_types : "*.jpg;*.png;*.gif", file_types_description : "Image files", file_upload_limit : 100, flash_url : "js/swfupload/swfupload.swf", button_image_url : 'js/swfupload/wdp_buttons_upload_114x29.… button_width : 114, button_height : 29, button_placeholder : $('#button')[0], debug: false }) .bind('fileQueued', function(event, file){ var listitem='<li id="'+file.id+'" >'+ 'File: <em>'+file.name+'</em> ('+Math.round(file.size/4096)+' KB) <span class="progressvalue" ></span>'+ '<div class="progressbar" ><div class="progress" ></div></div>'+ '<p class="status" >Pending</p>'+ '<span class="cancel" > </span>'+ '</li>'; $('#log').append(listitem); $('li#'+file.id+' .cancel').bind('click', function(){ var swfu = $.swfupload.getInstance('#swfupload-cont… swfu.cancelUpload(file.id); $('li#'+file.id).slideUp('fast'); }); // start the upload since it's queued $(this).swfupload('startUpload'); }) .bind('fileQueueError', function(event, file, errorCode, message){ alert('Size of the file '+file.name+' is greater than limit'); }) .bind('fileDialogComplete', function(event, numFilesSelected, numFilesQueued){ $('#queuestatus').text('Files Selected: '+numFilesSelected+' / Queued Files: '+numFilesQueued); }) .bind('uploadStart', function(event, file){ $('#log li#'+file.id).find('p.status').text('Upl… $('#log li#'+file.id).find('span.progressvalue')… $('#log li#'+file.id).find('span.cancel').hide()… }) .bind('uploadProgress', function(event, file, bytesLoaded){ //Show Progress var percentage=Math.round((bytesLoaded/file.… $('#log li#'+file.id).find('div.progress').css('… percentage+'%'); $('#log li#'+file.id).find('span.progressvalue')… }) .bind('uploadSuccess', function(event, file, serverData){ var item=$('#log li#'+file.id); item.find('div.progress').css('widt… '100%'); item.find('span.progressvalue').tex… var pathtofile='<a href="uploads/img/'+file.name+'" target="_blank" >view »</a>'; item.addClass('success').find('p.st… | '+pathtofile); }) .bind('uploadComplete', function(event, file){ // upload has completed, try the next one in the queue $(this).swfupload('startUpload'); }) }); i'm no good with javascript so i don't really know what this means. but i need those variables.

  • Answer:

    All the variables are at the top = upload_url: "upload-file.php", file_post_name: 'uploadfile', file_size_limit : "4096", file_types : "*.jpg;*.png;*.gif", file_types_description : "Image files", file_upload_limit : 100, flash_url : "js/swfupload/swfupload.swf", button_image_url : 'js/swfupload/wdp_buttons_upload_114x29.… button_width : 114, button_height : 29, button_placeholder : $('#button')[0],

Jógvan at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.