Jump to content


Photo

Passing Variables using IMG tag


  • Please log in to reply
2 replies to this topic

#1 jvalarta

jvalarta
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 15 August 2006 - 09:35 PM

I am passing variables from a customer's website that doesnt support PHP, to a server that does, like this:

IMG SRC="http://myserver.com/...=foo&ubber=bar"

This works perfectly, but the PHP script takes a few seconds to run (as it's doing a bunch of DB stuff) and I need to speed this up. (I believe Ive got the db stuff fully optimized, there is no option for speed increase there)

My question is -- is there a better way to do this, or is there some way that the PHP can deliver an image name and keep running the process, without holding up the loading of the page (waiting on the image)?

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 15 August 2006 - 11:29 PM

Most likely the delay that your experiencing is due to network latency.  It takes time for the browser to send the request to your server, then your server to process it and return a value, then the browser to receive the image file and display it.

#3 jvalarta

jvalarta
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 15 August 2006 - 11:35 PM

Well, I thought that at first, so I used getmicrotime() on my script to time the true amount of time it's taking to process and it's defiantely the amount of work the PHP script has to do (sometimes several seconds) which is just way too long.

I need a way for PHP to release the browser and continue on it's process, without the browser having to wait.  ???




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users