Jump to content

Why does the script call another script a few times?


xsixer

Recommended Posts

So, i have 2 scripts, one is a script which generates an image and outputs it, another one does little stuff and before the script there is html like this:

<img src="another_script.php" attr="" attr2="... />

Everything is OKAY, the image is being generated and dislpayed, but there is a question, in that script which generates an image there is mysql insert statement, which is executed 2-3 times, but is written once and believe me, not in the loop. I've checked apache access logs, and i can see that another_script.php is tryed to get 2-3 times via GET. I can't understand why. It's really a strange problem for me at least

Browsers can request pages and images on those pages multiple times and some URL rewriting and redirection will cause browsers to request pages and images on those pages multiple times.

 

What browser are you using and are you doing an URL rewiring or redirection?

No, i am not doing those things at all :) . Btw interesting fact is that, another script outputs the text and writes it into the database. The script is called 2-3 times by the browser, but i still see the very first image, and i know that because i can see it's text in the DB, this is so strange.

Here is captcha/image generator http://rafb.net/p/fa0Z3268.html and here is the main script http://rafb.net/p/7SVAEb59.html . All it works, except that mysql statement in image generator is executed 2-3 times, and with live-headers addon on firefox i can see that image generator script is called 2-3 times. Except that it displays the very first image. Hope the source code will be helpful, cause it's really a pain in the neck when you don't know why such a thing happens :)

Archived

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

×
×
  • Create New...

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.