PDA

View Full Version : Passing session in request to external script - how?


Spinball
04-21-2005, 02:10 PM
Hi folks,
I have my own ad banner serving script which in showthread does a $userip = $_SERVER['REMOTE_ADDR'];
$headerbanner = file_get_contents("http://www.mydomain.com/ad_serve.php?zoneid=" . $forumid . "0&ip=" . $userip) . "<P></P>";
$footerbanner = file_get_contents("http://www.mydomain.com/ad_serve.php?zoneid=" . $forumid . "1&ip=" . $userip) . "<P></P>";

Which serves different banners at the top and bottom of the SHOWTHREAD template depending on the forum. It also records every banner shown in a table and when it shows a new banner, it picks the one in the pool for that location which has been seen least by that person (i.e. ip address).
It works fine, but I have a potential customer who only wants to show his banner once per session.
If I pass the vB session as part of the query string, what code would I have to use and how big a field would I need to store in the database (would it be varchar 32)?
TIA

Ok I figured out that it needs to be ?" . $session['sessionurl'] . but when I put this into showthread, it doesn't have a value. Which is very curious.
Can anyone help, please?

Spinball
04-22-2005, 04:36 PM
Obviously not an attractive enough request - mods please close - I'll try again with a different title

Marco van Herwaarden
04-22-2005, 06:43 PM
Closed on request.