9999 Posted February 13, 2007 Share Posted February 13, 2007 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? Quote Link to comment Share on other sites More sharing options...
simcoweb Posted February 13, 2007 Share Posted February 13, 2007 Do they allow tables? Quote Link to comment Share on other sites More sharing options...
9999 Posted February 13, 2007 Author Share Posted February 13, 2007 Yes, I believe so. What would be the best way of displaying this in about a 100 x 300 table? Quote Link to comment Share on other sites More sharing options...
simcoweb Posted February 13, 2007 Share Posted February 13, 2007 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. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 13, 2007 Share Posted February 13, 2007 Make a php image, and embed it into myspace. Example: http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=61391576 Quote Link to comment Share on other sites More sharing options...
9999 Posted February 13, 2007 Author Share Posted February 13, 2007 Okay... My next question is how do you create a php image? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 13, 2007 Share Posted February 13, 2007 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 ?> Quote Link to comment Share on other sites More sharing options...
9999 Posted February 13, 2007 Author Share Posted February 13, 2007 Seems like the include tag might be easier? What do you mean by: To execute PHP scripts your page has to have a PHP extension. Quote Link to comment Share on other sites More sharing options...
9999 Posted February 13, 2007 Author Share Posted February 13, 2007 Do you mean loading extension to myspace page? If so, how do you do it? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 13, 2007 Share Posted February 13, 2007 Include isn't even an html command Quote Link to comment Share on other sites More sharing options...
9999 Posted February 13, 2007 Author Share Posted February 13, 2007 If my php script automatically updates daily, is there any way to automatically write to the image? In other words take whatever output the php generates and automatically update the image at the same time the php updates? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 13, 2007 Share Posted February 13, 2007 <?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); ?> Quote Link to comment Share on other sites More sharing options...
9999 Posted February 14, 2007 Author Share Posted February 14, 2007 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? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 14, 2007 Share Posted February 14, 2007 instead of src="http://somesite.com/blah_blah_blah.gif" you would use src="http://somesite.com/my_file_name.php" Quote Link to comment Share on other sites More sharing options...
9999 Posted February 14, 2007 Author Share Posted February 14, 2007 So, are you saying just replace this: src="http://somesite.com/blah_blah_blah.gif" with this: src="http://somesite.com/my_file_name.php" is all I would have to do or would some type of image still have to be created and embeded? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.