Do you like my website ?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
daniellematy
Forum Newbie
Posts: 7
Joined: Wed Feb 29, 2012 6:10 am

Do you like my website ?

Post by daniellematy »

Hey, iv recently made a image hosting website http://www.picwizz.com

Its really simple and you can host pictures to forums, ebay etc

Please give me feedback and start using it :P
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Do you like my website ?

Post by social_experiment »

You should create a landing page explaining a bit more about the site and it's uses. If you didn't explain it's purpose i wouldn't have know what it was for; displays ok in IE9
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Do you like my website ?

Post by AbraCadaver »

I only looked at the main page, but you should check all pages:

http://validator.w3.org/check?uri=http% ... ne&group=0
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Do you like my website ?

Post by greyhoundcode »

Once a file is selected it is almost impossible to see the filename in the file input area.

The background is white #ffffff and the color is #f4f7fb ... could you increase the contrast a little? First time round I thought I had made a mistake and clicked Cancel instead of Open on the file requester.
daniellematy
Forum Newbie
Posts: 7
Joined: Wed Feb 29, 2012 6:10 am

Re: Do you like my website ?

Post by daniellematy »

ok, thanks ill change that now :)
lisarose90
Forum Newbie
Posts: 1
Joined: Sat Mar 31, 2012 10:40 am
Location: 1679 Arthur Avenue Freeport, IL 61032

Re: Do you like my website ?

Post by lisarose90 »

its a wonderful website i really like your website. thanks for share
daniellematy
Forum Newbie
Posts: 7
Joined: Wed Feb 29, 2012 6:10 am

Re: Do you like my website ?

Post by daniellematy »

thank you, glad you like it :D
Bubi
Forum Newbie
Posts: 5
Joined: Wed Mar 28, 2012 8:36 pm

Re: Do you like my website ?

Post by Bubi »

There are a few coding issues I ran across:
First, you can upload any file, and the file check runs AFTER you uploaded the file. Check the file extension before starting uploading. That'll save you bandwidth.
Also, if going to http://www.picwizz.com/uploaded directly,

Code: Select all

Notice: Undefined index: file in /home/daniel/public_html/uploaded.php on line 34
Check if there was a file uploaded, and if not, redirect to index.php

My respect for the ambitious plan never to delete a file, and for no size limit.
daniellematy
Forum Newbie
Posts: 7
Joined: Wed Feb 29, 2012 6:10 am

Re: Do you like my website ?

Post by daniellematy »

Yeah I have been Workington on these issues today. Try now I think I have sorted everything out :)
Bubi
Forum Newbie
Posts: 5
Joined: Wed Mar 28, 2012 8:36 pm

Re: Do you like my website ?

Post by Bubi »

You write on your page there is no limit, but your script times out after around 10 seconds. For uploading files you may increase that time limit - 10 seconds with a 1mbps upload rate are around 1MB, which is easily exceeded even with smartphone cameras. Increase the max_execution_time in your php preferences.
Additionally, I'd would set a file size limit nevertheless, people could upload illegal software, just with renaming the ending to jpg...

Which gets me to another point: Error Handling

#1:
If you upload a simple binary file it gets uploaded, and checked afterwards. A simple check like:

Code: Select all

$allowed_filext = array(".gif", ".jpg", ".png", "jpeg");
$filext = substr($path, -4 );

If (in_array($filext, $allowed_filext)) {
{
//do your file uploading
}
else
{
//here comes your error, like "Your image has no .gif, .jpg, .png or .jpeg ending"
}
assuming $path as the to-be-uploaded-filepath; would check if the extension matches the predefined ones.

#2:
If you upload a file which isn't a picture (but has a gif/jpg/png/jpeg ending), you get loads of error messages.
If the upload is done, check if the uploaded file is a valid image. If not, print an error message, and delete the file.


php.net is always an interesting read:
http://us2.php.net/manual/en/features.f ... method.php
http://us2.php.net/manual/en/features.f ... tfalls.php
daniellematy
Forum Newbie
Posts: 7
Joined: Wed Feb 29, 2012 6:10 am

Re: Do you like my website ?

Post by daniellematy »

thanks but people can upload files with .jpg on the end. Iv added code which will check for that. Also it doesnt time out after 10 seconds. iv upload mutliple pictures at once and it uploads fine. i will change the time out limit in the php.ini file , and also change the size limit :)
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Do you like my website ?

Post by social_experiment »

Just a word on file extension checking: just because it says .gif doesn't mean it's a .gif; rather go for a MIME type check. Have a look at these two urls for a better understanding
http://www.scanit.be/uploads/php-file-upload.pdf
viewtopic.php?f=34&t=125329&hilit=+File+uploads
You mention only .jpg extensions are valid; so enforce it: create a new file name and add the extension yourself
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Do you like my website ?

Post by greyhoundcode »

If someone accidentally uploads a file that isn't really an image file (but does have a file extension such as .jpg) then a number of errors occur and are displayed, exposing some amount of information about your server's directory structure, etc. Generally speaking it's a good idea to turn off the display of errors, at least in a "live" environment.
daniellematy
Forum Newbie
Posts: 7
Joined: Wed Feb 29, 2012 6:10 am

Re: Do you like my website ?

Post by daniellematy »

thank you :)
Post Reply