omen
June 3rd, 2007, 08:25 AM
While browsing through digital point I come across a pretty cool gem!
Source code to create a "Layout Snatcher"
<?
$title = $desc = "Layout Snatcher";
function getUrlContent($url)
{
if ( function_exists('curl_init') )
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
curl_close ($ch);
}
else
{
$content = file_get_contents($url);
}
return $content;
}
?>
<table width="670" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" class="mainbgwholeleft2">
<div align="left">
</div>
<div align="left">
<h1>Layout Snatcher</h1>
</div>
<div>
Have you ever seen a really nice MySpace layout on someone's profile page, but didn't know where to get the code from? Well, now you can get any MySpace layout code you want! It's really easy to do, just enter the Friend ID of any profile page below... then click "Get Code" and we'll grab the MySpace layout code for you!
<br>
</div>
<div align="center">
<?
require_once( ROOT_DIR ."/include/db.php");
$sql = "select * from ad WHERE style='468x60'";
$rs = $db->Execute( $sql );
echo $rs->fields['content'];
?>
</div>
<?
if ( $_POST['action'] ):
$url = "http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=".$_POST['id'];
$content = getUrlContent( $url );
$reg = '<style type="text/css">(.*)</style>';
preg_match_all( "|".$reg."|isU",$content,$arr );
for( $i=0;$i<sizeof($arr[0]);$i++ )
{
$cc .= $arr[0][$i]."\n";
}
?>
<br />
<div align="center">
<br />
<br />
<strong>Your layout code has been captured, just copy and paste the Layout Code below into the "About Me" section of your profile page.</strong>
<br />
<br />
<textarea onClick="highlight(this);" name="codes" style="width: 450px" rows="8"><?=$cc?><?if ( SHOWPIMP == 'ON' ):?><a href="<?=HOMEPAGE?>" target="_self"><img src="<?=HOMEPAGE?>img/button.gif" style="position:absolute; left:0px; top: 0px;" border="0"/></a><?endif?></textarea>
<br />
<br />
<script src="/js/source.js" type="text/javascript" language="JavaScript"></script>
</div>
<?
endif;
?>
<FORM METHOD=POST ACTION="">
Friend ID:
<a href="/myspace-tutorials" target="_blank">what is this? </a>
<br>
<input type="text" name="id" size="20"/></br>
<input type="submit" value="Get Code"/>
<input type="hidden" name="action" value="1"/>
</FORM>
</td>
</tr>
</table>
http://forums.digitalpoint.com/showthread.php?t=114965
Someone may use it :)
Source code to create a "Layout Snatcher"
<?
$title = $desc = "Layout Snatcher";
function getUrlContent($url)
{
if ( function_exists('curl_init') )
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
curl_close ($ch);
}
else
{
$content = file_get_contents($url);
}
return $content;
}
?>
<table width="670" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" class="mainbgwholeleft2">
<div align="left">
</div>
<div align="left">
<h1>Layout Snatcher</h1>
</div>
<div>
Have you ever seen a really nice MySpace layout on someone's profile page, but didn't know where to get the code from? Well, now you can get any MySpace layout code you want! It's really easy to do, just enter the Friend ID of any profile page below... then click "Get Code" and we'll grab the MySpace layout code for you!
<br>
</div>
<div align="center">
<?
require_once( ROOT_DIR ."/include/db.php");
$sql = "select * from ad WHERE style='468x60'";
$rs = $db->Execute( $sql );
echo $rs->fields['content'];
?>
</div>
<?
if ( $_POST['action'] ):
$url = "http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=".$_POST['id'];
$content = getUrlContent( $url );
$reg = '<style type="text/css">(.*)</style>';
preg_match_all( "|".$reg."|isU",$content,$arr );
for( $i=0;$i<sizeof($arr[0]);$i++ )
{
$cc .= $arr[0][$i]."\n";
}
?>
<br />
<div align="center">
<br />
<br />
<strong>Your layout code has been captured, just copy and paste the Layout Code below into the "About Me" section of your profile page.</strong>
<br />
<br />
<textarea onClick="highlight(this);" name="codes" style="width: 450px" rows="8"><?=$cc?><?if ( SHOWPIMP == 'ON' ):?><a href="<?=HOMEPAGE?>" target="_self"><img src="<?=HOMEPAGE?>img/button.gif" style="position:absolute; left:0px; top: 0px;" border="0"/></a><?endif?></textarea>
<br />
<br />
<script src="/js/source.js" type="text/javascript" language="JavaScript"></script>
</div>
<?
endif;
?>
<FORM METHOD=POST ACTION="">
Friend ID:
<a href="/myspace-tutorials" target="_blank">what is this? </a>
<br>
<input type="text" name="id" size="20"/></br>
<input type="submit" value="Get Code"/>
<input type="hidden" name="action" value="1"/>
</FORM>
</td>
</tr>
</table>
http://forums.digitalpoint.com/showthread.php?t=114965
Someone may use it :)