ankurkhanna Posted August 4, 2013 Share Posted August 4, 2013 Hey guys, I'm Ankur and a new member here. I just started off with php recently, still grabbing the basics and I'd like to ask about 1 thing for now - I want to create a script in a way where... let's assume that there is a webpage with an external link pointing to .. say.. google.com Now, as soon as someone clicks on this link, I want the link to become something like www.abc.com?redirect=google.com?utm_source=abc As you can see, even though there is a simple link posted - google.com, it gets engulfed by some other domain, followed by UTM parameters. I'd love to create a script like this. How do I get started? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/280823-url-related-query/ Share on other sites More sharing options...
adoado Posted August 5, 2013 Share Posted August 5, 2013 As in, you want to obtain these HTTP parameters? These are accessible via POST or GET in the $_POST or $_GET superglobals. For example, http://mysite.php?myval=adrian Then access via $_GET['myval']. See http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol and http://php.net/manual/en/reserved.variables.get.php Quote Link to comment https://forums.phpfreaks.com/topic/280823-url-related-query/#findComment-1443464 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.