Announcement

Collapse
No announcement yet.

Multiple field indexes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Announcing MvBinary (was RE: encode base64)



    Cool. Thanks a lot, James!

    Markus


    -----Original Message-----
    From: [email protected] [mailto:[email protected]] On Behalf
    Of James Harrell
    Sent: Wednesday, October 13, 2004 7:21 PM
    To: James Harrell; Jeff Huber - Listmail; 'Ivo Truxa'; 'Miva Users List'
    Subject: [meu] Announcing MvBinary (was RE: [meu] encode base64)

    New free library, Copernicus MvBinary Utilities:
    <A HREF ="http://www.copernicusllc.com/products/source/">http://www.copernicusllc.com/products/source/</A>

    Provides the following binary I/O utilities:
    simport/fimport: script/datadir binary file import into variable
    sexport/fexport: script/datadir binary file export from variable

    Not sure why Miva Script doesn't have these to begin with, but I guess
    that's why they gave us the API. :)

    cheers,
    James

    -----Original Message-----
    From: [email protected] [mailto:[email protected]]On
    Behalf Of James Harrell
    Sent: Wednesday, October 13, 2004 12:29 PM
    To: Jeff Huber - Listmail; 'Ivo Truxa'; 'Miva Users List'
    Subject: RE: [meu] encode base64


    Hey Jeff,

    I just remembered- last time I needed to solve this problem, I did in fact
    write a binary utilities function library. I'll post source to our website
    shortly. :)

    cheers,
    james


    Comment


      #32
      Announcing MvBinary (was RE: encode base64)



      After a shaky start, you guys are getting higher and higher marks in my
      little miva script book :)

      Scot

      James Harrell wrote:
      > New free library, Copernicus MvBinary Utilities:
      > <A HREF ="http://www.copernicusllc.com/products/source/">http://www.copernicusllc.com/products/source/</A>
      >
      > Provides the following binary I/O utilities:
      > simport/fimport: script/datadir binary file import into variable
      > sexport/fexport: script/datadir binary file export from variable
      >
      > Not sure why Miva Script doesn't have these to begin with, but
      > I guess that's why they gave us the API. :)
      >
      > cheers,
      > James
      >
      > -----Original Message-----
      > From: [email protected] [mailto:[email protected]]On
      > Behalf Of James Harrell
      > Sent: Wednesday, October 13, 2004 12:29 PM
      > To: Jeff Huber - Listmail; 'Ivo Truxa'; 'Miva Users List'
      > Subject: RE: [meu] encode base64
      >
      >
      > Hey Jeff,
      >
      > I just remembered- last time I needed to solve this problem, I
      > did in fact write a binary utilities function library. I'll post
      > source to our website shortly. :)
      >
      > cheers,
      > james
      >
      >

      Comment


        #33
        Announcing MvBinary (was RE: encode base64)



        James I forgot to say thanks publicly on the list.

        Thanks.

        I haven't had a chance to look at it yet, I have been working
        pretty much non stop on but I will definitely try it out later.

        - Jeff Huber
        President 4TheBest eCommerce Solutions
        http://4TheBest.com
        [email protected]
        Office: 760-742-1469
        Cell: 760-445-8454
        =20


        -----Original Message-----
        From: [email protected]
        [mailto:[email protected]] On Behalf Of James Harrell
        Sent: Wednesday, October 13, 2004 10:21 AM
        To: James Harrell; Jeff Huber - Listmail; 'Ivo Truxa'; 'Miva
        Users List'
        Subject: [meu] Announcing MvBinary (was RE: [meu] encode base64)


        New free library, Copernicus MvBinary Utilities:
        <A HREF ="http://www.copernicusllc.com/products/source/">http://www.copernicusllc.com/products/source/</A>

        Provides the following binary I/O utilities:
        simport/fimport: script/datadir binary file import into variable
        sexport/fexport: script/datadir binary file export from variable

        Not sure why Miva Script doesn't have these to begin with, but
        I guess that's why they gave us the API. :)

        cheers,
        James

        -----Original Message-----
        From: [email protected]
        [mailto:[email protected]]On
        Behalf Of James Harrell
        Sent: Wednesday, October 13, 2004 12:29 PM
        To: Jeff Huber - Listmail; 'Ivo Truxa'; 'Miva Users List'
        Subject: RE: [meu] encode base64


        Hey Jeff,

        I just remembered- last time I needed to solve this problem, I
        did in fact write a binary utilities function library. I'll post
        source to our website shortly. :)

        cheers,
        james


        Comment


          #34
          Action before script ..



          Hi all,

          I have a small script that is making some cleanup in my databases.. and the
          operations take generally 1 min. After the script is done I have a html page
          that shows the result. I would like to make a stand by message while the
          mivascript is running. Because of an important number of vars that I POST I
          woudn't like to use javascript to redirect.
          So I remarked that first of all miva script is running and after that the
          html is parsed by the engine.. So is there any way to start by the html and
          after that let the script make his job? I have a div that I hide after the
          script is done..
          I noticed that if I generate a small miva error .. the script is showing
          the html... so perhaps there is a way in that direction?

          Thanks
          Claudiu


          Comment


            #35
            Action before script ..



            Hi Claudiu,

            What I do in a similar situation is the following: My scripts starts doing
            everything what I want it to do, maybe with a typical html-page indicating
            "please wait" etc. Then, at the end of the operation (or before a possible
            timeout), the script injects a 1-second refresh to a new page ("Done!"),
            with the variables cleaned from the url, and I flush the buffer.

            I'm not sure if this answers your question, it's not entirely "elegant" but
            it usually works pretty well. I also experimented with modifying the
            headers, but didn't get reliable results. Adam posted some code about this
            possibility a few years(?) back.

            Markus


            -----Original Message-----
            From: [email protected] [mailto:[email protected]] On Behalf
            Of Claudiu Bischoff
            Sent: Friday, October 15, 2004 12:36 PM
            To: 'Miva Users List'
            Subject: [meu] Action before script ..

            Hi all,

            I have a small script that is making some cleanup in my databases.. and the
            operations take generally 1 min. After the script is done I have a html page
            that shows the result. I would like to make a stand by message while the
            mivascript is running. Because of an important number of vars that I POST I
            woudn't like to use javascript to redirect.
            So I remarked that first of all miva script is running and after that the
            html is parsed by the engine.. So is there any way to start by the html and
            after that let the script make his job? I have a div that I hide after the
            script is done..
            I noticed that if I generate a small miva error .. the script is showing
            the html... so perhaps there is a way in that direction?

            Thanks
            Claudiu


            Comment


              #36
              Action before script ..



              I am not sure if I understand, because in the first sentence you are telling
              the script runs first and _then_ you display the results in HTML. In the
              second part, you paradoxically want to display the HTML _before_ the script.
              Well, I assume you just did not express it exactly, and you want to display
              some HTML before the script, and then the rest. In such case you can use the
              function "miva_output_flush()" to flush Empresa's output buffer through the
              web server out to the client, but I am not sure now if the function was
              introduced already in v3.9 or only in v4.

              In the case it not available in the version you use, and you see that an
              error flushes the buffer too, you could use that effect and deliberately
              generate an error (i.e. importing an non-existing file). Do not forget
              setting the error "nonfatal" before triggering it. I suppose setting the
              "nodisplay" flag would probably suppress the flushing, but you can try it
              too. If it cannot be used, you could enclose the error into HTML comments.

              In case you use tables in the HTML layout, do not forget that browsers often
              do not display the table before they see the closing table tag. In case of
              nested tables, at many browsers, the most outer table must be closed before
              the entire content is parsed. From what I saw, the most forgiving and
              fastest parsing is FireFox, but older Mozillas or even MSIE will often wait
              the end of the table before displaying it.

              Ivo
              http://mivo.truxoft.com



              -----Original Message-----
              From: Claudiu Bischoff

              Hi all,

              I have a small script that is making some cleanup in my databases.. and the
              operations take generally 1 min. After the script is done I have a html page
              that shows the result. I would like to make a stand by message while the
              mivascript is running. Because of an important number of vars that I POST I
              woudn't like to use javascript to redirect.
              So I remarked that first of all miva script is running and after that the
              html is parsed by the engine.. So is there any way to start by the html and
              after that let the script make his job? I have a div that I hide after the
              script is done..
              I noticed that if I generate a small miva error .. the script is showing
              the html... so perhaps there is a way in that direction?

              Thanks
              Claudiu



              Comment


                #37
                Action before script ..



                Hi Ivo and Markus,

                That's exactly what I needed :) I use the miva_output_flush() and all works
                ... and yes.. I have to make more efforts for my english :)

                PS: Thanks Markus for the response.

                Best regards,
                Claudiu

                -----Original Message-----
                From: [email protected] [mailto:[email protected]]On
                Behalf Of Ivo Truxa
                Sent: vendredi 15 octobre 2004 13:29
                To: 'Miva Users List'
                Subject: RE: [meu] Action before script ..


                I am not sure if I understand, because in the first sentence you are telling
                the script runs first and _then_ you display the results in HTML. In the
                second part, you paradoxically want to display the HTML _before_ the script.
                Well, I assume you just did not express it exactly, and you want to display
                some HTML before the script, and then the rest. In such case you can use the
                function "miva_output_flush()" to flush Empresa's output buffer through the
                web server out to the client, but I am not sure now if the function was
                introduced already in v3.9 or only in v4.

                In the case it not available in the version you use, and you see that an
                error flushes the buffer too, you could use that effect and deliberately
                generate an error (i.e. importing an non-existing file). Do not forget
                setting the error "nonfatal" before triggering it. I suppose setting the
                "nodisplay" flag would probably suppress the flushing, but you can try it
                too. If it cannot be used, you could enclose the error into HTML comments.

                In case you use tables in the HTML layout, do not forget that browsers often
                do not display the table before they see the closing table tag. In case of
                nested tables, at many browsers, the most outer table must be closed before
                the entire content is parsed. From what I saw, the most forgiving and
                fastest parsing is FireFox, but older Mozillas or even MSIE will often wait
                the end of the table before displaying it.

                Ivo
                http://mivo.truxoft.com



                -----Original Message-----
                From: Claudiu Bischoff

                Hi all,

                I have a small script that is making some cleanup in my databases.. and the
                operations take generally 1 min. After the script is done I have a html page
                that shows the result. I would like to make a stand by message while the
                mivascript is running. Because of an important number of vars that I POST I
                woudn't like to use javascript to redirect.
                So I remarked that first of all miva script is running and after that the
                html is parsed by the engine.. So is there any way to start by the html and
                after that let the script make his job? I have a div that I hide after the
                script is done..
                I noticed that if I generate a small miva error .. the script is showing
                the html... so perhaps there is a way in that direction?

                Thanks
                Claudiu



                Comment


                  #38
                  encode base64 [OT]



                  Well, I think there are two levels of code sharing that goes on here.

                  A public level that new people and people "core members" don't really
                  know about, and a private level where most of the "core members" share
                  just about any code they can. I know that Jeff Huber has shown me a few
                  really neat tricks in the last several years without hesitation- all it
                  took was me asking.

                  At the same time I can see the points of worry when you have some really
                  slick piece of code. Remember two years ago when some new module
                  developers basically stole half the modules out there, copied them
                  (sometimes without even changing variable names or comments!!), and then
                  started selling them on MvCOOL? When things like that happen, it's
                  bound to make people worried about sharing some of their coding trade
                  secrets... I know that I'm happy about the compiler for just that reason
                  - to hide the 5% of my neat tricks I don't want the general public seeing.

                  I know that Ivo has, and continues, to make available some of the most
                  slick pieces of mivascripting I've ever seen. He even made his dynamic
                  function call deal available back when the compiler first came out. If
                  Ivo is hiding some code, you can bet it's got to be pretty hot, and I
                  also bet that if a qualified coder asked him about it privately, or just
                  asked about design ideas concerning something like that, Ivo would be
                  just as thorough in his repsonses as he is in everything else. I know
                  he's helped me out a lot in the past.

                  Bottom line for me is that I do believe there are times when some
                  scripting can not be shared because there are still module developers
                  who would use it dishonestly as has happened in the past. But I also
                  know that some of the core list members who are friendly with each other
                  probably would share just about any bit of code with each other.

                  My 2 cents-

                  Scot

                  Jeff Huber - Listmail wrote:
                  > Maybe I shouldn't think less of him for sharing his supposed
                  > trick for getting binary data available to a Miva script, but I
                  > do.
                  >
                  > Many people who have used Miva script over the years, even all
                  > the way back to when it was htmlscript have come up with cool
                  > ways of making the language do something that we didn't think it
                  > could do.
                  >
                  > And I have never in that time known of a developer to refuse to
                  > share such an idea because they thought it had some sort of
                  > commercial benefit to keep it secret.
                  >
                  > Now surely many did hide things because they thought it had some
                  > value, but if they didn't they never mentioned it in a public
                  > forum.
                  >
                  > Maybe the real truth is that the list that I thought existed
                  > doesn't exist any more and has been replaced by a "pod list" like
                  > a "pod person" from invasion of the body snatchers. And this "pod
                  > list" is made up of people trying to trick other people into
                  > giving up their Miva script "secrets" so they can compete against
                  > them later in the Commercial Miva script development market, or
                  > people trying to ... what would other people be doing here then?
                  >
                  > Why be on the list if you don't want to share experiences,
                  > techniques, advice, etc about using the language?
                  >
                  > I know that I don't contribute to this list as much as I would
                  > like because running a small business takes a lot of time and
                  > effort, and I guess I assumed that a lot of the slow down of idea
                  > exchange on this list was a combination of others in the same
                  > boat, combined with a smaller community, and most of them knowing
                  > the basics already.
                  >
                  > I guess maybe I am wrong about that, and maybe that most of the
                  > people don't share ideas here because they are afraid that they
                  > will lose a market advantage.
                  >
                  > I hope I am wrong about being wrong.
                  >
                  > - Jeff Huber
                  > President 4TheBest eCommerce Solutions
                  > http://4TheBest.com
                  > [email protected]
                  > Office: 760-742-1469
                  > Cell: 760-445-8454
                  >
                  >
                  >
                  >
                  > -----Original Message-----
                  > From: [email protected]
                  > [mailto:[email protected]] On Behalf Of Ben Walsh
                  > Sent: Tuesday, October 12, 2004 7:21 PM
                  > To: 'Miva Users List'
                  > Subject: RE: [meu] encode base64
                  >
                  >
                  > It's Ivo's code and he's not under any obligation to disclose it.
                  > Nobody
                  > should think less of him for not giving away his software.
                  >
                  >
                  >>I shouldn't send this to the list because I am not in a calm and
                  >>rational frame of mind, but I usually avoid posting when I am
                  >>annoyed and upset for fear that I will say something I will
                  >>regret later.
                  >
                  >
                  > Jeff, I regret to say, take your own advice.
                  >
                  > -----Original Message-----
                  > From: [email protected]
                  > [mailto:[email protected]] On Behalf
                  > Of Ivo Truxa
                  > Sent: Tuesday, October 12, 2004 8:42 PM
                  > To: 'Miva Users List'
                  > Subject: RE: [meu] encode base64
                  >
                  > Jeff,
                  >
                  > I would not expect such a violent attack and blackmailing, but
                  > certainly you
                  > have the right to express your feelings. I do not think I
                  > deserved it. I
                  > believe I gave the community more programming techniques and
                  > tricks than
                  > most of others.
                  >
                  > As for the dynamic function calls - you are mistaken - I
                  > published the first
                  > method for dynamic function execution using filters as soon as I
                  > found it
                  > and before I wrote Vladdy. I did not bother publishing the
                  > performance
                  > improvement with the assembler hack, since firstly I had no
                  > feedback or sign
                  > of interest after publishing the first method, then the
                  > functionality is
                  > identical, and lastly it required modifying the assembler, hence
                  > it was not
                  > really a "clean" solution.
                  >
                  > Am I creating a market advantage? Hmm, yes, probably yes, though
                  > I believe
                  > everybody does it. I guess you are also not going to publish all
                  > your source
                  > code. I've spent several days of experimenting and testing,
                  > before I found
                  > the right way and managed to get the binary reading working.
                  > Although I love
                  > to share various tricks with the community, this one was not easy
                  > to find,
                  > and the effort has to pay back first.
                  >
                  > Maybe, if you had asked and insisted politely without offences, I
                  > could had
                  > changed my mind and published the trick, but I definitely won't
                  > do it under
                  > such blackmailing pressure.
                  >
                  > Sorry for that,
                  >
                  > Ivo
                  > http://mivo.truxoft.com
                  >
                  >
                  >
                  > -----Original Message-----
                  > From: Jeff Huber - Listmail
                  >
                  >
                  > Ivo,
                  >
                  > Since I, or any other developer that has released one or more
                  > Miva Merchant modules could reasonably be considered your
                  > "competitor", and since most of the people in that group, or I
                  > assume most of them, could already easily release a Miva Merchant
                  > software solution that attached files to email very easily and
                  > thus compete with MmATTACH if we wanted to, I think it is a bad
                  > excuse not to share the coding technique on this list.
                  >
                  > This list has always been a place where people with a shared
                  > interest for or in some cases a love of the Miva script language
                  > can share experiences and work together to improve the ability of
                  > all of use using the language.
                  >
                  > There are a significant number of people that make a lot of money
                  > selling Miva Merchant modules that learned a lot about how to
                  > program from Myself and the other "core" members of this list and
                  > they are our "competitors" now in one sense or another. I always
                  > considered you one of the "core" members because I never saw you
                  > hold back information based on some stupid market advantage
                  > excuse, and because I thought that you, like many others, had a
                  > fondness for the language that often goes beyond it's commercial
                  > worth.
                  >
                  > If you aren't going to share a technique of using the language
                  > then it seems to me that maybe you are no longer really "One of
                  > us". Maybe you have succumbed to the "dark side" and become "one
                  > of them", whoever "them" is.
                  >
                  > Many people who use Miva script only have Miva script as a
                  > scripting option, they can't use other means, and for them, who
                  > are not your "competitors" and who are the people who used to be
                  > the only type of people on this list, knowing that technique
                  > might be very nice.
                  >
                  > The fact that you don't want to share it with the community
                  > because of some supposed, and I believe non existent, market
                  > advantage. makes me think less of you than I used to.
                  >
                  > Especially when I combine this current event with the reaction
                  > you had when Darren Ehlers posted his assembler file technique to
                  > allow dynamic function calls and you quickly jumped in and said
                  > that was an old obvious technique you had been using for a long
                  > time with the Vladdy engine, and yet you had never seen fit to
                  > publish the technique on this list. I guess that was another
                  > market advantage that you didn't want to give up, and yet you
                  > sure wanted to jump in and claim credit for the technique after
                  > the fact.
                  >
                  > I wonder if there are more of you than I realize and maybe that
                  > is why we (Meaning Jeff Collins, myself, and a few others) found
                  > it so hard to get support for the Miva script Open source
                  > project.
                  >
                  > When people have asked questions about things I have never
                  > hesitated to answer and even provide source code, just because
                  > what we were doing was a technique used in a Miva Merchant
                  > module.
                  >
                  > I am saddened by your attitude Ivo, adn even though it may not
                  > mean anythign to you I am also dissapointed in you.
                  >
                  > I hope you will see the error of your ways and "come back into
                  > the light".
                  >
                  > I shouldn't send this to the list because I am not in a calm and
                  > rational frame of mind, but I usually avoid posting when I am
                  > annoyed and upset for fear that I will say something I will
                  > regret later.
                  >
                  > In this case I don't care.
                  >
                  > - Jeff Huber
                  > President 4TheBest eCommerce Solutions
                  > http://4TheBest.com
                  > [email protected]
                  > Office: 760-742-1469
                  > Cell: 760-445-8454
                  >
                  >
                  >
                  >
                  >
                  > -----Original Message-----
                  > From: [email protected]
                  > [mailto:[email protected]] On Behalf Of Ivo Truxa
                  > Sent: Tuesday, October 12, 2004 4:04 PM
                  > To: 'Miva Users List'
                  > Subject: RE: [meu] encode base64
                  >
                  >
                  > Yes, it _is_ possible to achieve it in plain Miva Script.
                  > Unfortunately, I
                  > cannot disclose the exact way, because one of my commercial
                  > products is
                  > based on the trick (MmATTACH) and disclosing it would endanger
                  > its market
                  > position. The trick is not quite simple; it uses secondary
                  > effects of
                  > unexpected functions, but it works fine.
                  >
                  > In case of need I could provide a compiled library containing the
                  > function,
                  > though. Better told, I could disclose the way how to call the
                  > function from
                  > the MmATTACH module (after adjusting it little bit), when
                  > installed on the
                  > system.
                  >
                  > Just please note that the encoding is not very fast and not well
                  > suitable
                  > for files bigger than few hundreds of kilobytes. Whenever
                  > possible, using an
                  > external encoder like MimeConv 2 freely available on my website
                  > is a much
                  > faster solution.
                  >
                  > Ivo
                  > http://mivo.truxoft.com
                  >
                  >
                  >
                  >
                  > -----Original Message-----
                  > From: Jeff Huber - Listmail
                  >
                  >
                  > Ahh, but if you can get the file into a string then you can use
                  > it :)
                  >
                  > We actually got very close to an algorithm that would let us
                  > GUESS at the file contents enough that we could suck up files
                  > using MvIMPORT and the encode them and manipulate them.
                  >
                  > In fact we have successfully done it with a number of files but
                  > it is not stable because if the guesses are wrong then everything
                  > falls apart badly.
                  >
                  > The problem of course is rooted in the fact that MvIMPORT is
                  > specifically intended to import text files that are considered
                  > one record per line, and a line is determined by the existence of
                  > a LF, CR, or CRLF, which means that Miva eats some of the binary
                  > data and you can't be sure which it eats.
                  >
                  > I am holding out hope that we will get a way to read files in a
                  > more raw manner into variables sometime after 5.o of Empresa is
                  > released, and if we don't then we will be building and releasing
                  > a file system function library for Miva Empresa VM because we
                  > have some things planned for early next year that we HAVE to have
                  > that functionality for and I have reasons why I want it all done
                  > as Miva script rather than using PHP, Perl, C, etc.
                  >
                  > - Jeff Huber
                  > President 4TheBest eCommerce Solutions
                  > http://4TheBest.com
                  > [email protected]
                  > Office: 760-742-1469
                  > Cell: 760-445-8454
                  >
                  >
                  >
                  > -----Original Message-----
                  > From: [email protected]
                  > [mailto:[email protected]] On Behalf Of
                  > [email protected]
                  > Sent: Tuesday, October 12, 2004 2:09 PM
                  > To: 'Claudiu Bischoff'; Miva Users List
                  > Subject: RE: [meu] encode base64
                  >
                  >
                  > Hi,
                  > I was under the impression that crypto_base64_encode function
                  > only worked on
                  > strings-not files. How exactly do you use the function? -
                  > crypto_base64_encode(l.image_url)???
                  >
                  > Bill M.
                  >
                  > -----Original Message-----
                  > From: [email protected]
                  > [mailto:[email protected]] On Behalf
                  > Of Claudiu Bischoff
                  > Sent: Tuesday, October 12, 2004 9:47 AM
                  > To: [email protected]
                  > Subject: [meu] encode base64
                  >
                  >
                  > Hi all,
                  >
                  > I'm trying to encode some images in my automated e-mails (due to
                  > the new
                  > SP2 I cannot use web hosted images in my multimedia e-mails
                  > anymore) and I
                  > want to make this happen with the new miva crypto_base64_encode
                  > function.
                  > The only problem I have is that I don't have the correct result.
                  > I'm
                  > importing the image and encoding it to insert it in my multipart
                  > e-mail
                  > body. All is fine less the encoded result. I have encoded the
                  > same image
                  > with another software and I noticed that the begining of the
                  > encrypted
                  > result is ok.. but after a few characters my miva result change..
                  >
                  > Miva encoded image result :
                  > /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQg=DBQ=DAsLDBkSE
                  > w8UHRofHh0a
                  > HBw=GDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyM
                  > jIyMjIyMjIy
                  > Mv/AABEIAF8AXQMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQI ..
                  > etc .. etc
                  >
                  > VB software encoded image result :
                  > /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSE
                  > w8UHRofHh0a
                  > HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyI
                  > RwhMjIyMjIy
                  > MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjL/wA ..
                  > etc .. etc
                  >
                  > The VB result is working well with Outlook and other e-mail
                  > clients, but..
                  > the miva one is not working at all (I have a broken image in the
                  > e-mail
                  > body)
                  >
                  > Does anybody is aware of some encoding problems with the
                  > crypto_base64_encode(data) function?
                  >
                  > PS: I already looked on the Ivo website encoding solution but I
                  > need a 100%
                  > mivascript solution ( if there is one .. :s )
                  >
                  > Thanks everybody
                  > Claudiu
                  >
                  >

                  Comment


                    #39
                    encode base64



                    Ivo said:
                    "My hack, in comparison to such built-in solution is highly
                    inefficient and rather slow, and I use it just because there is
                    no other way (I know of) in pure Miva Script to read binary files
                    including _any_ special or nonprintable characters."

                    And:

                    "I use the MvCALL command to get the content of a binary file
                    into a variable. And no, I do not call
                    any external or non-miva script that converts it."

                    Thanks for sharing the concept of the hack Ivo. I am sure it
                    might be useful to somebody that is hosted in an environment
                    where they have no program execution allowed other than Miva
                    script. There may still be such places, I know that long ago
                    Simplenet had such a policy.

                    In my opinion though, and based on your description, I don't
                    think most developers would consider this a viable commercial
                    option and thus I doubt you'll see anyone trying to do the same
                    thing you do in a piece of commercial software.=20

                    I think most developers if faced with the choice of using
                    something like you describe or using the other methods available
                    such as calling a non Miva script, or using pre-encoded files
                    stored on the server and outputting them using the base64
                    decoding built in to Miva script, would choose one of those
                    methods instead.

                    As for a situation like those who might want to sell something to
                    Miva Merchant end users and don't want to rely on them having the
                    ability to encode files, then they can certainly either give away
                    a simple utility to use on the local computer to encode the
                    files, or make a utility available on the software's website to
                    upload and encode the file (not using Miva script of course) and
                    it can return the encoded version and that can be placed in the
                    field provided to accept the data in the module. In fact the
                    module could even open the window to the utility and target back
                    the encoded data to the module and from the POV of the end-user
                    they would never know nor care that it wasn't all done in pure
                    Miva script.

                    Once again, thank you for sharing the concept of your hack.

                    - Jeff Huber
                    President 4TheBest eCommerce Solutions
                    http://4TheBest.com
                    [email protected]
                    Office: 760-742-1469
                    Cell: 760-445-8454
                    =20


                    Comment

                    Working...
                    X