Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.