Welcome Guest, Not a member yet? Register   Sign In
checking the request url for ajax validation
#1

[eluser]oldrock[/eluser]
hi..,

I have some ajax code in my page which outputs some dynamic valuable data from a controller, how to make that ajax code to output the data only when the request goes from my site , so that it prevents from using those data by third parties. and in which controller i have to do the validation.
Is there any in built helper functions in codeigniter for doing the referal address validation. (the validation should be done using php function)


thanks in advance
#2

[eluser]InsiteFX[/eluser]
.htaccess file:
Code:
# no nasty crackers in here!
order deny,allow
deny from all
allow from 192.168.0.0/24
# this would do the same thing..
#allow from 192.168.0

192.168.0 etc would be your ip address.

InsiteFX
#3

[eluser]oldrock[/eluser]
Hi thanks for your reply


before using the mentioned code in my .htaccess file is it necessary to check any condition because when i use the code in my site i am unable to access the whole site it is giving error permission denied error.


thanks in advance
#4

[eluser]InsiteFX[/eluser]
You could get the ip or the url and then check it. Like against the base_url

Could also maybe pass a flag that it is coming from your site.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB