Jump to content

Alternative to iframe on myspace?


9999

Recommended Posts

Lets say I have a dynamic php page that generates a small "daily quote of the day" box:  www.somesite.com/daily_quote.php that I might normally open in an iframe.  Since myspace no longer allows iframes, is there a work-around that I could use to put this on a myspace page?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
?>

Link to comment
Share on other sites

<?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);
?>

Link to comment
Share on other sites

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?

 

Link to comment
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.