kevinridge Posted December 28, 2007 Share Posted December 28, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/83511-is-it-possible-using-php/ Share on other sites More sharing options...
winmastergames Posted December 28, 2007 Share Posted December 28, 2007 You could upload the file to another file host like rapidshare or something like that so it never goes onto your server if thats what you mean? or a free webhost Quote Link to comment https://forums.phpfreaks.com/topic/83511-is-it-possible-using-php/#findComment-424912 Share on other sites More sharing options...
d22552000 Posted December 28, 2007 Share Posted December 28, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/83511-is-it-possible-using-php/#findComment-424918 Share on other sites More sharing options...
kevinridge Posted December 29, 2007 Author Share Posted December 29, 2007 ah ok Thanks . Just wanted to know the limits of php Quote Link to comment https://forums.phpfreaks.com/topic/83511-is-it-possible-using-php/#findComment-425033 Share on other sites More sharing options...
MadTechie Posted December 29, 2007 Share Posted December 29, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/83511-is-it-possible-using-php/#findComment-425039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.