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

php riddle - would like to connect to a site as google search referrer

Discussion in 'Black Hat SEO Tools' started by hardhat, Dec 29, 2014.

Thread Status:
Not open for further replies.
  1. hardhat

    hardhat Regular Member

    Joined:
    Jan 19, 2010
    Messages:
    201
    Likes Received:
    11
    ---- THREAD CLOSED 01/05/2015 ----
    hi php masters,

    i would like to connect to pages like i'm a user that searched something on google and clicked on one of the results and came to my site.

    i use this demo code (i think i found it here or on stackoverflow), but i'm missing something there:
    1,. accept and save cookies
    2. send the referer headers properly.

    can anyone here help or have a similar script in php?

    see my code:
    Code:
    echo geturl('http://mysite/', 'http://www.google.com?q="searchkeyword"');
    
        function geturl($url, $referer) { 
    
            $headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg,text/html,application/xhtml+xml'; 
            $headers[] = 'Connection: Keep-Alive'; 
            $headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8'; 
            $useragent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;  .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)'; 
    
            $process = curl_init($url); 
            curl_setopt($process, CURLOPT_HTTPHEADER, $headers); 
            curl_setopt($process, CURLOPT_HEADER, 0); 
            curl_setopt($process, CURLOPT_USERAGENT, $useragent);
            curl_setopt($process, CURLOPT_REFERER, $referer);
            curl_setopt($process, CURLOPT_TIMEOUT, 30); 
            curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); 
            curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1); 
    
            $return = curl_exec($process); 
            curl_close($process); 
    
            return $return; 
        } 
    
     
  2. hardhat

    hardhat Regular Member

    Joined:
    Jan 19, 2010
    Messages:
    201
    Likes Received:
    11
    anyone can help?
    any php developers around?
     
  3. Hinkys

    Hinkys Jr. VIP Jr. VIP

    Joined:
    Mar 3, 2012
    Messages:
    707
    Likes Received:
    555
    Location:
    Croatia
  4. jamesjk1

    jamesjk1 Senior Member

    Joined:
    Nov 1, 2012
    Messages:
    1,053
    Likes Received:
    652
    Occupation:
    404
    Location:
    Undisclosed
    Hey mate,

    I'm not a PHP developer myself, but I do have someone who handles all that kind of stuff. Anytime I see threads like this I recommend him. He's a great guy and can (hopefully!) fix this for ya. If you're interested I can give you his skype.
     
Thread Status:
Not open for further replies.