SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Zealot CalebMingle's Avatar
    Join Date
    Jul 2007
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My image uploader

    I am not sure exactly where to post it, move it if its wrong.

    But could you try out my uploader?

    http://www.calebmingle.com

    I am learning to use classes (Which make things WAY easier) and saves tons of time.

    If you could please test it out, and report any bugs / feature ideas that would be great!

    Thanks,
    Caleb
    :: Caleb Mingle (@dentafrice)
    :: PHP Developer.
    :: g+: http://gplus.to/mingle

  2. #2
    SitePoint Zealot JarretCade's Avatar
    Join Date
    Aug 2007
    Location
    California
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works just fine for me.

    I am also in the process of creating an image uploader
    Web Hosting Comparison - WebHostsDeals.com - Leave your review!

  3. #3
    SitePoint Zealot CalebMingle's Avatar
    Join Date
    Jul 2007
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Classes are awesome for this, it makes it tons easier and saves tons of time
    :: Caleb Mingle (@dentafrice)
    :: PHP Developer.
    :: g+: http://gplus.to/mingle

  4. #4
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Worked for me too

  5. #5
    SitePoint Zealot CalebMingle's Avatar
    Join Date
    Jul 2007
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fixed the spaces bug, now outputs %20 with spaces
    :: Caleb Mingle (@dentafrice)
    :: PHP Developer.
    :: g+: http://gplus.to/mingle

  6. #6
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    I'm curious about "Please do NOT include dots (.) in the filename." Whats the reason there?
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  7. #7
    SitePoint Zealot CalebMingle's Avatar
    Join Date
    Jul 2007
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When making the filename:

    $random = $this->generate_random();
    $name = explode(".", $this->filename);
    $random2 = $this->generate_random();
    $this->filename = "$random$name[0]$random2$filetype";
    $this->insert();

    it grabs the original filename ex: test.png, would grab test and put the random characters in. Dots in the file name would mess it up

    it was late and I couldn't think of any other way to do it, got any ideas?
    :: Caleb Mingle (@dentafrice)
    :: PHP Developer.
    :: g+: http://gplus.to/mingle

  8. #8
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $filename substr($filename0strrpos($filename'.') - 1); 

  9. #9
    SitePoint Zealot CalebMingle's Avatar
    Join Date
    Jul 2007
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Works just fine, never thought of doing it that way
    :: Caleb Mingle (@dentafrice)
    :: PHP Developer.
    :: g+: http://gplus.to/mingle

  10. #10
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    I would like to see the source code of this image uploader >.>
    Just cause I'm bored and nothing to tinker with anymore. T_T

    EDIT:
    If you are on PHP5.2.0 can use pathinfo.
    PHP Code:
    <?php

    $rA 
    $this->generate_random();
    $rB $this->generate_random();

    $name pathinfo($this->filenamePATHINFO_FILENAME);

    $this->filename $rA $name $rB $type;

    $this->insert();
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  11. #11
    SitePoint Zealot CalebMingle's Avatar
    Join Date
    Jul 2007
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am on 4 And the files are stored in MySQL.
    :: Caleb Mingle (@dentafrice)
    :: PHP Developer.
    :: g+: http://gplus.to/mingle

  12. #12
    SitePoint Zealot CalebMingle's Avatar
    Join Date
    Jul 2007
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have now introduced some new features:

    E-Mail to a friend on the view image page!
    AJAX star Rating system on the view image page!
    :: Caleb Mingle (@dentafrice)
    :: PHP Developer.
    :: g+: http://gplus.to/mingle


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
  •