Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. LOL, thanks It's late in the day here in the UK so my brain is melting, making me come out with this crap.
  2. <html> <head> <script type="text/javascript"> var c = 0; var t; var timer_is_on = 0; function timed_count() { document.getElementById('counter').innerHTML = c; c = c+1; t = setTimeout('timed_count()',1000); } function do_timer() { if(!timer_is_on) { timer_is_on = 1; timed_count(); } } window.onload = do_timer; </script> </head> <body> <div id="counter">0</div> </body> </html>
  3. Search engine spiders. Get it? I have a phobia of spiders! Now i'll just go and shoot myself.
  4. Check the path to the ini file that is displayed on screen via phpinfo(). Are you ammending the correct file? If so you should post this issue over at the apache or linux board as I would be stabbing in the dark at this one. On another note, the reason that using your database to store the contents of a file is a bad idea is because a mysql database should be optimised for quick reads & writes, especially with websites. Using that sort of data type will result in really poor performance if the table were to become very large. Also, managing the files will be a pain because you cannot actually physically move them or a portion of them. On a video tube website (i'm sure you know many) the actual video file data will never be stored in a database, nor user uploaded images. With the number of files that are served on these sites they would grind to a halt. The physical files will be stored on a CDN, something else to look at if you are making these sort of sites. I am not saying that you should go changing all of your websites, however it is something to consider in future projects.
  5. OK, you have some issues here. You are not uploading a file, you are taking the file contents from the $_FILES POST array and attempting to store in the database. You should not do this. When you upload a file you should store the actual file on the server. The only thing that you should store in the database is the filename so that you can target it in whatever element (image, flash object, href, etc). Here is a link to a simple file upload script. If you still have a problem then you need to check that your environment variables are correct. EV are the variables set in your php.ini http://php.about.com/od/advancedphp/ss/php_file_upload.htm Very good info on EV http://www.sitepoint.com/upload-large-files-in-php/ If you are uploading files of such a large size, the regular POST method is not the best choice as you would be sat waiting for the browser to finish loading for a long while. Most users would think that the browser has crashed when it is still sending POST data. The server would most probably timeout. A combination of PHP / Ajax / PERL is a good solution where you do not need to set any variables such as upload_max_filesize or max_execution_time. The uploader I would recommend is uber uploader. See if you can get it working on your server. You will need to read the documentation. http://uber-uploader.sourceforge.net/
  6. If files smaller than 18M are uploaded without issue it is unlikely to be a problem with your script. More likely an environment variable. What kind of hosting are you using? Can you post the code so we can see where to put the checks in for a successful upload.
  7. That's my code. I would also like to add: <?php for($x = 1; $x <= 10; $x++) { print $x; } exit(); ?> <?php /* poor person has no money */ £x = 0; go_around_until(£x is_equal_to 10) { display £x; add_to(£x,1); } goodday(); ?>
  8. shouldn't cause any problems. just use it on the page you have the issue with
  9. I've had this issue. Add the following header to your page: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  10. Many web hosts will setup a dedicated server for you and install WHM / Cpanel or Plesk on it. It's not that expensive IMO but surely the website should pay for itself right? I would not suggest jumping into a raw Linux environment without some experience. I used old PCs and installed CentOs or Fedora on them and played about setting up apache, php, iptables, etc, eventually getting them running as local webservers. On the other hand there are plenty of VPS's available (Virtual Private Server) that will have their own control panel but give you the complete freedom of using the command line to update configs, etc. The cost is lower than a dedicated machine and they are much better than cheap & nasty shared hosting accounts that have lots of users on them. Really you should avoid the likes of WHM for hosting a single site as it is designed to manage many users with hosting accounts, just as shared hosts use it. However, if you are familiar with it and may host additional sites on the same server in the future, there shouldn't be a problem. We have a WHM server that we use to host websites created on our do-it-yourself website builder software. The monthly fees are not large. I think it is actually pretty much the same as our dedicated machines running CentOs, just haggle for a deal on the cPanel license. I think it was roughly about £50 per month for a decent server and then another £10-15 per month for the cPanel WHM licence. That probably equates to about $99 USD per month. http://www.ovh.co.uk/
  11. php is all you need. have a look at the examples of the mail function and run some tests of your own on a test script. http://php.net/mail
  12. I have a Galaxy S. It's the only Smartphone I have owned and I have no real issues using it. The only thing that made me grumble was battery life but I guess that is because I was used to charging a Sony Ericsson featurephone once every 3-4 days. I think most smartphones require charging pretty frequently especially if you have a heavy session on angry birds. I think it is the closest alternative to an iPhone. I would of liked the iPhone but I would of had to pay for that and I never pay my provider for a phone, especially when I have been with them for 9 years. I would read the reviews, they are mostly positive for the Samsung. Everyone will have their own opinion so I woould simply go into a store and have a play with them and make your own mind up.
  13. You cannot start more than one session in the same instance
  14. Been doing some SEO stuff using Wordpress. Fu**ing awful system programming wise.
  15. The variable name used as a function parameter will take the value of whatever is passed into it <?php function arr($word) { switch($word) { case 'modern': include('array1.php'); break; case 'classic': include('array2.php'); break; } } $q = $_GET['q']; arr($q); ?>
  16. <?php function arr($word, $include) { include_once($include); echo $something[$word]; } arr('test', 'array1.php'); ?>
  17. Sex is by far the best. haha. Very true. However, this is quite difficult to do strictly in a gym environment. :/ Who said anything about a gym
  18. Ah, the story has now changed. It was a hoax. Would have been funny if it was legit!
  19. Yes I am, no not really. Just moved it, my bad!
  20. JonnoTheDev

    Wow

    http://www.bbc.co.uk/news/technology-14370878
  21. Download this script. It is a youtube clone. Pull it to bits and you will see how all the upload, conversion, etc is done http://www.phpmotion.com/ The server needs certain software already mentioned such as FFMPEG. The info is all there on the website link.
  22. Try adding symlinks into the .htaccess Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^us/([a-z0-9-]+)$ us.php?title=$1 [L] Please take the time to carefully read this tutorial. http://www.easymodrewrite.com/
×
×
  • 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.