Jump to content

dreamwest

Members
  • Posts

    1,223
  • Joined

  • Last visited

    Never

Everything posted by dreamwest

  1. Upload another htacces to your directory /server/htdocs/mypage/.htaccess or if you dont want ppl sniffin your files RewriteRule ^mypage/(.*) http://www.site.com
  2. My favorite Crazy tricks: Here we are disabling the digital signature that would otherwise identify the server: # disable the server signature ServerSignature Off To increase performance on PHP enabled servers, add the following directive: # preserve bandwidth for PHP enabled servers <ifmodule mod_php4.c> php_value zlib.output_compression 16386 </ifmodule> # file caching- my favorite! ExpiresActive On ExpiresDefault A604800 # 1 week ExpiresByType image/x-icon A2419200 # 1 month ExpiresByType application/x-javascript A2419200 # 1 month ExpiresByType text/css A2419200 # 1 month ExpiresByType text/html A300 # 5 minutes # disable caching for scripts and other dynamic files <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> ExpiresActive Off </FilesMatch> # disable directory browsing - no more index.php in every friggin directory Options All -Indexes This bit of voodoo will auto-correct simple spelling errors in the URL: # automatically corect simple speling erors <IfModule mod_speling.c> CheckSpelling On </IfModule> # instruct browser to download multimedia files AddType application/octet-stream .avi AddType application/octet-stream .mpg AddType application/octet-stream .wmv AddType application/octet-stream .mp3
  3. No, youll have to add the rewrite to it, just treat it like the root directory The directory htaccess will overwrite the root htaccess http://site.com/dir/.htaccess Options +FollowSymLinks RewriteEngine On RewriteRule ^$ index.php So http://site.com/dir/ will go to http://site.com/dir/index.php
  4. Simply create another htaccess for the directory
  5. it would be easier to have the url http://www.MYURL.com/first_name.php?id=123456789 RewriteRule ^name/(.*) first_name.php?id=$1
  6. Is this a real directory or fake (rewritten)?
  7. Yeah thats funny, trying to rewrite by direct url.. RewriteRule ^register/ anything.php?action=register [L,QSA]
  8. I wanted to place a script on a directory that would delete all files 15 minuets or older $dir = "/home/user/public_html/tmp"; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); } }
  9. Excellent. Thanks Its alot like htaccess expressions
  10. Im trying to filter out url from going into the database $search = "http://www.site.com"; if ($search is url ){ echo "search is a url"; }else{ mysql_query("INSERT INTO tags (tag) VALUES('".$search."' ) ") or die(mysql_error()); }
  11. Well now im officially addicted to bings video section.....DAMMMIT!
  12. Make sure "message" column is set to BLOB the rest you can set to VARCHAR 100
  13. Ok im lost , ive tried doing isset but it still wont work. Can you give me an example of how it should be set out?
  14. Im using servage, 750GB storage, 7500GB transfer allowance all for 100 buck a year - my best server host EVER! http://www.servage.net/?coupon=cust46358
  15. Im trying to set a cookie by url which works, but the ifelse script doesnt seem to detect the cookie $action= $_GET['action']; $action2 =$_GET['option']; if ($action == "cinema" ){ if ($action2 != "off" && $action2 != "on"){ $action2 = "off"; } $expire=time()+60*60*24*30; setcookie("$action", "$action2", $expire, "/" ); } if (!isset($_COOKIE['cinema'])){ $customize.= '<a href="/index.php?action=cinema&option=on">CinemaScope ON</a><br><hr>'; }elseif($_COOKIE['cinema']== "on"){ $customize.= '<a href="/index.php?action=cinema&option=off">CinemaScope OFF</a><br><hr>'; }elseif ($_COOKIE['cinema']== "off"){ $customize.= '<a href="/index.php?action=cinema&option=on">CinemaScope ON</a><br><hr>'; } echo $customize;
  16. OK ive sucessfully transfered all my cookie code to sessions, but how long will they last by default?, i want to make them last about 6 months if possible, heres what ive done if (!isset($_SESSION['cinema'])){ $_SESSION['cinema']='off'; //how long will this last } Also i cant seem to echo the session id if (!isset($_SESSION['cinema'])){ $_SESSION['cinema']='off'; //how long will this last } echo SID ;
  17. Just saying request can do all three post, get and cookie. However i never use request
  18. Actually , The $_REQUEST function can be used to collect form data sent with both the GET and POST methods.
  19. Is this a playlist generator? //query here echo '<?xml version="1.0" encoding="UTF-8"?><playlist xmlns="http://xspf.org/ns/0/" version="1"><title>mixmedia</title> <tracklist>'; echo"<track> <title>".$row['title']."</title> <location>".$file."</location> <duration>".$row['video_length']."</duration> <image>/thumb/".$row['id'].".jpg</image> </track>"; echo '</tracklist></playlist>';
  20. Less work for you maybe. But more work for the PHP engine. Admittedly it's not going to make a huge difference in the grand scheme of things, but yeah. Serious? Ive been using {$variables} like crazy, didnt think it made any difference
  21. Yeah this is htaccess Umm if you want a successfull website change to linux server, you can do sweet things with it and theres alot more support
  22. OK. I see it now, Thanks
  23. But $action2 does equal to "on", so the if statement shouldnt run
  24. I have no idea whats happening here $action2 ="on"; echo $action2; // this echos on if ($action2 != "off" || $action2 != "on"){ $action2 = "off"; } echo $action2; // this echos off So this echos "on" "off" But the if statement says - if not off or on, set $action2 to off
  25. You wont nee to concat if its in double quotes - less work header("Location: search.php?find=$find");
×
×
  • 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.