Código PHP:
if($_GET['p']=='videos') {
// (1 = Yes, 0 = No)
$OpenInNewWindow = "1";
$BLKey = "HE56-B9JQ-XQ4L";
if(strlen($_SERVER['SCRIPT_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_URI'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:'');
}
if(!strlen($_SERVER['REQUEST_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:'');
}
$QueryString = "LinkUrl=".urlencode((($_SERVER['HTTPS']=='on')?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$QueryString .= "&Key=" .urlencode($BLKey);
$QueryString .= "&OpenInNewWindow=" .urlencode($OpenInNewWindow);
if(intval(get_cfg_var('allow_url_fopen')) && function_exists('readfile')) {
@readfile("http://www.backlinks.com/engine.php?".$QueryString);
}
elseif(intval(get_cfg_var('allow_url_fopen')) && function_exists('file')) {
if($content = @file("http://www.backlinks.com/engine.php?".$QueryString))
print @join('', $content);
}
elseif(function_exists('curl_init')) {
$ch = curl_init ("http://www.backlinks.com/engine.php?".$QueryString);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
if(curl_error($ch))
print "Error processing request";
curl_close ($ch);
}
else {
print "It appears that your web host has disabled all functions for handling remote pages and as a result the BackLinks software will not function on your web page. Please contact your web host for more information.";
}
}
if($_GET['p']=='survey') {
// (1 = Yes, 0 = No)
$OpenInNewWindow = "1";
$BLKey = "1DNH-49UO-I0G2";
if(strlen($_SERVER['SCRIPT_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_URI'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:'');
}
if(!strlen($_SERVER['REQUEST_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:'');
}
$QueryString = "LinkUrl=".urlencode((($_SERVER['HTTPS']=='on')?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$QueryString .= "&Key=" .urlencode($BLKey);
$QueryString .= "&OpenInNewWindow=" .urlencode($OpenInNewWindow);
if(intval(get_cfg_var('allow_url_fopen')) && function_exists('readfile')) {
@readfile("http://www.backlinks.com/engine.php?".$QueryString);
}
elseif(intval(get_cfg_var('allow_url_fopen')) && function_exists('file')) {
if($content = @file("http://www.backlinks.com/engine.php?".$QueryString))
print @join('', $content);
}
elseif(function_exists('curl_init')) {
$ch = curl_init ("http://www.backlinks.com/engine.php?".$QueryString);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
if(curl_error($ch))
print "Error processing request";
curl_close ($ch);
}
else {
print "It appears that your web host has disabled all functions for handling remote pages and as a result the BackLinks software will not function on your web page. Please contact your web host for more information.";
}
}
if($_GET['p']=='staff') {
// (1 = Yes, 0 = No)
$OpenInNewWindow = "1";
$BLKey = "GK65-V6V2-LJQ9";
if(strlen($_SERVER['SCRIPT_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_URI'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:'');
}
if(!strlen($_SERVER['REQUEST_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:'');
}
$QueryString = "LinkUrl=".urlencode((($_SERVER['HTTPS']=='on')?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$QueryString .= "&Key=" .urlencode($BLKey);
$QueryString .= "&OpenInNewWindow=" .urlencode($OpenInNewWindow);
if(intval(get_cfg_var('allow_url_fopen')) && function_exists('readfile')) {
@readfile("http://www.backlinks.com/engine.php?".$QueryString);
}
elseif(intval(get_cfg_var('allow_url_fopen')) && function_exists('file')) {
if($content = @file("http://www.backlinks.com/engine.php?".$QueryString))
print @join('', $content);
}
elseif(function_exists('curl_init')) {
$ch = curl_init ("http://www.backlinks.com/engine.php?".$QueryString);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
if(curl_error($ch))
print "Error processing request";
curl_close ($ch);
}
else {
print "It appears that your web host has disabled all functions for handling remote pages and as a result the BackLinks software will not function on your web page. Please contact your web host for more information.";
}
}
if($_GET['p']=='reviews' && 'id'!='0') {
// (1 = Yes, 0 = No)
$OpenInNewWindow = "1";
$BLKey = "TZLJ-59NL-24ID";
if(strlen($_SERVER['SCRIPT_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_URI'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:'');
}
if(!strlen($_SERVER['REQUEST_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].((strlen($_SERVER['QUERY_STRING']))?'?'.$_SERVER['QUERY_STRING']:'');
}
$QueryString = "LinkUrl=".urlencode((($_SERVER['HTTPS']=='on')?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$QueryString .= "&Key=" .urlencode($BLKey);
$QueryString .= "&OpenInNewWindow=" .urlencode($OpenInNewWindow);
if(intval(get_cfg_var('allow_url_fopen')) && function_exists('readfile')) {
@readfile("http://www.backlinks.com/engine.php?".$QueryString);
}
elseif(intval(get_cfg_var('allow_url_fopen')) && function_exists('file')) {
if($content = @file("http://www.backlinks.com/engine.php?".$QueryString))
print @join('', $content);
}
elseif(function_exists('curl_init')) {
$ch = curl_init ("http://www.backlinks.com/engine.php?".$QueryString);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
if(curl_error($ch))
print "Error processing request";
curl_close ($ch);
}
else {
print "It appears that your web host has disabled all functions for handling remote pages and as a result the BackLinks software will not function on your web page. Please contact your web host for more information.";
}
}
Código PHP:
if($_GET['p']=='videos') {
El BLkey de la pagina videos es
$BLKey = "HE56-B9JQ-XQ4L";
Y asi tiene cada una de las paginas uno distinto , hay alguna forma de definir cada key para cada pagina y despues agregar un codigo solo de baklinks que tome ese key depediendo de la pagina en que entremos?
Con algun case? switch ? array?
Intete pero mi conocimiento en esos metodos no son muy buenos , espero que me puedan ayudar.
Saludos y buen fi nde semana para todos.