Following up on some error reported, I modified the code (fired when you click my url below) to include some error checking.
IF eval_valid("request.referer") ' because for some clients, that variable will not get created.
IF ref<>"" ' in case request.referer exists, but returns blank
IF session.topic <> "" ' because who knows, it just might be blank
Code:
IF eval_valid("request.referer")
ref = request.referer
IF ref<>""
dim dat as p
dat = a5_split_URL(ref)
url = dat.protocol + "://" + dat.server + dat.path + dat.page
result = http_post(url,dat.query_string)
topic = result.body
topic = extract_string(topic,"<title>","</title>")
'EXAMPLE TITLE
'<title>Conditional display of components? - Alpha Software Message Board</title>
topic = stritran(topic," - Alpha Software Message Board")
IF topic = "Alpha Software Message Board"
topic = "Private Message"
END IF
session.topic = topic
session.ref = ref
IF session.topic <> ""
?"Message Board Topic: <strong>" + session.topic + "</strong>"
END IF
END IF
END IF
Bookmarks