Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2005, 03:23 PM
Phillip Chapman Phillip Chapman is offline
 
Join Date: Apr 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Request: PHP in admin's signature

I have a hack request that I was hoping that someone could kindly assist with.

I am admin of my forum and I would like to call an outside PHP script in my signature. All of the other members would use standard signatures (with vB code, no HTML and a 125 character limit).

If someone could help with this it would be a big help. There has got to be a way to do it.

Here is the PHP I'd like to include in my sig...

PHP Code:
<?php 
$username = "muppetcentral"; 

if(isset($_GET["afl"])) { 
  $afl = 1; 
  $url = "http://www.live365.com/pls/front?handler=playlist&cmd=view&handle=afl%3A" . $username; 
} else { 
  $std = 1; 
  $url = "http://www.live365.com/pls/front?handler=playlist&cmd=view&handle=" . $username; 
} 

$fp = fopen($url, "r"); 
while($line = fgets($fp, 255)) { 
  if(ereg( "artist:\"([^\"]*)\"", $line, $regs)) { 
    $artist[] = $regs[1]; 
  } else if(ereg( "title:\"([^\"]*)\"", $line, $regs)) { 
    $title[] = $regs[1]; 
  } else if(ereg( "album:\"([^\"]*)\"", $line, $regs)) { 
    $album[] = $regs[1]; 
  } 
} 
fclose($fp); 

for($i=0; $i<=2; $i++) { 
  if($artist[$i] != "") { 
    $_artist = $artist[$i]; 
    $_title  = $title[$i]; 
    $_album  = $album[$i]; 
    break; 
  } 
} 

$_album_disp = ereg_replace(":", "-", $_album); 
$_album_disp = ereg_replace("/", "-", $_album_disp); 
$_album_disp = ereg_replace("?", "-", $_album_disp); 
$_artist_disp = ereg_replace(":", "-", $_artist); 
$_artist_disp = ereg_replace("/", "-", $_artist_disp); 

?>
  
<p><strong>Now Playing:</strong> 
  <?= $_title ?>
  - 
  <?= $_artist ?>
Reply With Quote
  #2  
Old 04-16-2005, 11:30 PM
Phillip Chapman Phillip Chapman is offline
 
Join Date: Apr 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to bump this hack request in case anyone can help. Thanks in advance for your consideration.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:17 AM.


Powered by vBulletin® Version 3.9.0 Beta 2
Copyright ©2000 - 2017, vBulletin Solutions Inc.