Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-29-2009, 07:42 PM   PM User | #1
jasonc310771
Regular Coder

 
Join Date: Mar 2006
Posts: 478
Thanks: 3
Thanked 0 Times in 0 Posts
jasonc310771 can only hope to improve
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 ?
jasonc310771 is offline   Reply With Quote
Old 08-30-2009, 04:02 AM   PM User | #2
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
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?
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Old 08-30-2009, 11:45 AM   PM User | #3
jasonc310771
Regular Coder

 
Join Date: Mar 2006
Posts: 478
Thanks: 3
Thanked 0 Times in 0 Posts
jasonc310771 can only hope to improve
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 12:00 PM..
jasonc310771 is offline   Reply With Quote
Old 08-30-2009, 11:06 PM   PM User | #4
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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!||||
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:30 PM.


Advertisement
Log in to turn off these ads.