Jump to content


Check out our Community Blogs

Irbis

Member Since 27 Jul 2012
Offline Last Active Mar 03 2013 06:04 AM
-----

Topics I've Started

Web-Designer/Developer

03 March 2013 - 06:07 AM

I am a high school student, after school i work as a freelancer on web-design and web-development! I have over 2 years of experience in web-developing i specialize in standards-based XHTML, CSS, WordPress and PHP OOP web development. Each site I develop is built to be search engine friendly, using the latest development principles and techniques. To find out more about what I can do for you, check out my site www.prifantom.com and hit "contact me" button to get in touch with me. www.prifantom.com


File Upload

27 July 2012 - 08:51 PM


?php



/**  

 * @copyright © 2012 www.prifantom.com

 */  

    function uploadHandle($max_file_size = 100, $valid_extensions = array(), $upload_dir = '.')  

    {  

      

        $error = null;  

        $info  = null;  

        $max_file_size *= 1024;  



        if ($_FILES['userfile']['error'] === UPLOAD_ERR_OK)  

        {  

            // checking the file extension

            $file_extension = pathinfo($_FILES['userfile']['name'], PATHINFO_EXTENSION);  

            if (in_array($file_extension, $valid_extensions))  

            {  

                // checking the file_size

                if ($_FILES['userfile']['size'] < $max_file_size)  

                {  

                    $destination = $upload_dir .'/' . $_FILES['userfile']['name'];  

      

                    if (move_uploaded_file($_FILES['userfile']['tmp_name'], $destination))  

                        $info = 'File successful uploaded!';  

                    else  

                        $error = 'Cannot upload file at this time. Please try again later.';  

                }   

                else  

                    $error = 'File size more then it need 100mb';  

            }   

            else  

                $error = 'Invalid file extension!';  

        }   

        else  

        {  

            // array of errors

            $error_values = array( 

                UPLOAD_ERR_OK        => "No errors.", 

   UPLOAD_ERR_INI_SIZE    => "Larger than upload_max_filesize.", 

   UPLOAD_ERR_FORM_SIZE    => "Larger than form MAX_FILE_SIZE.", 

   UPLOAD_ERR_PARTIAL    => "Partial upload.", 

   UPLOAD_ERR_NO_FILE        => "No file.", 

   UPLOAD_ERR_NO_TMP_DIR    => "No temporary directory.", 

   UPLOAD_ERR_CANT_WRITE    => "Can't write to disk.", 

   UPLOAD_ERR_EXTENSION     => "File upload stopped by extension.", 

   UPLOAD_ERR_EMPTY        => "File is empty." // add this to avoid an offset



                                  );  

      

            $error_code = $_FILES['userfile']['error'];  

      

            if (!empty($error_values[$error_code]))  

                $error = $error_values[$error_code];  

            else  

                $error = 'Something strange happened';  

        }  

      

        return array('info' => $info, 'error' => $error);  

    }  

      

/////////////////////////////////////////////////////////////////////      

    $extensions = array('jpg', 'jpeg', 'png', 'gif');  

    $upload_dir = 'images';  

      

    // run the function

    if(!empty($_POST['upload_submit'])) 

    {      

        $message = uploadHandle(200, $extensions, $upload_dir);  

    

        // Выводим сообщение  

        echo $message['error'] ? $message['error'] : $message['info'];  

    } 

?>  



<form action="file_upload.php" method="post" enctype="multipart/form-data"> 

<input type="file" name="userfile" /> 

<input type="submit" value="Upload" name="upload_submit" /> 

</form>


Vehicle Online Business

27 July 2012 - 02:48 PM

Hello guys i want to make something like craiglist.org and copart.com but for cars where people can buy-sell cars. I love cars, and programming so i decided to combine these things together. I live in USA Atlanta do you think i can make it? and make these only for our state Georgia. And also i want to use amazon affiliate program where users can buy vehicle parts. What's your opinion? and do i need any papers to run that business :) I am web-developer who know PHP , JS/jQuery, HTML on the pro level!

Prifantom™ Web-Development

27 July 2012 - 02:26 PM

WE DESIGN, MANAGE AND DEVELOP CUSTOM WEB APPS THAT SUIT YOU:
our services
PSD to HTML to Wordpress
custom jquery, js and php app development from scratch using oop/and our own framework

prices
psd to html = $55
html to wordpress = $100
custom jquery, js and php app = starting from $100 everything depends on the project

We convert your designs to HQ, cross-browser compatible, valid HTML/XHTML / CSS3 W3C Valid markup.
Also we develop different application in php/js/jquery integration using OOP/MVC.
After finish the work you can see our work in the demo mode and the pay for our service. No money Back!
You can also checkout our website prifantom.com

to contact email us irbis.team@gmail.com

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download