Jump to content

Alternative to iframe on myspace?


9999

Recommended Posts

Create the PHP script that includes whatever HTML you want it to display and in one of the table cells in you Myspace page use an 'include' tag

 

<include file="yourphpscript.php">

 

You will probably need to use the entire URL to the script file.

 

Just a quick note. To execute PHP scripts your page has to have a PHP extension.

This code will create 2 lines of text:

<?php

$img_handle = ImageCreate (425, 350) or die ("Cannot Create image"); //Image Size x,y
$back_color = ImageColorAllocate($img_handle, 21, 128, 162); //BG color RBG
$txt_color = ImageColorAllocate($img_handle, 0, 0, 0); //Image text color RBG

$about = "This is an image, Click link below to see.";
ImageString($img_handle, 31, 5, 0, $about, $txt_color);
$about = "YOUR IP ADDRESS IS: ".$_SERVER['REMOTE_ADDR'];
ImageString($img_handle, 31, 5, 14, $about, $txt_color); //Location of line: ?, ?, left px, top px
?>

<?php

$sql = mysql_query("SELECT RAND() FROM table_name LIMIT 1");
$row = mysql_fetch_array($sql);

$img_handle = ImageCreate (425, 350) or die ("Cannot Create image"); //Image Size x,y
$back_color = ImageColorAllocate($img_handle, 21, 128, 162); //BG color RBG
$txt_color = ImageColorAllocate($img_handle, 0, 0, 0); //Image text color RBG

$about = $row['column_name'];
ImageString($img_handle, 31, 5, 0, $about, $txt_color);
?>

I want it to be some like this: http://myotherprofiles.com/dailybibleverse/

 

This is the code that he uses:

<p>
<center>
<table style='width: 405px;table-layout:fixed; border-top: thin solid; border-right: thin solid; border-bottom: thin solid;border-left: thin solid;background-color:white'>
<tr>
<td align=center style='background-color:black'>
<a target=_blank href=http://www.myotherprofiles.com/dailybibleverse><img border=0 src=http://www.myotherprofiles.com/dailybibleverse/images/dailybibleverseheader.gif></a>
</td>
</tr>
<tr>
<td align=center style='border-top: thin solid;'>
<a target=_blank href=http://www.myotherprofiles.com/dailybibleverse><img border=0 src=http://www.myotherprofiles.com/dailybibleverse/images/dailybibleverse.gif></a>
</td>
</tr>
<tr>
<td align=center style='border-top: thin solid; background-color:black'>


<table border=0 bgcolor=000000>
<COL WIDTH=200><COL WIDTH=200>
<tr>

<td style='border-right: thin solid; background-color:black' align=left><a target=_blank href=http://www.myotherprofiles.com/dailybibleverse><img border=0 src=http://www.myotherprofiles.com/dailybibleverse/images/addtoyourmyspace.gif></a></td>

<td style='border-left: thin solid; background-color:black' align=right><a target=_blank href=http://groups.myspace.com/dailybibleverse><img border=0 src=http://www.myotherprofiles.com/dailybibleverse/images/joingroup.gif></a></td>

</tr>
</table>

</td>
</tr>
</table>
</center><p>

 

How would I implement the result of my php script http://www.mysite.com/daily_quote.php into all of this to make it update automatically?

 

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.