Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 4 of 4
  1. #1
    DNF Member
    martialtiger's Avatar
    Join Date
    Jul 2005
    Location
    Los Angeles, CA
    Posts
    347
    DNF$
    26,288
    Bank
    0
    Total DNF$
    26,288
    Donate  

    ImageHost Script - Need Help with Creating Thumbnail Automatically

    Is anyone familiar with ImageHost script from here? I want to add a thumbnail generator but am not a programmer though I can navigate and find my way through code.

    Here's the upload code
    PHP Code:
    <?
        
    include("include/common.php");
        include(
    "include/header2.php");
        if(
    $loggedin){
            include(
    "include/accmenu.php");
        }
        if( 
    $_POST['submit'] && $_FILES['attached']['name'] ){
            
    $ok_filetypes explode("|",$att_filetypes);
            if (!
    $_FILES['attached']['error'] && $_FILES['attached']['size'] > $att_max_size*1024){
                
    errform('<table width=780 border=0 cellpadding=0 cellspacing=0><tr><td  valign=top bgcolor=#FFFFFF class=bod><br><br><CENTER><font color=red><b>Sorry, but the attached file is too large. Please reduce the size of it\'s contents.</b></font></CENTER></td></tr></table>'); // #err
                
    $step 1;
            }
            
    $filename = (!$_FILES['attached']['error'] ? substrbasename($_FILES['attached']['name']), -30 ) : '');
            
    $x strtolowersubstr($_FILES['attached']['name'], -3));
            if(
    $filename && !in_array($x$ok_filetypes) ){
                
    errform('<table width=780 border=0 cellpadding=0 cellspacing=0><tr><td  valign=top bgcolor=#FFFFFF class=bod><br><br><CENTER><font color=red><b>Sorry, the filetype you have tried to upload is not allowed.</b></font></CENTER></td></tr></table>');
                
    $step 1;
            }
            if(!
    $posterr){
                if(!isset(
    $_GET["ipaddress"]) || ($_GET["ipaddress"] == "")) {
                    
    $ipaddress $_SERVER['REMOTE_ADDR'];
                    
    $local 1;
                } else {
                    
    $ipaddress $_GET["ipaddress"];
                    
    $local 0;
                }
                
    $uniq substrmd5(uniqid (rand())), 010 );
                
    $ext strtolowersubstr($_FILES['attached']['name'], -3));
                
    move_uploaded_file($_FILES['attached']['tmp_name'], $att_path."/".$uniq.".".$ext );
                
    $strQuery  "INSERT INTO images SET ";
                
    $strQuery .= "filename='".$uniq.".".$ext."',";
                
    $strQuery .= "ipaddress='{$ipaddress}',";
                
    $strQuery .= "date='".time()."',";
                
    $strQuery .= "pkey='{$uniq}',";
                if(
    $myuid){
                    
    $strQuery .= "user='{$myuid}',";
                }
                
    $strQuery .= "status='1'";
                
    $result mysql_query($strQuery) or die( mysql_error() );
                
    $aid mysql_insert_id();
                if(
    $aid){
                    
    $filen $siteurl."/".str_replace('./'''$att_path)."/".$uniq.".".$ext;
                    
    $filen str_replace('http://','%%',$filen);
                    
    $filen str_replace('//','/',$filen);
                    
    $filen str_replace('%%','http://',$filen);
                    
    $step 2;
                }else{
                    
    $step 1;
                }
            }
        }else{
            
    $step 1;
        }
        if(
    $step == 1){
    ?><table width=780 border=0 cellpadding=0 cellspacing=0><tr>
        <td  height=380 valign=top bgcolor=#FFFFFF class="bod"> 
          <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td class="bod">
                    
                <div align=center><br>
                  <br>
                  <br>
                  <br>
                  <form ENCTYPE="multipart/form-data" method="post" name="form1">
                        <INPUT NAME="attached" TYPE="file"  size="50"><br>
                        File extensions allowed: <b><?=implode("</b>, <b>",explode("|",$att_filetypes))?></b><br>
                        File size limit: <b><?=$att_max_size?>KB</b>
                        <br><br>
                        <input type="submit" name="submit" value="Upload Image">
                    </form>
                    </div>
                </td>
            </tr>
            </table>
        </td>
      </tr></table>
    <?
        
    }else{    ?><table width=780 border=0 cellpadding=0 cellspacing=0><tr><td  height=434 valign=top bgcolor=#FFFFFF class="bod"> 
          <div align="center"><b><br>
            <font color=green>Your image has been successfully uploaded!</font></b><br>
      <br>
    </div>
    <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td><div align="center"><img src="<?=$filen?>"></div></td>
            </tr>
            <tr>
                <td class="bod"><div align="center"><br>
                    To insert this image in a message board post copy and paste the following
                    code:<br>
                    
            <textarea name="textarea" cols="50" wrap="soft" rows="3">[url=<?=$siteurl?>][img]<?=$filen?>[/img][/url]</textarea>
                </div></td>
            </tr>
            <tr>
                <td class="bod"><div align="center"><br>
                    To send this image to friends and family, copy and paste this code: <br>
            <textarea name="textarea2" cols="50" rows="4"><?=$filen?></textarea>
          </div></td>
            </tr>
            <tr>
                <td class="bod"><div align="center"><br>
                    To insert this image using HTML, copy and paste the following
                    code:<br>
                    
            <textarea name="textarea3" cols="50" wrap="soft" rows="3"><a href="<?=$siteurl?>" target="_blank"><img alt="Image Hosted by <?=$sitename?>" src="<?=$filen?>" /></a></textarea>
                </div></td>
            </tr>
            <tr>
                <td>&nbsp;</td>
            </tr>
            </table></td></tr></table>
    <?    }    ?>
    <?
        
    include("include/footer.php");
    ?>
    TIA & Happy Holidays!

  2. #2
    Gold Lifetime Member
    manueld64's Avatar
    Join Date
    May 2005
    Location
    Arizona
    Posts
    174
    DNF$
    637
    Bank
    0
    Total DNF$
    637
    Donate  

    Re: ImageHost Script - Need Help with Creating Thumbnail Automatically

    what does it use GD or imagemagick? what is the actual site for that software?

  3. #3
    The One
    VisualDigits's Avatar
    Join Date
    Mar 2005
    Location
    New Jersey
    Posts
    1,917
    DNF$
    1,210
    Bank
    0
    Total DNF$
    1,210
    Donate  

    Re: ImageHost Script - Need Help with Creating Thumbnail Automatically

    I wouldn't buy that script. The page says "Demo crick here"
    Last edited by DomainMaster; 01-13-2006 at 12:34 AM.
    Cogito, ergo sum!

  4. #4
    DNF Member
    martialtiger's Avatar
    Join Date
    Jul 2005
    Location
    Los Angeles, CA
    Posts
    347
    DNF$
    26,288
    Bank
    0
    Total DNF$
    26,288
    Donate  

    Re: ImageHost Script - Need Help with Creating Thumbnail Automatically

    yeah I actually deleted the script. Thanks though guys. This thread should be closed now.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Domain name forum recommended by Domaining.com