Title: yope's Replies | WordPress.org

---

# yope

  [  ](https://wordpress.org/support/users/yope/)

 *   [Profile](https://wordpress.org/support/users/yope/)
 *   [Topics Started](https://wordpress.org/support/users/yope/topics/)
 *   [Replies Created](https://wordpress.org/support/users/yope/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/yope/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/yope/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/yope/engagements/)
 *   [Favorites](https://wordpress.org/support/users/yope/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Can i add referrer features ?](https://wordpress.org/support/topic/plugin-contact-form-7-can-i-add-referrer-features/)
 *  [yope](https://wordpress.org/support/users/yope/)
 * (@yope)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-can-i-add-referrer-features/#post-1713554)
 * found the answer here:
 * [http://wordpress.org/support/topic/plugin-contact-form-7-no-documentation-for-developers?replies=4](http://wordpress.org/support/topic/plugin-contact-form-7-no-documentation-for-developers?replies=4)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Can i add referrer features ?](https://wordpress.org/support/topic/plugin-contact-form-7-can-i-add-referrer-features/)
 *  [yope](https://wordpress.org/support/users/yope/)
 * (@yope)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-can-i-add-referrer-features/#post-1713537)
 * I want to do that as well.
 * In a normal php file I would use this code to find the address of the page the
   user has sent the mail from:
 * <?php
    function curPageURL() { $isHTTPS = (isset($_SERVER[“HTTPS”]) && $_SERVER[“
   HTTPS”] == “on”); $port = (isset($_SERVER[“SERVER_PORT”]) && ((!$isHTTPS && $
   _SERVER[“SERVER_PORT”] != “80”) || ($isHTTPS && $_SERVER[“SERVER_PORT”] != “443”)));
   $port = ($port) ? ‘:’.$_SERVER[“SERVER_PORT”] : ”; $url = ($isHTTPS ? ‘[https://&#8217](https://&#8217);:‘
   [http://&#8217](http://&#8217);).$_SERVER[“SERVER_NAME”].$port.$_SERVER[“REQUEST_URI”];
   return $url; } ?>
 * And I’ll use a hidden field to send the value:
    <input name=”url” type=”hidden”
   value=”<?php echo curPageURL(); ?>” />
 * The question is how to integrate that with the plugin?
    when i echo that as part
   of the template it works but when i try to use it as a value (text) in the form
   it just sends me the php field itself “<?php echo curPageURL(); ?>”
 * Thanks!!!!!

Viewing 2 replies - 1 through 2 (of 2 total)