Google analytics tells me what the source of my traffic is (search engines, facebook etc). Is there a way to get this information for each request from the request object or otherwise? I'd appreciate any help.
request.referrer will give you the HTTP referrer value.
Related
when you access the homepage, A lot of APIs will be exposed.
But I have the baseURI and BasePath of the API I want.
For Example, When you connect to http://www.example.com, Among various APIs, an api called http://www.example.com/person/ajaxPersonList?name="Doe"&Age=30 is also called.
This API has a variety of params
So, if i know baseURI(http://www.example.com) and basePath(person/ajaxPersonList)
Is it possible to get params using restAssured?
The answer is NO.
If you are working on this project, you can access API document. You can see the params that each API is using.
If you are investigating the web app online, you have to try and error.
when I write this
https://api.twitter.com/1.1/search/tweets.json?q=%23baseball&result_type=recent to search for #baseball but then I get a Bad Authentication data.
How do I add the Authentication to the request? I'm asking how do I make the request? Could someone give me an example of how it would look? If I have a Consumer Key and an Access Token?
The 1.1 API assures that all requests made to Twitter are made with some sort of authentication. To try out the API, use the API console here: https://apigee.com/console/twitter
To simply browse the request, use one of the auth methods in the console and pass in your request with GET https://api.twitter.com/1.1/search/tweets.json?q=baseball&result_type=recent
I am trying twitter search using name and location. However, adding the location parameter to the Http web request url is giving me a 401 unauthorized exception.
My web request Url that works:
"https://api.twitter.com/1.1/users/search.json?q=John%20Doe"
The one that doesn't:
"https://api.twitter.com/1.1/users/search.json?q=John%20Doe&near=seattle&within=20&unis=mi"
Any help will be appreciated.
Thanks,
Kushal.
This link might help you. Go and fill the form & finally hit Search.
Also, take a look at this link to call with location etc..
I am trying to track the url that refered my website. One way is using a custom affiliate url which will do a redirect (302) to my site. I want to track where the users are coming from. However, I realize that after redirection, the HTTP_REFERER fro the header defaults to '/' when I was expecting it to be the url where the user was redirected from. Does the HTTP_REFERER header gets deleted after redirection? If yes, is there a way to store this information.
I am using rails for my website and I am doing request.referer to get the HTTP_REFERER.
Referers are not guaranteed; they are completely optional and any number of things could be stripping them.
I am implementing a PayPal IPN page and would like to check to ensure that requests are truly coming from PayPal and not being spoofed.
I would assume that HTTP_REFERRER would not be a good way of checking?
I've tried this approach and the variable just comes up empty.
Is there a way to check where a post is coming from? Maybe in the HTTP request header?
And a related side note. From a security standpoint how reliable would this method be?
That would be completely unreliable, as someone could spoof the Referer field as easily as they could spoof the request.
What you need to do is use PayPal's documented IPN validation protocol, which involves posting the IPN notification back to PayPal with cmd=_notify-validate. See the PayPal IPN documentation for details.
This variable has a spelling error, actually it's spelled $_SERVER['HTTP_REFERER']. So, make sure you are checking it right.
From the security point of view, this is totally fakeable, so don't rely only it.
PayPal attaches a verify_sign to all IPN posts.
PayPal IPN Docs