FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Can someone make me a php script?





coolpages
Helo

Can someone make me a php scipt for my site.
I want to get the image uploader script... like http://imageshack.us

i also want one of that kind of upload manager for my site. if anyone know how to make it please help me... or if u can get me the code of it.

thnks... i will give you something in return.
coolpages
mathiaus
I am making something similar to this myself. Mine

-uploads the image
-renames it with a number
-places that number into a database with other information sent in the form

Do you just want it to upload or with database stuff? the whole database things aint ready yet but without it it is!

Matt Laughing
Alienz
Maybe you can try this site for PHP script. This site also have other language script Wink
the666bbq
the basics for any upload are :

first the (html) form :

<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="__URL__" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>


than the php file handling :

<?php
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.

$uploaddir = '/var/www/uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

print "</pre>";

?>




all the rest is ... practise
Laguna Loire
download manual php on php.net
then search with keyword "upload" ...
and you'll find bunch example of uploading file to your web server
Related topics
Phoenix free PHP scripts
error in my PHP script
how can i make a php script for enter username and password?
Inserting data to MYSQL with a PHP script
Running a "Hello World" php script
[PHP] Running Cron Jobs Via PHP Script
Simple PHP script not working
PHP Script- How can we install it
I need a VERY simple php script
PHP Script needed
Logging systeem php script
Preventing bad PHP script calls
array check box on php script using $_POST
How to change extension php to html but the php script still
Need php script 50 frih$ if you do
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.