How to save uploaded file in qq file uploader using php? - php

I am using https://github.com/Widen/fine-uploader uploader script on my website. I am searching for solution to save uploaded file in qq file uploader using php server side script.
I tried to request file using $_FILES['qqfile']['tmp_name'] but didn't works. Can anyone tell me php example to request and save file in qq file uploader?

Have a look at the php example in the server folder of the file-upload github project.

goto this url
http://code.google.com/p/php-axiom/source/browse/trunk/libraries/uploader/qqUploadedFileXhr.class.php?spec=svn41&r=41
or search about qqUploadedFileXhr

Incase of those who may bump into this thread, here's a perfect example, helped me alot
http://wsnippets.com/fancy-profile-image-upload-crop-jquery-ajax-php/

Related

how to upload file from a link? [PHP]

I have a php project and it needs to upload a file to the server from a [blob] link... I have searched and all I found was to upload a file with tag and it is not my case.
You can use simple file_put_content and file_put_contents
for example
file_put_contents("file.extension", ("link"));

how to upload excel without browse option in php

i can easily upload excel if i used simple
<input type="file" name ="file">
this function simple browse the file and using simple php code excel data is saved in the data base. I need to upload excel file in some directory on time bases by cron job . i know very well cron job but. i am unable to do without input type file there is any way to upload file with using file type.
Pl z suggest me if any solution for that i waiting.
Thanks and regards
You can use wget or curl, see this thread on Superuser for examples:
https://superuser.com/questions/86043/linux-command-line-tool-for-uploading-files-over-http-as-multipart-form-data
The rename function does this (delete old file)
rename('text.xls', 'folder_2/text.xls');
PHP RENAME DOC
if you want to keep old file
The copy function
copy('text.xls', 'folder_2/text.xls');
PHP COPY DOC

Rename and saving remote image to server

i'm looking for a simple way to download remote images to my sever, rename and save image name to database.
I know how to download the file easily to my sever
copy('http://example.com/file.jpeg', '/tmp/file.jpeg');
But how to i rename the image while downloading or after download?
I would really appropriate if anyone can tell me a simple way to do this using php
In copy function just change file name:
copy('http://example.com/file.jpeg', '/tmp/any_file_name.jpeg');
I think this should do the Job
rename("/tmp/tmp_file.jpg", "/home/user/login/docs/my_file.jpg");
you have to do this after you downloaded it
or just change the file name while you dwonload it e.g.
copy('http://example.com/file.jpeg', '/tmp/some_name.jpg');

Basic steps for setting up file upload on website

I'm trying to set up a file upload for my website but I'm not sure what I'd need to get this to work overall. I'm trying to use Jquery File Upload but I can't seem to get the files to upload to my server. It looks like I might need something else to get it to run but I'm not sure what. Any suggestions?
There are three "sides" to a file upload.
First is client-side: You need to have a form that can upload files (so you need to set the enctype attribute of your form element, and set your action to post).
Second is server-side: You need something that can handle the file upload. Assuming you're using a server with PHP, you can access the file via $_FILES['filename']. Google has a vast array of example for handling file uploads.
Third is server-side (again) - your server must allow file uploads. Not only must it allow file uploads, but it restricts the size of the file that can be uploaded (php config).
However, it looks like jquery file upload has a PHP file handler.
I will sugest you use dreamweaver its easy to use expecially to upload files to the web n you can also see the steps needed in its help content. or you may download an ftp uploader

Downloading pdf files from a website and changing the filename after download

I am trying to download some files. I have written a php script that can gather all of the address of the pdf files I need to download into a array but the file names on that server are odd. How does one go about downloading pdf files with php?
you can try (if I understand your question correctly)
file_put_contents('/your/file/name.pdf',
file_get_contents('http://www.example.com/oddFile.pdf'))
Check out the file or file_get_contents functions. It can take URLs as well as local filenames.
http://www.php.net/manual/en/function.file.php
http://www.php.net/manual/en/function.file-get-contents.php

Categories