hey all, after reading through this thread i am a little lost, i need to create a page with php code from linkmarket embedded into it .
I was able to the the page running, having trouble addign PHP code to it. anyone can help?
This is what i got for my template:
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - $pagetitle</title>
$headinclude
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr class="tcat">
<td><strong>Resouces</strong></td>
</tr>
<tr>
<td class="alt1">
<?php ../mylinks.php ?>
</td>
</tr>
</table>
$footer
</body>
</html>
although adding php file is not helping as it's not showing up.
here is the code i need to add:
Code:
<?php
/*
Link Market Link Page Module
Copyright 2003 Link Market, All Rights Reserved.
WARNING: Do not changecode below or your link page will not work!
*/
$user_id = "";
$url = "http://api.linkmarket.com/mng_dir/get_links.php?user_id="
.$user_id."&cid=".$_GET['cid']."&start=".$_GET['start']."";
echo GetLMDSContent($url);
function GetLMDSContent($url)
{
$buffer = "";
$urlArr = parse_url($url);
if($urlArr[query])
{
$urlArr[query] = "?".$urlArr[query];
}
$fp = fsockopen($urlArr[host], 80, $errno, $errstr, 30);
if (!$fp){echo "$errstr ($errno)<br />\n";}
else
{
$out = "GET /".substr($urlArr[path], 1).$urlArr[query]." HTTP/1.0\r\n";
$out .= "Host: ".$urlArr[host]."\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp))
{
$buffer .= fgets($fp, 128);
}
fclose($fp);
}
$buffer = strstr($buffer,"\r\n\r\n");
return $buffer;
}
?>