Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    478
    Thanks
    3
    Thanked 0 Times in 0 Posts

    problem with users using httpuseragent Java/1.6.0_07

    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 ?

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    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?

  • #3
    Regular Coder
    Join Date
    Mar 2006
    Posts
    478
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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
    Last edited by jasonc310771; 08-30-2009 at 01:00 PM.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    At the very top of showadverts.php add this
    PHP Code:
    <?php
    if(preg_match('/'.basename(__FILE__).'/',$_SERVER['REQUEST_URI']))
    header("Location: http://www.yoursite.com/");
    ?>
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •