Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    Ontario, Canada
    Posts
    104
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Server data compilation and email to visitor

    Just a curiosity question as to whether or not this can be done and what SS language would perform the task.

    Imagine pages of graphics spread over various categories throughout a site. Now imagine you can pick whichever graphics you like by, let's say, clicking a checkmark in a checkbox, filling out some information like email address, clicking a "compile" button, and the graphics are compiled/assembled on the server, zipped and sent automatically to the email address you gave. Make sense? A fully automated "make your own graphics zip file" and have it delivered personally to your inbox concept!

    Given the size limitations of people's inboxes, I guess the program would have to be intelligent enough to know when a specified maximum file size has been reached and to zip any extra graphics in a second zip file (or third or fourth) and send them separately.

    Is this possible and, if so, what SS language would be used? I'm imagining a database / ASP kind of thing??

    Any and all feedback is appreciated. Thank you.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Everthorpe, nr Hull, UK
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb POSSIBLE SOLUTION

    hi Deanna475

    If you compile the images for each section into zip files before hand.

    so if you three sections cars, animals, trees, you would have three zip files cars.zip, trees.zip and animals.zips.

    This way you only need to email them a link to required zip files which they can click and download as and when they are ready with out sending a large email which if goes over 10mb will take forever to download.

    if you created a database with a table called zips and in here put following collums. zipID, zipname, description, link.

    This way you can put the name of the catergories and a breif description and the url in for the zip file for this catergory.

    Then on the page where the visitor chooses you make a table with 3 collums and 2 rows.

    In the 1st row 2nd collum put catergory 3rd collum put description,

    In the 2nd row 1st coullum put a dynamic checkbox with the url filed of your table as the value in the checked state with the zipID field in the name tag this way each check box has it's own name.

    In the 2nd row 2nd collum put the catergory field form your table and in the 3rd collum put the description field.

    once this is done put a repeat region on the 2nd row for all results. this way the recordet getting the data from the table will display a check box a catergory name and a description for all the catergories that ou have put into the table.

    This table is in a form set to post the information to page2 this way when the visitor clicks a few of the check boxes and clicks the button it will send all this infomation to the next page.

    Page2 you set up a request.form with the names of all the fileds for the details the visitor has typed in. here is the fun part.

    You then set up a request.form tag but you put the zipID field form your recordset in stead of puting a value for it to request.
    You put this request.form tag in a repeat region the same as you did for the check boxes. this way their will be a request.form("zipID") for every checkbox no matter how many you have on the table because the more check boxes you have the more request.forms you will also have.

    This now means that on page 2 you can display the details the visitor has filled in and the checkboxes they have ticked.

    You now can compose the email you wish to send form the information you now have.

    I would use something like the asp version of formmail which has yet to be affected by the hackers for spaming.

    This scritp requires on 4 bits of information to send the email.
    the recipeint of the email. which use the data from the info we have pulled form the previous page.
    a subject for the email. which you can choose your self.
    a from address which you can set up to either your email address or the defualt email address for the site.
    and finally a redirect url for when to send the visitor after the email has been sent normmaly a thanks page or a sent page.

    the script will then include any form elements that are inside the form.

    so you simply put in a few hidden fields and put in the email address and the subject then put in a hidden field called message. as the vaule for this you can put in a thanks for using my site message and then put the repeat region requesting the zipID field form the other page. this will then put a list of url's into the message box which after it has been sent will be hyperlinks in the email if you put the full http address for the zip files into your table.

    Now you can display the message in the hidden field on the page to show the visitor what you are sending them and then have a button to send the email, or you can make page 2 auto submit the information the moment it loads this way the visitor files in the form and then clicks go and it sends the data to page two and this page then auto submits and is seen for about half a second before the browser jumps to the thanks page

    This is a very simple way of doing it without using complicated server side scripts to generate the email for you and compiling the zip files for you.

    If you need a copy of the formmail.asp and a copy of a autosubmitting form let me know and i'll put one up for you to download.

    I use a similar process for a few different things as the basic system can be used to send all sorts of weird and wonderful dynamically generated emails.

    Unless you have access to sql2000 or similar where you simply create a stored proceddure to use sql mail to generate and send the email as a result of the user submitting the information into your database. which could be handy if you want to keep a track of who is downloading what as it would give you a table full of email details that you use to tagert certian people with emails reguarding information for the catorgies they have choosen at a later date.

    but this means designing a lot more stuff.

    well i hope this gives you something to think about?

    Cheers

    Dean

    In the beginning god said "let there be light." and from out of the darkness a pen pusher was heard to say "not to much. that's expensive that is!"

  • #3
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What server are you running? If you are running Apache in UNIX / Mac OS X with PHP, you could do this easily using sessions to store which files are to be zipped and PHP to Zip the files and e-mail them.

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    Everthorpe, nr Hull, UK
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hi dan_c00per

    Hi

    i am running window 2000 on the server and then using the IIS 5 or 6.

    At the present I now have the asp upload running up to 100mb by extending the server-side-script timeout setting. and modifying the aspupload script to accept larger files.

    The main problem is the path for the aspupload must be set on the server so it has meant that i have to re make some of the pages to hold the data on the server instead of as session held by the persons computer as they go through the system.

    At the moment i have been busy working on other projects and have not really had the tyime to sit and have a good play with the system. but it is all working as is just needs a little fine tunning at the moment.

    Cheers

    Dean

    In the beginning god said "let there be light." and from out of the darkness a pen pusher was heard to say "not to much. that's expensive that is!"

  • #5
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Session data is held in a temporary file on the server which is referenced by a Session ID, so the data can be accessed server-side if you know the Session ID (Not sure how to get that on MS server, I use Apache / Mac OS X)

  • #6
    Regular Coder
    Join Date
    Sep 2002
    Location
    Everthorpe, nr Hull, UK
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hi dan_c00per

    hi again

    at the moment all the info is being accepted even down to the meail being sent i have even added a miacsoft agent to wonder round and explain what goes where.

    it seems this code which is for the part of the asp upload page that hadle the actual uploading of the loacation do not seem to like the dynamics i have put in to get the location from the server.

    here is the code the page uses.

    <%
    Set Upload = server.CreateObject("Persits.Upload.1")
    Upload.SetMaxSize 10000000, True
    Upload.OverWrtieFiles = True
    Upload.SaveVirtual ("/upload/Files/")
    %>

    this is the code as i have it set at the moment but when i try to run it like this with the dynamic source it comes up with undifined path

    <%
    Set Upload = server.CreateObject("Persits.Upload.1")
    Upload.SetMaxSize 10000000, True
    Upload.OverWrtieFiles = True
    Upload.SaveVirtual (" (Recordset1.Fileds.Item("location").Value)")
    %>

    which at present is the line i am going along
    Cheers

    Dean

    In the beginning god said "let there be light." and from out of the darkness a pen pusher was heard to say "not to much. that's expensive that is!"

  • #7
    New Coder
    Join Date
    Mar 2003
    Location
    Sussex, England
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am not familiar with ASP, but from my experience with PHP etc, I noticed two things:

    First, 'Upload.OverWrtieFiles' is spelled wrong, not sure how much effect this would have.

    Second, I would replace
    Upload.SaveVirtual (" (Recordset1.Fileds.Item("location").Value)")

    with
    Upload.SaveVirtual ((Recordset1.Fileds.Item("location").Value))

    I think it will take the code in the quotes as a literal path and look for a folder starting with (Recordset1..... etc, without the quotes it should process the code.

    Not totally sure that is the prob. but that would certainly be a prob in most other languages I know.

  • #8
    Regular Coder
    Join Date
    Sep 2002
    Location
    Everthorpe, nr Hull, UK
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hi there

    the spelling mistake was me i was rreading the code of the other screen.

    i have removed the quotes and put them in the database so that when the server generates the info out of the data to replace the recordeset tags it replaces it with "/upload/file/" but it is still being a bit funky.

    i'll get it done in the end.

    Then flat pack the database so i you simply fill in the user details and then and then login in and your off. this way it can be out in use anywhere then on any site that is running aspupload on thier server.

    Cheers

    Dean

    In the beginning god said "let there be light." and from out of the darkness a pen pusher was heard to say "not to much. that's expensive that is!"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •