ID: 27041 User updated by: it_chan at hotmail dot com Reported By: it_chan at hotmail dot com Status: Open Bug Type: HTTP related Operating System: windows xp/redhat 7.3 PHP Version: 4.3.4 New Comment:
This is from CURL: REFERRER A HTTP request has the option to include information about which address that referred to actual page. Curl allows you to specify the referrer to be used on the command line. It is especially useful to fool or trick stupid servers or CGI scripts that rely on that information being available or contain certain data. curl -e www.coolsite.com http://www.showme.com/ NOTE: The referer field is defined in the HTTP spec to be a full URL. Here is the URL: http://curl.mirror.at.stealer.net/docs/readme.curl.html ---------------------- About CURL: http://curl.haxx.se/ : Curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and a busload of other useful tricks. Curl is free and open software that compiles under a wide variety of operating systems. Curl exists thanks to efforts from many authors, with Daniel Stenberg being primary author and project maintainer. Curl is the result of many spare time hours of programming. Voluntary contributions are vital. Previous Comments: ------------------------------------------------------------------------ [2004-01-25 23:41:16] it_chan at hotmail dot com Check this out. Though I am not a perl guru, I found this link which says you can do it. "The most frequently used headers can also be accessed through the following convenience methods. These methods can both be used to read and to set the value of a header. The header value is set if you pass an argument to the method. The old header value is always returned. If the given header did not exists then undef is returned." The list includes: $h->referer Here is the URL: http://www.perldoc.com/perl5.8.0/lib/HTTP/Headers.html ------------------------------------------------------------------------ [2004-01-25 19:52:38] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Only the browser can send that header. ------------------------------------------------------------------------ [2004-01-25 19:42:59] it_chan at hotmail dot com Description: ------------ A web page (a.php) has a link to (b.php), when the link is clicked I want to http referer in b.php to show that referer is some other x.php as if the link was on x.php. Reproduce code: --------------- # a.php <?php header('Referer: http://localhost.com/x.php', true); ?> <a href="/b.php"> check </a> #b.php <?php echo "referrer = " . $_SERVER['HTTP_REFERER']; ?> Expected result: ---------------- referrer = http://localhost/x.php Actual result: -------------- referrer = http://localhost/a.php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27041&edit=1