Ok, I've got a problem.
I'm using a PHP class called "Snoopy" to post data to an external script via POST. My code looks a bit like this:
That's just a rough example -- in reality, I have 5 different values in the $submit_vars[] array -- the problem is that it seems to be submitting the values to the URL six times! The script processes the info and sends an email when it's done, and I find I get 6 emails every time.Code:if (CONDITION) { require("../../snoopy.class"); $snoopy = new Snoopy; $submit_url = "http://url.to.post.to"; $submit_vars["email"] = $email; $submit_vars["id"] = "etc"; $submit_vars["version"] = "`2"; if ($snoopy->submit($submit_url,$submit_vars)) { echo(""); } else { echo "Error Fetching Document: ".$snoopy->error."\n"; } }
Any idea what's up with this?





Bookmarks