Jump to content

help with small script, preg_replace


Hepple

Recommended Posts

Hi, Im new here hope I got the right forum.

 

I have just found a small free script that parses the gig's from a myspace account so you can display them on an external website. Resulting in only having to update one source. The link to the script is here.

 

The problem is the design of it. It looks exactly the same as the original myspace would. I would like to customise it as much as I can with your help.

 

The only thing I could find was this, quoted from the website above:

You can change the colours of how it will look on your actual website by doing a preg_replace on the $pieces2[0]; variable.

 

This is the whole code:

<?php
$handle = fopen("http://www.myspace.com/fastpoint", "rb");
$contents = '';
while (!feof($handle)) {
  $contents .= fread($handle, 8192);
}
fclose($handle);
$pieces = explode("<span class=\"whitetext12\">Upcoming Shows</span>", $contents);

$pieces2 = explode("<table bordercolor=\"000000\" cellspacing=\"3\" cellpadding=\"0\" width=\"435\" align=\"center\" bgcolor=\"ffffff\" border=\"0\" class=\"latestBlogEntry\">", $pieces[1]);

echo "<table bordercolor=\"6699CC\" cellspacing=\"0\" cellpadding=\"0\" width=\"440\" bgcolor=\"6699CC\" border=\"0\">";
echo $pieces2[0];
?> 

 

Can anyone help?

Link to comment
https://forums.phpfreaks.com/topic/100943-help-with-small-script-preg_replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.