|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Feb 2007
Location: Sweden
Posts: 5,651
|
How do I insert referer-URL into this PHP-function?
Can anyone help me with this?
I want to insert a fake-referer-url into this function, does anyone know how to do it? Code:
function download($file_source, $file_target) {
$rh = fopen($file_source, 'rb');
$wh = fopen($file_target, 'wb');
if ($rh===false || $wh===false) {
// error reading or opening file
return false;
}
while(!feof($rh)) {
if (fwrite($wh, fread($rh, 1024)) === FALSE) {
// 'Download error: Cannot write to file ('.$file_target.')';
return false;
}
}
fclose($rh);
fclose($wh);
// No error
return true;
__________________
Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.) (Signup with ONLY your Email and Password. You can also refer people and get even more.) |
|
|
|
|
|
#2 |
|
Chafed.
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
|
go use the snoopy class... it has referrers and proxies and all that shit setup as easy to use methods and class variables.
http://sourceforge.net/projects/snoopy/ |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Oct 2002
Location: European Union
Posts: 1,752
|
The referral url is set by the browser and you can't change it through a serverside script. There are browser plugins to hide/fake the referral url but that is probably not what you are looking for.
|
|
|
|
|
|
#4 |
|
The Dirty Frenchman
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
|
it's easy to do with cURL in php
|
|
|
|
|
|
#5 |
|
Confirmed User
Join Date: Feb 2007
Location: Sweden
Posts: 5,651
|
Ahhh ok, I thought I could send a fake-referer while I was requesting to download the file.
__________________
Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.) (Signup with ONLY your Email and Password. You can also refer people and get even more.) |
|
|
|