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

[Need WP PHP CODER]

Discussion in 'Hire a Freelancer' started by akwin4565, May 29, 2014.

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

    akwin4565 Junior Member

    Joined:
    Dec 1, 2013
    Messages:
    135
    Likes Received:
    7
    Location:
    in front of bhw
    ---- THREAD CLOSED 06/17/2014 ----
    Hi I need a wordpress php coder for my website.
    Firstly I have an iframe in my site and wanted that iframe to be visible only if it comes from google.
    The code I found by googling is below:

    $referer = $_SERVER['HTTP_REFERER'];
    $url = "google.com";
    if(eregi($url,$referer)) {

    I don't know where should I keep my iframe.If you can do it I would hire you.
     
  2. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    950
    Likes Received:
    662
    Occupation:
    Web/Bot Developer
    Code:
    if (strpos($_SERVER['HTTP_REFERER'],'google') !== false) {
        echo '<iframe src="http://www.site.com"></iframe>';
    }
    
     
    • Thanks Thanks x 1
  3. shailpatel05

    shailpatel05 Newbie

    Joined:
    Jun 2, 2014
    Messages:
    6
    Likes Received:
    1
    Occupation:
    Php Developer
    Location:
    India
    Home Page:
    Hi,

    You can also try this.

    $refere_array=explode('.', $_SERVER['HTTP_REFERER']);

    if(in_array('google', $refere_array)){
    echo '<iframe src="YOUR_PATH"></iframe>';
    }

    catch me on skype if you still have any problem?
     
    • Thanks Thanks x 1
  4. akwin4565

    akwin4565 Junior Member

    Joined:
    Dec 1, 2013
    Messages:
    135
    Likes Received:
    7
    Location:
    in front of bhw
    Iframe not loading when I pass through google help
     
  5. akwin4565

    akwin4565 Junior Member

    Joined:
    Dec 1, 2013
    Messages:
    135
    Likes Received:
    7
    Location:
    in front of bhw
    this also not working
     
  6. Wania

    Wania Junior Member

    Joined:
    Feb 11, 2010
    Messages:
    141
    Likes Received:
    96
    Something like that? http://wordpress.org/plugins/referrer-detector/ ? You can use html code in those messages so just put iframe there.
    Plugin is quite old and i'm not sure if it works with newest wordpress, but maybe you can re-use some code if it doesn't.
     
  7. akwin4565

    akwin4565 Junior Member

    Joined:
    Dec 1, 2013
    Messages:
    135
    Likes Received:
    7
    Location:
    in front of bhw
    this is totally different from what I need
     
  8. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    950
    Likes Received:
    662
    Occupation:
    Web/Bot Developer
    It's better to block Googlebot using an .htaccess file however you can achieve similar results using PHP:

    Code:
    if (!strpos($_SERVER['HTTP_USER_AGENT'],"Googlebot"))  {
     // content here won't be crawled and indexed by Google
    }
    
     
    Last edited: Jun 6, 2014
  9. sohom

    sohom Senior Member

    Joined:
    May 26, 2013
    Messages:
    981
    Likes Received:
    175
    Location:
    not in Past
    Hi
    I am Wordpress developer
    can fix your problem
    check PM :)
     
Thread Status:
Not open for further replies.