Pap_Tracking_Request::encodeRefererUrl PHP Method

encodeRefererUrl() public static method

This function does escape http:// and https:// in url as mod_rewrite disables requests with ://
public static encodeRefererUrl ( $url ) : encoded
$url
return encoded url
        public static function encodeRefererUrl($url)
        {
            $url = str_replace('http://', 'H_', $url);
            $url = str_replace('https://', 'S_', $url);
            return $url;
        }

Usage Example

 public function setClick(Pap_Db_RawClick $click) {
     $this->cl = $click->getId();
     $this->ba = $click->getBannerId();
     $this->pb = $click->getParentBannerId();
     $this->ts = $click->getDateTimestamp();
     $this->rf = substr(Pap_Tracking_Request::encodeRefererUrl($click->getRefererUrl()), 0, 80);
     $this->ip = $click->getIp();
     $this->d1 = $click->getData1();
     $this->d2 = $click->getData2();
     $this->ch = $click->getChannel();
 }
All Usage Examples Of Pap_Tracking_Request::encodeRefererUrl