473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

simple file transfer

hello

how can i simple transfer a file from a server to my server and display
the progress with ajax in the users browser?

i've tried with curl, but i cant get the progress.
are there any libraries for simple file transfers out there?

kind regards
//B

May 16 '06 #1
3 2206
Try Uber Uploader, its a combo of PHP, Perl and Javascript at:
http://uber-uploader.sourceforge.net/
Regards

Jon Tjemsland

May 16 '06 #2
Thank you.

But I'm not looking for an upload progress.
I'd like to transfer Files between two servers after a user action. The
user should then have a response about the progress.

regards
//Benny

May 16 '06 #3

Benny Schudel wrote:
hello

how can i simple transfer a file from a server to my server and display
the progress with ajax in the users browser?

i've tried with curl, but i cant get the progress.
are there any libraries for simple file transfers out there?

kind regards
//B


You can attend a callback function to a PHP stream. I am not sure if
it's sufficient for what you're trying to do. From an old post:

$context = stream_context_create(array());
stream_context_set_params($context,
array('notification' => 'stream_callback'));
$f = fopen("http://www.google.com/", "rb", false, $context);

The parameters passed to the function are as followed:

function stream_callback(
$notifycode,
$severity,
$xmsg,
$xcode,
$bytes_sofar,
$bytes_max)

Notification codes are defined as such:

1 = RESOLVE
2 = CONNECT
3 = AUTH_REQUIRED
4 = MIME_TYPE_IS
5 = FILE_SIZE_IS
6 = REDIRECTED
7 = PROGRESS
8 = COMPLETED
9 = FAILURE
10 = AUTH_RESULT

Severity codes:

0 = INFO
1 = WARNING
2 = ERROR

May 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike | last post by:
Hey! Im starting up a new python based project, its a very simple file tracker for our network. Some people would most likely call this a kind of asset management system but its much simplier...
11
by: Stephan Steiner | last post by:
Hi Generally, FileInfo fi = new FileInfo(path); long size = fi.Length; gets you the length of a file in bytes. However, when copying files, even while the copy operation is still in...
3
by: Tina | last post by:
I have page1.aspx and page2.aspx. Lets say page1 has a hyperlink to page2. If the user clicks on that hyperlink Page two will be displayed either in a new window or the same window(depending on...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
3
by: JezB | last post by:
I know I can use the querystring mechanism to pass simple parameters to a Page using Response.Redirect, but Im having problems getting this to work using Server.Transfer or Server.Execute - is this...
4
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a...
6
by: JPSutor | last post by:
Does anyone have an example of a simple FTP trasfer app? All I need to do is transfer one file up to a web site and then retrieve it again. Every example I run into is loaded with code that, to...
1
by: Alex | last post by:
Hello, I'm trying to write a little php script to transfert some files from a server to clients (web/http). It's working fin with small files. But transfering big files (try on 1Gb) failed!...
0
by: fiona | last post by:
Yucca Valley, CA, - October 2007: Catalyst Development Corporation, publisher of SocketTools, SocketWrench and LogicGem, today announced the release of Catalyst File Transfer .NET V5.0. For...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.