1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need help about ?id=

Discussion in 'PHP & Perl' started by xbryan, Jan 19, 2016.

  1. xbryan

    xbryan Senior Member

    Joined:
    Jul 12, 2015
    Messages:
    935
    Likes Received:
    232
    hey guys, i found some websites that they use domain.com/content/?id=XAJDJAXSD
    domain.com/content/?id=randomwords
    if someone visits ?id=asdqwe he redirects to > custom link

    please help :)
     
    Last edited: Jan 19, 2016
  2. baxxx

    baxxx Junior Member

    Joined:
    Mar 25, 2012
    Messages:
    191
    Likes Received:
    46
    Occupation:
    hustler
    Location:
    EU
    there is no help, this is some kind of black magic, beware
     
    • Thanks Thanks x 1
  3. xbryan

    xbryan Senior Member

    Joined:
    Jul 12, 2015
    Messages:
    935
    Likes Received:
    232
    its a php script, i found it somewhere before but i forgot it now. its like 8 months ago... i asked here because there are alot of php expert here. maybe they can help :)
     
  4. Regalia

    Regalia Newbie

    Joined:
    Jan 16, 2016
    Messages:
    32
    Likes Received:
    11
    Gender:
    Male
    Occupation:
    Cat Fish
    You cannot cause URL redirect simply by having what you're calling a "query string" in the URL. If there is redirecting happening, that is being handled by the server itself.

    What is actually happening is as follows:

    1. User visits URL with the query string.
    2. Server acquires the query string (id=XAJDJAXSD) from the URL that the user visited via GET http verb, and operates on it (maybe database search or simply generating a redirect url)
    3. Generates a redirect url
    4. Returns a server response by redirecting the user to the new URL.

    So if you're using PHP. There should be a way to generate a link from the given URL query, try Stackoverflow for programming help.

    Best of luck.
     
    • Thanks Thanks x 1
  5. gh0st_0

    gh0st_0 Senior Member

    Joined:
    Mar 3, 2015
    Messages:
    843
    Likes Received:
    512
    Occupation:
    Promoter
    Location:
    behind you
    just hack him that is much easier :D
     
    • Thanks Thanks x 1
  6. neta1o

    neta1o Regular Member

    Joined:
    Sep 29, 2008
    Messages:
    388
    Likes Received:
    318
    Home Page:
    We use to do something like this to protect affiliate companies from snooping our landing pages and redirects because a lot of them don't like you to redirect.

    So we'd use a page like www.whatever.com/landing/ as a dummy landing page for people trying to snoop our page with some legitimate landing page content. Then we would use something like this for actually redirecting customers www.whatever.com/landing/?i=asdf

    In the index.php of the www.whatever.com/landing/ we have something like this

    if(isset($_GET) && $_GET='asdf')){
    echo '<meta http-equiv="refresh" content="0;URL='http://desiredestination.com/'" />'
    }

    Another option for using the ?i= is for tracking. You could have a variety of different traffic source and track where they are coming from. Just be careful with referrers if you are directly straight to an affiliate link. There are ways to clean referrers as well ;)
     
    • Thanks Thanks x 1
  7. Asakuura

    Asakuura Newbie

    Joined:
    Oct 9, 2014
    Messages:
    18
    Likes Received:
    4
    Occupation:
    Web Developper
    Location:
    France
    You can also use encryption to do this.
     
    • Thanks Thanks x 1
  8. AdvancedDevelopment

    AdvancedDevelopment BANNED BANNED

    Joined:
    Mar 23, 2016
    Messages:
    91
    Likes Received:
    28
    Theres serveral ways to do this, most commonly the ids and redirects would be stored inside a database however I will show you a really basic example of this which would require you to add each redirect manually.

    As i am a new account i cant post any links but posted as best i can within the limitations, hope this makes sense.

    example link
    Code:
    YOURSITE/?id=google
    

    Code:
    if (empty($_GET['id'])){
    exit;
    }elseif ($_GET['id'] == "google"){
    header("Location: REDIRECT LINK INCLUDING HTTP");
    }