Jump to content

Archived

This topic is now archived and is closed to further replies.

jvalarta

Passing Variables using IMG tag

Recommended Posts

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/script.php?var=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)?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.  ???

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.