Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. i agree with thorpe's status, or GuiltyGear bought, one in the same
  2. 1. welcome to the forum 2. please use code tags (the [code.][/code.]) without the dot 3. GuiltyGear, is correct, check the path
  3. OK that function just looks a mess, what are you trying to do ? count the occurrences of the IP's from a text file, right ? basic example <?php $data = file_get_contents ("ips.txt"); $dataArray = explode(",",$data); $IPcounter = array(); foreach($dataArray as $IPS) { if(array_key_exists($IPS, $IPcounter)) { $IPcounter[$IPS] = $IPcounter[$IPS] +1; }else{ $IPcounter[$IPS] = 1; } } $search = "127.0.0.1"; echo "$search found {$IPcounter[$search]} times"; echo "<pre>";print_r($IPcounter); ?> 192.168.1.100,192.168.1.100,192.168.1.100,192.168.1.100,192.168.1.100,127.0.0.1,192.168.1.100,192.168.1.100,192.168.1.2,127.0.0.1,127.0.0.1,127.0.0.1
  4. not as secure as thorpe's, but a little more flexible only include css&htm&html if ($_GET['id'] == "") { $_GET['id'] = "home.html"; } if (preg_match('/\.css$|\.html?$/si', $_GET['id'])) { include($_GET['id']); }
  5. last option did you get someone else to test ?
  6. your need to do something like this. JS echo "<script language='javascript'>document.title = 'NewTitle';</script>"; or PHP/HTML 1. create a header file (header.php) <?php function newheader($title){ if(empty($title)) { $title="default page title"; } echo "<html>"; echo "<head>"; echo "<title>$title</title>"; echo "</head>"; } ?> 2. add at the top of your affected files <?php require_once('newheader.php'); newheader("TheTitle");?>
  7. try this (php_pcntl_fork structure) http://www.van-steenbeek.net/?q=php_pcntl_fork
  8. this is a HTML issule the "code" would be <title>the Title</title>
  9. shot in the dark... die($vbulletin->url);//add this for testing if ( $vbulletin->url == 'login.php' OR $vbulletin->url == "HERE" . '.php' //replace HERE with the result from the die (excluding the .php) OR $vbulletin->url == $vbulletin->options['forumhome'] . '.php' OR strpos($vbulletin->url, 'do=logout') !== false )
  10. just a little note.. if you goto the page with the above code and you have NOT summited a post your wipeout the sessions, (over write with nothing) try this session_start(); if(isset($_POST['password'])) {$_SESSION['password'] = $_POST['password'];} if(isset($_POST['empcode'])) {$_SESSION['empcode'] = $_POST['empcode'];}
  11. extra note
  12. why not store the user ID the same as your storing the username ? i assume you know the security problems with the script above, maybe include a checksum, ie setcookie("cookid", $ID, time()+60*60*24*100, "/"); setcookie("cookhash", md5($ID.$username."StaticSiteSalt"), time()+60*60*24*100, "/"); then to check the id if($_COOKIE['cookhash'] == ($_COOKIE['cookid'].$_COOKIE['cookuser']."StaticSiteSalt")) { //valid }
  13. snip of the idea foreach ($_POST['user_id'] as $x) { $ctr++; $perm1 = (isset($_POST['perm_inven_assign'][$x][$ctr])) ? '1' : '0'; $perm2 = (isset($_POST['perm_inven_import'][$x][$ctr])) ? '1' : '0'; sorry its short got a lot on at the mo
  14. Also moved closedir($open_dir); up and added a check if($open_dir === false){die("Invalid mappa '$mappa'<br>")} to add a break you would echo "<br>";
  15. without seeing the code i couldn't say!
  16. try this <?php if (isset($_POST['submit'])) { $lines = count(file($filename)); if ($lines < 100 ) { if (!is_file($filename)) { $filetartalom = fopen($filename,"a+"); fwrite ($filetartalom, "----------" . $_POST['Idopont'] . "-----------\r\n"); } fwrite($fileellen, $output); $mappa = "../versenyfajlok/"; if (!is_dir($mappa)) { print "Nincs ilyen mappa."; }else{ chdir($mappa); $open_dir = opendir($mappa); if($open_dir === false){die("Invalid mappa '$mappa'<br>")} $sortores = 1; foreach(glob("verseny*.txt") as $filenameek) { $beolvasott = file_get_contents($filenameek); if ($sortores == 1) { $beolvasott = nl2br($beolvasott); } echo "$beolvasott<br>"; } if ($sortores == 1) { $beolvasott = nl2br($beolvasott); } closedir($open_dir); } } } ?>
  17. personally i would use sessions.. other options cookies (kinda a bad idea) or $_GET['id'] on every page and pass it via every link..! just an idea!
  18. don't use die then..! use exit! you shouldn't need to change die, just build the function to work the way you want maybe even use a header or echo a javascript redirect
  19. It "could" be a problem with your IE7....if you can get someone else to check it would be useful the likely fix Register the following Internet Explorer dll files Click Start, click Run, type: Regsvr32 jscript.dll Regsvr32 softpub.dll Regsvr32 mssip32.dll Regsvr32 initpki.dll Regsvr32 msxml3.dll Now optimize Internet Explorer for browsing secured sites Open Internet Options, make the folowing changes General Tab\ Delete...\ Delete cookies, temporary internet files Security Tab Reset all zones to Default Privacy Tab Reset to default Content Tab Clear SSL State Programs Tab Reset Web Settings Advanced Tab\ Security Check SSL 2.0 & 3.0 Un-Check Use TLS 1.0 Restore Defaults or a repair IE7 http://support.microsoft.com/kb/917964
  20. can you post your latest code please
  21. i assume $open_dir = opendir($mappa); isn't comment out
  22. http://username:password@www.secretpage.html
  23. set $mappa to the folder you wish to use add <br> ie echo "TILLÁROM HAJJ<br>";
×
×
  • 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.