Jump to content


  • Posts

  • Joined

  • Last visited

About abdfahim

  • Birthday 04/25/1983

Profile Information

  • Gender

abdfahim's Achievements

Advanced Member

Advanced Member (4/5)



  1. I have been searching this for months! I am trying to align all my forum login name, so can I please have my username (login name) changed to abdfahim? I have already changed the display name to that long time back. Thanks
  2. Hi, I want to implement a progress bar. The idea is simple, I have file2.php where I set $_SESSION['progress'] value in each loop. While file2 is working in background, I want to return the $_SESSION['progress'] value in main thread using below functions. But the problem is, it is not working. While fprogress is being called in every second, the value is set only once at the end. Can anybody please help? Thanks, var updateprog; function fprogress() { var progxmlHttp = new XMLHttpRequest(); var progress; var url = "file1.php"; progxmlHttp.onreadystatechange=function(){ if (progxmlHttp.readyState==4 && progxmlHttp.status==200){ progress = progxmlHttp.responseText; document.getElementById("progress").innerHTML ="Progress: "+progress+"% <br><br>"; } } progxmlHttp.open("GET", url, true); progxmlHttp.send(null); } function updateAll(mid) { var xmlhttp=new XMLHttpRequest(); updateprog = window.setInterval(fprogress,1000); xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ window.clearInterval(updateprog); document.getElementById("progress").innerHTML ="progress: 100% <br><br>"; } } xmlhttp.open("POST","file2.php",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); params = "key=xxx"; xmlhttp.send(params); } file1.php <?php if (!isset($_SESSION)) { session_start(); } echo $_SESSION['progress']; ?>
  3. Hi, Another question. If I want to block direct access to my "includes" folder where I have base PHP files (only PHP files) which are included throughout the site, is it enough I just disable directory listing using following commands in htaccess? Or I should take some more precautions to protect my code? .htaccess Options -Indexes
  4. okay guys .. thanks .. it seems like I had a whole misconception how flash file works in browser ..... Thanks for clearing it up ......
  5. so isn't there any way to protect a folder from direct access (but enable php inclusion)?
  6. thanks both of you ... My server is Apache running on Linux .... I'll definitely use that -Indexes command. For protecting files from download, is there any way except putting them outside webroot? Can't I use htaccess to restrict direct access to those folders? I Googled and found lots of example, but I couldn't properly tweak those to make it perfect for me, as I have no experience in htaccess. The code I tried to do was to redirect to webroot (www.mysite.com) whenever someone try to direct access that directory (www.mysite.com/classes). But I was stuck in 2 kind of scenarios: 1. That directory was protected but the server PHP files also failed to access. Hence I got all those "includes" inside PHP file not working 2. There was infinite loop while redirecting
  7. Hi, I have some flash files and also some PHP files in a folder called "classes" which I inlcuded/embeded in my other PHP files. What I want is nobody can directly go to "www.mysite.com/classes" to protect downloading those files. Also I want to disable file listing when somebody point to any directory. How can I do those?
  8. I want to get the maximum values of the second key of a multidimensional array. Write now I am using the code below, which works. But interested to know whether anybody has any better idea? $arr['a']['2012-08-04']=100; $arr['a']['2012-08-01']=4545; $arr['a']['2012-08-07']=2434; $arr['b']['2012-08-02']=2334; $arr['b']['2012-08-03']=2324; $dt=array(); foreach($arr as $val){ $dt=array_merge($dt,$val); } echo max(array_keys($dt));
  9. Okay, locate your problem. You have extra space in front of user name, hence it is not giving anything. If you write like below, it will work (notice an extra space in username, e.g. NOT 'will it work', rather, ' will it work' SELECT count( * ) FROM charismos WHERE username = ' will it work' You see, you have same problem after 4th row for all data. That's why you are not getting any result after 4th row. To overcome this prob, always use PHP TRIM function when entering data in database
  10. From your query, I can't see any problem. If your table is not confidential and also not too big, may be you can attach the sql export here, then I can load in my machine and check.
  11. Oops, a typo !! Yes, it is ofcourse SourceGuard
  12. May be you can rewrite query like $sql = "SELECT Totrain FROM tablename WHERE TotRain>'20' ORDER BY `ID` ASC, `Year` ASC, `Month` ASC, `dayset` ASC LIMIT 3
  13. Dears, I am wondering why ioncube is almost double price compare to safeguard? ioncube basic has same price (~200USD) but ioncube Cerberus is price 379USD. And if you compare with sourceguard, it has the options matched with ioncube cerberus (MAC/IP/Domain licensing, time based licensing etc.). Anybody has any idea what extra I can get with extra price for ioncube? thanks,
  14. I don't see any problem except those syntax issues in query lines. Try to echo variable $fetch_1 before if loops. $qry_2=mysql_query("INSERT INTO `tbl` (...) VALUES (...)") or die(mysql_error()); $qry_2_Update=mysql_query("UPDATE `tbl` SET `att` = `att` +1 WHERE `id`='".$this->u_tst."'");
  15. isn't this belong to JavaScript forum?
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.