1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How Can I Code This Into My Site Like His?

Discussion in 'Programming' started by junior777, Jul 4, 2017.

  1. #1
    I've been trying to figure out how to do this with my Optimize Press pages for years. Optimize Press support has never given me a definitive answer. Then I just saw someone with an Optimize Press site doing what I'm trying to do.

    I made a video explaining it here:

    https://www.screencast.com/t/3FaQ9uOF
    SEMrush
     
    Solved! View solution.
    junior777, Jul 4, 2017 IP
    SEMrush
  2. #2
    I don't know much about Optimize Press but I can tell you that a page like this can be simply made with some PHP. You basically have to get the values of the parameters "member", "affiliate" and "facebook" in the URL. Then you plug those values into your webpage. You must sanitize these variables before putting them into your page (I've done this with the strip_tags(); function) because this may cause an XSS vulnerability. Here's a little sample code that should allow you to do this in your own webpage:

    <?php
    $member = strip_tags($_GET["member"]);
    $affiliate = strip_tags($_GET["affiliate"]);
    $facebook = strip_tags($_GET["facebook"]);
    // Your html page (sample)
    ?>
    <html>
    <head>
    <title>Title</title>
    </head>
    <body>
    <?php
    echo "<p>Your Sponsor Will Be: $member ($affiliate)</p>";
    // Message Me On Facebook Button
    echo "<p><a href='http://m.me/$facebook'><img src='http://louishemmings.com/wp-content/uploads/2016/06/facebook-button.gif'></a></p>";
    ?>
    </body>
    </html>
    
    Code (markup):
    Here is a screenshot of the sample in action:-

    [​IMG]
     
    Abdul Ali Khan, Jul 4, 2017 IP
  3. junior777

    junior777 Active Member

    Messages:
    131
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    68
    #3
    Should I post this in the header section or in the body section of the code? Those are really my only options to add it in the scripts section. Header, After Body, Custom CSS. Otherwise I will have to go into the actual editor to do it but I'm afraid of doing it that way because if I mess it up I won't know how to fix it.
     
    junior777, Jul 4, 2017 IP
  4. Abdul Ali Khan

    Abdul Ali Khan Member

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    33
    #4
    I'm assuming Optimize Press allows you to use PHP because you showed that somebody using this editor has made a page like this.
    Put this in the header:
    <?php
    $member = strip_tags($_GET["member"]);
    $affiliate = strip_tags($_GET["affiliate"]);
    $facebook = strip_tags($_GET["facebook"]);
    ?>
    Code (markup):
    and this where you want to plug it into your code (Body):-
    <?php
    echo "<p>Your Sponsor Will Be: $member ($affiliate)</p>";
    // Message Me On Facebook Button
    echo "<p><a href='http://m.me/$facebook'><img src='http://louishemmings.com/wp-content/uploads/2016/06/facebook-button.gif'></a></p>";
    ?>
    Code (markup):
     
    Last edited: Jul 4, 2017
    Abdul Ali Khan, Jul 4, 2017 IP
  5. junior777

    junior777 Active Member

    Messages:
    131
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    68
    #5
    Thanks for your help... but I can't figure it out. I guess I'm going to have to talk with someone who is more familiar with Optimize Press. Another thing that I'm confused about is how do I link my join button for my biz and the button for them to message me on FB. But to answer your question, it has to be compatible with PHP somehow, because I know for certain that the guy's website is Optimize Press just like mine because I checked his source code.

    https://ueconomybonus.com/join/?mem...teammansell&facebook=hardworkanddedication247
     
    junior777, Jul 4, 2017 IP
  6. Abdul Ali Khan

    Abdul Ali Khan Member

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    33
    #6
    Oh I really thought it would work bro. Can you tell me a few things about Optimize Press so I can look into this further? Is it like a Wordpress plugin?

    Yeah he definitely uses OptimizePress but does he have the same version as you like he may have Pro or something else?
     
    Last edited: Jul 4, 2017
    Abdul Ali Khan, Jul 4, 2017 IP
  7. junior777

    junior777 Active Member

    Messages:
    131
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    68
    #7
    Yes, Optimize Press is both a WP theme and a WP plugin... if you want to use your own theme, you can use it as a plugin, if you want to use the Optimize Press blog, you use the theme.

    Let me know whatever else it is you need to know and I will provide you more details. If we can figure this out I have no problem paying you to help me get it set up.
     
    junior777, Jul 7, 2017 IP
  8. Abdul Ali Khan

    Abdul Ali Khan Member

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    33
    #8
    I looked up Optimize Press and I think I've figured out what the problem might be.
    To get around this problem, You can install this plugin on your blog: https://wordpress.org/plugins/php-code-widget/
    This plugin will basically allow you to run PHP on your website without altering any files manually.
    Here's a video that shows you how to add PHP code onto your blog with this plugin:
    Try adding the code sample that I wrote in my first post. I hope it works.
     
    Abdul Ali Khan, Jul 8, 2017 IP