...

View Full Version : problem with users using httpuseragent Java/1.6.0_07



jasonc310771
08-29-2009, 08:42 PM
I have noticed for some time that my scripts kick up a fuss with users of httpuseragent Java/1.6.0_07
my own error messages says that the advert they tried to view was invalid.

but the advert works on my pc and others i try to view them on.

i have yet to find a pc with httpuseragent Java/1.6.0_07 where i can find out why their pc can not access this part of my sites scripting.

they would view the page via the following link for example...

www.site.com/?ac=advt&ad=4

and 'ad' number 4 is valid and working normally on pc i have tested this on.
all i have is a script that takes this ad number and then redirects them to a URL for that adverts own website.

just thinking about it have i just thought of what i should be asking ?!

does redirection work with Java ?

Apostropartheid
08-30-2009, 05:02 AM
All I can think of is that the visitor is using a Java-based browser (quite unlikely), are viewing via a java applet (still unlikely) or the string is spoofed. Is the amount of visitors with that user agent really significant?

jasonc310771
08-30-2009, 12:45 PM
i do not get that many, but just wanted to make sure that i was not preventing anyone from seeing the adverts.

thinking about it is there a way to check that the PHP included file 'showadverts.php is actually called from my main 'index.php' file and not just accessed directly?

i am not sure but i think i have seen something a long time ago where a page can find out the script that called the second script

script1 calls script2....
script2 tests that script1 made the call, if true, continue, else exit

sort of thing







just had another error and this time i have the IP from the viewers pc

adsl-161-70-223.mia.bellsouth.net

_Aerospace_Eng_
08-31-2009, 12:06 AM
At the very top of showadverts.php add this

<?php
if(preg_match('/'.basename(__FILE__).'/',$_SERVER['REQUEST_URI']))
header("Location: http://www.yoursite.com/");
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum