Hello i used redirect php code and also i used meta refresh tags , But whenever i use these for redirect page1 to paged2 , page2 can't find his referral link(page1) always !! for example if i send 20 hits on redirect page1 to page2 , page2 states shows 20 hits but it shows only 8 hits from page1 . i want a php code for reload page who can transfer referral link to new page always and exactly , please help me
I used <META HTTP-EQUIV="Refresh" CONTENT="10;URL=http://www.site.com"> Code (markup): And also <?php header( 'Location: http://www.site.com/new_page.html' ) ; ?> Code (markup): But when page redirect to site.com , new site can't find referral link
If you're using $_SERVER["HTTP_REFERER"], that's why. It's set by the browser, some browsers don't bother with it and some allow users to set it to whatever they want. So you can't go by that. Maybe try using a GET variable in the URL to tell you what page the referral came from, if it's a page on your own site.
Of course new site isn't on my server , but it has powerful tracking script also i dont use $_SERVER["HTTP_REFERER"] on page my program knowledge is poor please write codes so i can copy paste them regards
no trade script , let me explain more redirect page is just a simple page for redirect my hits from it to site2 I just force hits to this page and i want site2 shows his referral link that page
what are you using to track the referral link though? It might not be picking up the referer. Try something more like this on your page1: (this is just an example) header("location:http://newsite.com/page2.php?ref=page1"); PHP: and this on page2: if ($_GET["ref"] === "page1") { $referer = "page_1_url"; } else { // however you set the referer before } PHP:
page2 server doesn't give you a unique URL to send traffic to so that they can ensure you get credit for all referrals? It's not your fault, it's their tracking script. You should contact them and ask about it.
i contacted them , they told me their script can't identify referral link ! and they dont know why it happens , when i send them hits directly by GBscript , their script identify referral link but when i try to send them via redirect page , he can't I think must be an easy program for do this function ..
then use a url jumper script and log the referrals for yourself. example: <?php> # aff.php # # link usage: # <a href="./aff.php?aff=campaign1">Campaign Link</a> # # image-link usage: # <a href="./aff.php?aff=campaign1"><img src="campaign_image_1.png"></a> # if (isset($_GET['aff'])) { $affiliates = Array("campaign1,http://affiliates_website.com/?affiliate_id=12345", "campaign2,http://affiliates_website.com/?affiliate_id=12346", "campaign3,http://affiliates_website.com/?affiliate_id=12347", "campaign4,http://affiliates_website.com/?affiliate_id=12348", "campaign5,http://affiliates_website.com/?affiliate_id=12349", "campaign6,http://affiliates_website.com/?affiliate_id=12340",); foreach ($affiliates as $this_affiliate) { list($campaign_name,$affiliate_link) = explode(",",$this_affiliate); if ($_GET['aff'] == $campaign_name) { # # save the hit to your log, flatfile, or a database here, # then redirect using header to the link # header("location: $affiliate_link"); exit; } } } ?> PHP: i used an array because its easy to show all in one script, but you might want to use a database to house and administrate those campaign and campaing url values you can not 100% rely on the referrer as its a client-base data value that can be forged or stripped out, and sometimes the browser does not even pass it on depending on the visitors configuration and security/privacy software installed.
try putting this in your page instead of the meta tag or PHP script, and see if it works better: <script> setTimeout("top.location.href = 'http://www.site.com/new_page.html'",5); </script> Code (markup):
I used this script but not help Why when i send hits directly by GBscript with this link(www.site1.com/go.php?url=www.site2.com) to site2 , site2 identify referral link with name www.site1.com NO www.site1.com/go.php So , this problem can be solve by php program
thats becasue you have to configure the $affiliates array with your referral links and campaign names. a blank page shows up because the 'aff' isnt set with a value in the query string used, which has to come from your links (hrefs). read the comments .. i have shown usage examples of link structures for it to work. you have to set it up and change your link structures (or create a test page with text and/or image links) for it to work properly.
above short php code works ok but below code with 10sec delay dont works , how can fix it <?php header("Refresh: 10; URL=http://www.site.net/test.php"); echo " "; // NN4 requires that we output something... exit(); ?> Code (markup):
is there an error message, or same problem as before? If it's the same problem, just make sure to use the same URL when you do the redirect: header("Refresh: 10; URL=http://www.site1.com/go.php?url=www.site2.com"); echo " "; // NN4 requires that we output something... exit(); PHP:
When i decrese delay , stats go to be near to normal but i need 5-10sec delay for show my speacial text link on my redirect page before redirection