Jump to content

Is it possible? Using PHP


kevinridge

Recommended Posts

Hello,

I was just learning php on my own and ran across a question. (right now im learning imap so ill ask it that way)

 

Imap allows me to connect to external email account :). Now i was wondering, say i want to upload a file to my email account BUT i dont want to upload the file to my server and than send it, is there a way?

 

Like i can visit hello.php and say i upload a wazup.wav. Now i know i can upload that file to server, than send an email to my email account with the uploaded file (on the server). But is there a way i can do that without needing to upload to the server and just send the time to my email account?

 

Just wondering ;)

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/83511-is-it-possible-using-php/
Share on other sites

no there is not a way of doing this (with php) because php does not do anything in your script until it recieves the file.  If you were using another language, you could have it recieve one packet of the file, send one packet of the file, delete that packet, and repeat.

 

But php cannot do this.

If you were using another language, you could have it recieve one packet of the file, send one packet of the file, delete that packet, and repeat.

 

But php cannot do this.

 

The Email will need to encode the file.. so sending packets while the upload is in progress will not work correctly anyway !!

its not a limit of php its a how email attachments works,

even if you used perl or cgi to support the upload, your still have problems talking to the mail server....

 

You can upload the but instead of moving the file from the tmp storage area, you could just encode it, and add that to the email.. the file itself can then be deleted, and the email will still contain the file for downloading..

 

EDIT: oh and as a side note.. PHP CAN send one packet at a time.. ie sockets

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.