is that possible ? how ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Bedford

    is that possible ? how ?

    Hi all,

    Need help on a big problem I've.

    Due to timeout (can't change settings or ISP...) I've to modify a script
    that read an XML document and save sent pictures on a server.
    This is a long time processing task and I get "out of time limit" every day.

    Now my question is: it is possible to send the encoded images (they are in
    [cdata] base 64 in XML) to an other script that will save the files on the
    server ?

    I mean call a script like that:
    <a href="saveimage s.php?picarray= ".$picarray ." target="_blank" >click
    here</abut off course without the a href but an automatic call maybe in
    javascript ?

    Please help, I spend 5 days on this without much success.

    Bob



  • B.r.K.o.N.j.A

    #2
    Re: is that possible ? how ?

    Bob Bedford wrote:
    Hi all,
    >
    Need help on a big problem I've.
    >
    Due to timeout (can't change settings or ISP...) I've to modify a script
    that read an XML document and save sent pictures on a server.
    This is a long time processing task and I get "out of time limit" every day.
    >
    Now my question is: it is possible to send the encoded images (they are in
    [cdata] base 64 in XML) to an other script that will save the files on the
    server ?
    >
    I mean call a script like that:
    <a href="saveimage s.php?picarray= ".$picarray ." target="_blank" >click
    here</abut off course without the a href but an automatic call maybe in
    javascript ?
    >
    Please help, I spend 5 days on this without much success.
    >
    Bob
    >
    >
    >
    Maybe you could cron the script so it parses input as it arrives (let's
    say every 20 minutes) - if you don't get your xml-s in big chunks but in
    smaller chunks every so and so (like emails for example) that could be a
    workaround...


    --

    B.r.K.o.N.j.A = Bionic Robotic Knight Optimized for Nocturnal Judo and
    Assasination

    Comment

    • Bob Bedford

      #3
      Re: is that possible ? how ?

      Maybe you could cron the script so it parses input as it arrives (let's
      say every 20 minutes) - if you don't get your xml-s in big chunks but in
      smaller chunks every so and so (like emails for example) that could be a
      workaround...
      hi B.r.K.o.N.j.A
      I actually cron the script but every time it runs, each XML file is too big
      to be managed in the allowed time.

      I need a workaround to manage every file, not the list of file.

      Bob



      Comment

      • Kim André Akerø

        #4
        Re: is that possible ? how ?

        Bob Bedford wrote:
        Hi all,
        >
        Need help on a big problem I've.
        >
        Due to timeout (can't change settings or ISP...) I've to modify a
        script that read an XML document and save sent pictures on a server.
        This is a long time processing task and I get "out of time limit"
        every day.
        >
        Now my question is: it is possible to send the encoded images (they
        are in [cdata] base 64 in XML) to an other script that will save the
        files on the server ?
        >
        I mean call a script like that:
        <a href="saveimage s.php?picarray= ".$picarray ." target="_blank" >click
        here</abut off course without the a href but an automatic call
        maybe in javascript ?
        >
        Please help, I spend 5 days on this without much success.
        You could, for each image pass in the XML file, use the
        set_time_limit( ) function to reset the maximum execution time. Either
        that, or use it to set the maximum execution time to a higher number.


        I've used this before myself when I had to import a rather large user
        base from a CSV file (saved from Excel) into a member management system
        in PHP (and e-mail autogenerated user names and passwords to each of
        the members in the import process).

        --
        Kim André Akerø
        - kimandre@NOSPAM betadome.com
        (remove NOSPAM to contact me directly)

        Comment

        • Bob Bedford

          #5
          Re: is that possible ? how ?

          You could, for each image pass in the XML file, use the
          set_time_limit( ) function to reset the maximum execution time. Either
          that, or use it to set the maximum execution time to a higher number.

          >
          I've used this before myself when I had to import a rather large user
          base from a CSV file (saved from Excel) into a member management system
          in PHP (and e-mail autogenerated user names and passwords to each of
          the members in the import process).
          It has been disabled by the ISP so I can't do that.



          Comment

          Working...