Jump to content

Tazerenix

Members
  • Posts

    232
  • Joined

  • Last visited

    Never

Everything posted by Tazerenix

  1. if you really want a file lister you can try my sitemap code. http://files.tazerenix-productions.com/sitemap/sitemap.zip http://files.tazerenix-productions.com/sitemap/sitemap.php Although its probably better to code your own as you would learn a lot more
  2. in any page where you want the user to be logged in add header("Location: login.php") if they aren't logged in. Then in login.php if the user is logged in redirect to index.php (since your logged in this wont be a recuring loop) or if they aren't print the form
  3. yea, those are features that most designers are looking forward to.
  4. well another method, which im looking into, is using a database to store info about each view then query the database. But im not sure why the code didnt work so...
  5. There is no problem with using HTML5 and CSS3 but, considering both are still uncomplete and under review and are only supported by some browsers you have to accept that some (or most) users might not be able to view your website properly.
  6. why you wouldnt just use scandir() i dont know.
  7. This way should work. Not sure what the intval() was for. Hope this works. I havent tested it. <?php error_reporting(E_ALL); $ipfile = file_get_contents("ips.txt"); // Put ips.txt into string $lines = explode("\r\n", $ipfile); // Split ip file into array at each new line (might be \r\n) $file = file_get_contents("count.txt"); // get count file $visitors = (int)$file; // Set to int // set incremement boolean (should we add 1?) $increment = true; //users ip $ip = $_SERVER['REMOTE_ADDR']; if (!$lines) { $increment = true; } //start loop foreach($lines as $line) { if($line == $ip) { $increment = false; } } //open new file, write new visitors value if ($increment == true) { $visitorsnew = $visitors + 1; file_put_contents("count.txt", $visitorsnew); file_put_contents("ips.txt", $ip . "\n", FILE_APPEND); } ?>
  8. well if you made the one on the left graphical it would still attract the users eye. Just a suggestion
  9. Its alright. Do you really need the visual ad below the content on the main page with all those ads on the side already tho?
  10. Web 2.0 concepts say that a website should really only have 2 columns. Any more and it can confuse the user. If you remove one of the side columns and thicken the other a bit it will look alright. Nice job
  11. Its good. I like the concept too. Maybe widen the center column a bit more.
  12. in terms of speed it would be faster just to have them in different files as your code wouldnt need to extract the $_GET variable, check it, if no move onto the next one and continue. It can load straight to that page. And its friendlier to search engines and hotlinking Personally i think the site is alright. On the menu bar try and put a hover effect on. Its a bit offputting hovering over a nav link but then not telling if your actually able to click it or not. Maybe a light grey background on hover. In terms of the pictures it might be worth looking up some way to stop them loading on page load until the users clicks a button to load them or something. Because, if someone has slow internet it could take quite a while for those pictures to load. Given that they are quite big. But overall its alright ps: Is all your family and such happy with those photo's all being public?
  13. Tazerenix

    Gday All

    yes, nother aussie
  14. because if you parse code in PHP and then store it you can cache it. But from what i can tell you wouldnt be able to cache that. But i could be wrong, im no expert
  15. <?php require("./classes/utils/ImageResizer.class.php"); header("Content-type: image/jpeg"); $image = imagecreatefromjpeg('img/1.jpg'); imagejpeg($image); ?> If that doesnt work then remove the header function and add error_reporting(E_ALL); to the top of your script to see if anything is happening wrong. Calling header("Content-type: image/jpeg"); will hide any errors after it as an image cant display text in a browser
  16. if you want to carry out the resizing through a method of a class then your going to need to call the method. You can just have the method defined in the class.
  17. and if you knew anything you would know that include is a special function in php that doesnt require parenthesis, like echo. Try changing the include line to below where the $image variable is defined. If it is above it cant really do anything to the $image handler as it hasnt been defined when the page has been included
  18. <script type="text/javascript"> function functionUsedToCheckFields() { // i dont know your field structure so here you need to build an array of the value of each field // and store it as an array (fields) for(value in fields) { if (fields[value] !== true) { return false; } } return true } </script> <form onsubmit="return functionUsedToCheckFields()"> blah blah blah </form> That should work but as it says in the script you will need to make an array of all the values of the fields called fields
  19. I was wondering what advantages PHP has over ASP/ASP.NET in terms of functions, performance and other things. I have been coding PHP for a while now but i have read some discussion and articles on PHP vs ASP/ASP.NET and most seem to think that ASP/ASP.NET are better languages. I know PHP has a better support base because it is older and open source but what other advantages/disadvantages are there?
  20. foreach ($_SESSION as $key) { unset($key); } session_destroy(); That should unset all the session variables you have set and terminate the session. Its really just an alternative to the code your already using And try putting error_reporting(E_ALL) at the top of your script. It helps sometimes also, just incase, check that you do have a session_start() at the top of your page. Sometimes we forget it
  21. I reckon its pretty good. Although the hover image on the nav bar seems a bit too vibrant compared. maybe make the blue a bit more pale
  22. w3schools.com has NOTHING at all to do with defining any web standards, it is a tutorial site like any other. i mean w3c
  23. Currently you shouldn't be using HTML5 tags in any of your webpages. These are not supported by most browsers. You should use HTML4 standards. Of course w3schools.com has a decent tutorial for that as it is the official international standard for HTML. I don't know any really good tutorials for either HTML or CSS though as i am self taught in the 2. Try looking at some high quality templates or professionally designed websites for good practice. You should always try to code in XHTML Strict 1.0 where possible. CSS should be used for all design of your webpage.
×
×
  • 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.