The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

PHP landing pages

DoubleDouble

Active Member
Hey fixers, some questions about PHP.

a) I have a protection script that is in PHP, do I need to convert the whole landing page to PHP for it to work or can i paste teh <php> script to teh top of the page and it will work automatically?

b) Does anyone have a guide or can tell me how to save a landing page in PHP format and how to use it.
I took the HTML of a langing page, put it it into a PHP converter, saved the php to the directory and when i went to page: abs.com/index.php it just downloaded the page.

any advice about this please?
 
Do you know what SSI is?

<!--#include virtual /path/file.php -->

The download issue of a PHP file is for the reason that your server does not have PHP enabled.
Is the server nginx or Apache2?
Amazon *bucket* is static HTML I'm told ...

You can encapsulate the existing code this way;
PHP:
<?php
$landing = <<<OUTPUT
{HTML here}
OUTPUT;
echo $landing;
 
Last edited:
Do you know what SSI is?

<!--#include virtual /path/file.php -->

The download issue of a PHP file is for the reason that your server does not have PHP enabled.
Is the server nginx or Apache2?
Amazon *bucket* is static HTML I'm told ...

Thanks Greybeard! as always appreciate the insight. As it happens I have this on amazon so that might explain the issue.
 
I don't know what a *protection* script is -- or how it works.
does the script detect/and sort > then redirect to the HTML file; or is it intended to be used as part of the HTML document?
a feature that Binom have, it protects the landing page from direct access. I have seen it a bit not just there. to do so you would use the following:

<?php $key="ABCDEFGHIJKLMNOP";$a=@$_GET["lpkey"];$b=substr($a,0,2).substr($a,4,2).substr($a,8,2).substr($a,12,2).substr($a,16,2);$c=substr($a,2,2).substr($a,6,2).substr($a,10,2).substr($a,14,2);$d=md5($key.$_SERVER["REMOTE_ADDR"].$_SERVER["HTTP_USER_AGENT"].$b);$d=substr($d,2,2).substr($d,7,2).substr($d,12,2).substr($d,24,2);if(time()>$b || $d!==$c){exit(0);}?>

they sate to put this at the top of a landing page, and then append the key to the end of teh url i.e.

abc.com/index.html?ke=ABCDEFGHIJKL......

but not sure if this will work on an HTML page or if the whole page needs to be Php
 
I don't know what a *protection* script is -- or how it works.
does the script detect/and sort > then redirect to the HTML file; or is it intended to be used as part of the HTML document?
 
just take the same index.html file and rename it to index.php and the php code can be put anywhere in the landing.
page so simple.
you can past example of your landing page here with the php code you are trying to integrate, and i will help with that if you are confused.
 
the easiest way is to try first with SSI (usually not enabled by default on a server --it's voo-doo from way back :p)
but what it does is $_GET["lpkey"]
or get the variable lpkey from the URL's query string ? _____
as is it needs to be on the same page

Make it a separate script file
lpkey.php

then in the now SSI enabled HTML do:
<!--#include virtual = "/path/lpkey.php" -->
[domain root]"/path/path/file"
<head ....

</html>

This way is the least work :) *should work

Or you can do
======
<?php
your code here
$landing = <<<OUTPUT
{HTML here}existing html
OUTPUT;
echo $landing;
note; no space before OUTPUT !important

*that's less work than making a proper PHP page (copy and paste the old HTML code)

If you have PHP 7.X or above you don't need the closing ?> anymore ;)

Or you can use a PHP template with PHP includes that is the normal way
Using the PHP Include Function to Template Faster « Build Internet
That's the idea ...
 
Last edited:
banners
Back