I already have 2 codes that work But I want to modify a little
The first code works without problems, but I want to add cookies with this code
With the other code, it works with a cookie system, but it spoils an important thing
<?php
$domainRedirect = '[login to view URL]';
if(
($_SERVER['HTTP_HOST'] != $domainRedirect)
){
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://".$domainRedirect.$_SERVER['REQUEST_URI']);
exit;
}
?>
This domain transfers visitors from the old domain to the new domain while preserving the source of the visit
What is meant by that? If the visitor entered the old domain through YouTube, It has been transferred to the new domain Shows stats for the new domain in google analytics The visitor is from YouTube
But I can't add cookies to this code
The other code works very well with cookies The visitor is transferred to the new domain But it makes the source of the visit direct not really source
include '[login to view URL]';
$newlink = $link->alias;
$referr = $refpage.$newlink;
if($reftern==1){
if ( strpos($_SERVER["HTTP_REFERER"], $ref) !== false){
setcookie("shardnat", "shardnat", time()+ 60);
setcookie("jasem", "jasem", time()+ 60);
if ( isset($_COOKIE['shardnat']) ) {
} else {
$_COOKIE['shardnat'] = 'shardnat';
$_COOKIE['jasem'] = 'jasem';
}
} else{
//echo "your referr no Good ";
}
if($_COOKIE['jasem'] ==null ){
Redirect($referr,false);
}else{
}
}
function Redirect($url, $permanent = false)
{
if (headers_sent() === false)
{
header('Location: ' . $url, true, ($permanent === true) ? 301 : 302);
}
exit();
}
?>
<?php
$reftern = 1;
$ref = "[login to view URL]";
$refpage = " [login to view URL]";
?>
I want help moving the cookies system from the second code to the first code
Or transfer the feature to keep the source of the visit from the first code to the second code
I hope I explained well And if you want to ask, please
Hi
I'm so interested in your project as I know the way very well.
I've pretty well versed in PHP, MySQL, HTML, Javascript.
And also my career was based on honest, trustful and responsible activites of my own.
So, I am sure I can do it and give you satisfy.
I'd like to talk to you about the project in more detailed.
Hope to land me your contact. Thanks.
Hello, I am PHP expert. I can fix this issues right now please discuss with me in chat so i can start work on it. I have seen your project and I have read the things that you want, I am very much interested to work with you. I consider myself perfect match for this job because I have 7 years’ experience of Web Development & Graphic designing.
Thanks,
Ali
Hi. I can help you perfectly.
As a senior full-stack developer with more than 10 years of experience, I have good knowledge and strong experience in building websites using PHP
Hello,
I have been working with PHP frameworks more than 10 years. I have come to know that you are looking for web developer who knows the web development work very well.
I want to let you know that I can fulfill your requirement properly as I have experience working in this sector. I will be able to complete your work in time without making any mistakes. I have also checked your time schedule and I can ensure you that time won't hamper your work. So I don't think you will regret it if you consider me for this job.
So, give it a thought and I'm eagerly looking forward to working with you.
Thank you and best regard.
Hi
I read your project description
I am a expert in PHP.
I noticed that I am suitable to your project.
Let me know the details in chat.
I can start it right now.
Thank you for your attention.
Hi there,
I just got one question are both scripts on the same server?
Please inbox me so that we can discuss this in detail, it's easy task but i need to clear some doubts.
Thank you
Hi There...!JAVA
Note : I give you 25% off on my all services. So grabs this special limit discount offer.
Let’s get to the Project. I came to know that your Looking a developer which have rich knowledge about java development. you need a professional JAVA developer .I am ready for this job
According to your post description, you need the job done very quickly with an affordable budget.
Your requirements are fully clear to me and I am applying only because I meet all the requirements that you are looking for.
I have been working as a react js developer for more than 10 years and I know all the ins and outs of java scripts development and customization
Project should be 100% correct and Complete that will be my first guarantee service in this project. Moreover, I will be available for you for any kind of future edits and customizations. Sometimes my ten years back clients search for me till now only because of my excellent service.
I am mostly in love with communication. I like to be in touch with my clients 24/7 so that they can catch me at any time when they need me.
I am looking for the clear final requirements docs of your project so that I can start working immediately. If you need to discuss with me for any kind of suggestions or information, please knock me anytime. I am looking forward to hearing from you.
Thanks
SAJAWAL 777☑️
Hello, there! This is Saad here from Script Forever. I survey your work post and I feel I fit for this work and I need to inquire questions related to your venture. It would be ideal if you Start to chat for dialogue.