Jump to content

ge00rge

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ge00rge's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm trying to post some javascript which is included in the script we are talking about but I keep getting server timeouts... EDIT:I just noticed that the thread was moved,sorry.
  2. I did some tests Summary: After your help I changed the code to this: [code]<?php $top = rand(1,100); $left = rand(1,100); echo "<div style=position:absolute; top:$top; left:$left;>"; ?> <?php if($downloadtimer == 0) { echo "<input type=submit value=\"Download It\" onClick=\"".$scripturl. "download2.php?a=" . $filecrc . "&b=" . md5($foundfile[2].$_SERVER['REMOTE_ADDR'])."\">"; } else { ?> If you're seeing this message, you need to enable JavaScript <?php } ?> </div>[/code] And now instead of the counter I get this message: "If you're seeing this message, you need to enable JavaScript". mgallforever: $downloadtimer  is defined in a config file.I have set it to 5 seconds.
  3. Ok,I changed the code to this: [code] <?php $top = rand(1,300); $left = rand(5,100); if($downloadtimer == 0) { echo "<div style=position:absolute; top:$top; left:$left;><input type=submit value=\"Download It\" onClick=\"".$scripturl. "download2.php?a=" . $filecrc . "&b=" . md5($foundfile[2].$_SERVER['REMOTE_ADDR'])."\"></div>"; } else { ?> If you're seeing this message, you need to enable JavaScript <?php } ?>[/code] I'm not getting any errors,but when the counter goes to zero the button stays on the same place. Any ideas?
  4. mgallforever could you be a bit more specific? The code I posted is already inside a <div>,so where exactly should I place your code? thanks!
  5. Hi all, I'm using a file hosting script and when someone goes to the download page to download a file there's a countdown timer.So when then counter goes to zero,the following code is used to display a button and give access to the file: [code] <?php if($downloadtimer == 0) { echo "<input type=submit value=\"Download it\" onClick=\"".$scripturl. "download2.php?a=" . $filecrc . "&b=" . md5($foundfile[2].$_SERVER['REMOTE_ADDR'])."\">"; } else { ?> If you're seeing this message, you need to enable JavaScript <?php } ?> [/code] I have already tried [code]style=\"position:relative;top:$top;left:$left;\" [/code] + [code]$top = rand(0,100); $left = rand(0,100); [/code] but it's not working. So is there any way to change the position of the "download button" using php? thanks! ps.I can post the whole script code if it's necessary.
  6. Ok,I used [code]ini_set( "memory_limit", "200M" );[/code] to change the limit to 200MB,I hope it's not too much!Thanks DocSeuss  :)
  7. You're right DocSeuss,the memory_limit is set to 16M,but I don't have access to php.ini to change the limit.I tried using .htaccess file,but it didn't work.Is there any way of "clearing" the memory after the script has finished its work?
  8. hi all, I'm using the script below to create thumbnails of uploaded images.The problem is when a file is ~1.5mb I get this error: "Fatal error: Allowed memory size of 29360128 bytes exhausted (tried to allocate 13056 bytes) in /var/www/hosts/mysite/http/imgup.php on line 29" .Is there a filesize limit when using ImagecreatefromXXX? [code]<?php $n_width=100; // Fix the width of the thumb nail images $n_height=100; // Fix the height of the thumb nail imaage $tsrc= "/var/www/hosts/mysite/http/img/" . $HTTP_POST_FILES['userfile']['name']; // Path where thumb nail image will be stored if ($HTTP_POST_FILES['userfile']['type']=="image/gif"){ $im=ImageCreateFromGIF($add); $width=ImageSx($im);              // Original picture width is stored $height=ImageSy($im);            // Original picture height is stored $newimage=imagecreatetruecolor($n_width,$n_height); imageCopyResized($newimage,$im,0,0,0,0,$n_width,$n_height,$width,$height); if (function_exists("imagegif")) { ImageGIF($newimage,$tsrc); } elseif (function_exists("imagejpeg")) { Header("Content-type: image/jpeg"); ImageJPEG($newimage,$tsrc); } chmod("$tsrc",0777); } if($HTTP_POST_FILES['userfile']['type']=="image/jpeg"){ $im=ImageCreateFromJPEG($add); $width=ImageSx($im); // Original picture width is stored $height=ImageSy($im); // Original picture height is stored $newimage=imagecreatetruecolor($n_width,$n_height); imageCopyResized($newimage,$im,0,0,0,0,$n_width,$n_height,$width,$height); ImageJpeg($newimage,$tsrc); } chmod("$tsrc",0777); ?> [/code] ($add is specified on another part.) thx
  9. Hi, I'm using flatFileHost script to allow uploading of files to my web server. When I installed the script,everything was working fine,but today there is a problem. When I upload a file,and after try to download it,I get this kind of screen -->[url=http://www.jpg.gr/images4/error.jpg]http://www.jpg.gr/images4/error.jpg[/url] ,instead of a download prompt. The content-type header in the download2.php script is set to "header('Content-type: application/octet-stream')" and my htaccess files look like this: File storage dir htaccess file: [code]order allow,deny deny from all[/code] root dir htaccess file: [code]<Files *.txt> order allow,deny deny from all [/code] Any ideas why is this happening?
×
×
  • 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.