PHP – Referer redirect script

this function should give you a starting point it will fetch any http url with the specified referrer handling the query parms should be pretty trivial, so i will leave that part for you to do <?php echo geturl(‘http://some-url’, ‘http://referring-url’); function geturl($url, $referer) { $headers[] = ‘Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg,text/html,application/xhtml+xml’; $headers[] = ‘Connection: Keep-Alive’; … Read more

Specifying HTTP referer in embedded UIWebView

Set the referer using – setValue:forHTTPHeaderField: NSMutableURLRequest* request = …; [request setValue:@”https://myapp.com” forHTTPHeaderField: @”Referer”]; But note that according to the HTTP RFC you shouldn’t, because your app is not addressable using a URI: The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, … Read more

Determining Referer in PHP

The REFERER is sent by the client’s browser as part of the HTTP protocol, and is therefore unreliable indeed. It might not be there, it might be forged, you just can’t trust it if it’s for security reasons. If you want to verify if a request is coming from your site, well you can’t, but … Read more