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? Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/ Share on other sites More sharing options...
simcoweb Posted February 13, 2007 Share Posted February 13, 2007 Do they allow tables? Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183728 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? Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183741 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. Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183757 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 Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183767 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? Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183801 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 ?> Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183825 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. Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183833 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? Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183836 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 Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183850 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? Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183852 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); ?> Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-183858 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? Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-184358 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" Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-184376 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? Link to comment https://forums.phpfreaks.com/topic/38337-alternative-to-iframe-on-myspace/#findComment-184781 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.