Jump to content

textbox

Members
  • Posts

    142
  • Joined

  • Last visited

    Never

Everything posted by textbox

  1. Thanks for all that feedback. What I actually aim on be able to do is have a base picture of a recognisable character such as John Lennon or Elvis for an example in this case. Display this pixelated image to start with. As users upload images the script works out their colouring and places them in an acceptable slot that builds up the original image. In short, it will be a collection of tiny images, that build up a recognisable image, in the form of a mosaic. I have seen this done in flash, but imagine php can do it using some algorithm or some sorts :S Ta Again everyone Nick
  2. Hello, im looking at creating a dynamic mosaic and was wondering if anyone has attempted this, or knows anything about it. I wish to allow users to upload or send in images that will be resized and placed with the mosaic which will obviously create an image of some sort. Any help or pointers would be great. Thanks nick
  3. Hello there, quite new to the world of js and having trouble with this. Code: <script type="text/javascript"> var current= new Date() var morning_afternoon_night=current.getHours() if (morning_afternoon_night<12) document.write("<img src='img/good-morning.gif' id='welcomeTitle'>") else if (morning_afternoon_night<18) document.write("<img src='img/good-afternoon.gif' id='welcomeTitle'>") else document.write("<img src='img/good-evening.gif' id='welcomeTitle'>") </script> This code should display an image dependant on the time of the users computer. I want to include something like this; Code: background : #bcd589 url(bg.jpg) repeat-x scroll 0 0; The last bit is CSS which sets the background of the page. I wish to set the bg of the page dependant on the users time. Any help would be great as everything ive tried has not worked!! Thanks Nick
  4. Here is one way i do it. // return the mime type associated with a filename including extension. function getMimeType( $filename ){ $extension = substr( $filename , strrpos( $filename, '.' ) + 1 ); switch( $extension ) { case( 'gif' ) : return 'image/gif'; case( 'jpg' ) : return 'image/jpeg'; case( 'png' ) : return 'image/png'; case( 'txt' ) : return 'text/plain'; case( '3gpp' ) : return 'video/3gpp'; case( 'amr' ) : return 'audio/amr'; default : return '?/?'; } }
  5. In my upload scripts there is a clause as to what the file will allow. Such as; //allowed Extensions $limitedext = array(".gif",".jpg",".png",".jpeg",".bmp"); This allows me to limit what they can upload. As AndyB says, you cant stop them from trying, but you can return them an error if, say, they tried to upload a .pdf or .doc
  6. Could you explain this a little more please?!?
  7. Thanks for that Shogun. However, it didnt work. Again however, saving things as .phps does work as Word retains the syntax highlighting copied in. Thanks everyone! Nick
  8. The way i get around that is to use an include file on any php script needing database access. Keep your connection string as it is and copy it over to another file, and name that file global.php or something similar. At the top of everypage (however, underneath if you are using sessions or anything else header related) call in the connection string using include_once ("global.php"); And your database will connect, leaving you free to give the script to whomever you wish. I tend to keep my included scripts in an include folder, in which case I am including /include/global.php Hope this helps and is what you were looking for Nick
  9. Do you simply want to check it for yourself, or for other users to check whilst on your site?! http://instantdomainsearch.com/ have a checking facility for top level domains, and they also have a widget you can place on your site.
  10. Sorry, i need to present all my coding in a printed formed report. There will be some extended writing etc. I need to be able to write say a paragraph, then have an excerpt of coding to explain, i wish to have code highlighting when i explain this coding. Obviously, Notepad ++ and Dreamweaver are not usable for this purpose. Thanks
  11. Not so much a PHP technical problem, but; I have to do a write up containing all my code, and i would really like it if the code had the syntax highlighting you find in Dreamweaver, Notepad ++ and on here. Any idea what software i can use to achieve this? Ive tried MS Word, but to no avail! Any ideas would be great! Thanks Nick
  12. I donnot have flash! Sorry. I do not follow that :S
  13. Its quite an expensive job. Im doing it myself, converting 3gp files into flv files on the fly. How is your php knowledge?!
  14. It will be called TextBubble. Why do you ask?!
  15. Hello. I wish to have a simple friends feature on my site. I know its just a relationship of somesort but how is it done? I can set up a new table if needs be. Also would like the code to pull out the friends from the db. Thanks Nick
  16. Thanks Corbin, i have the horrible habit of referring to javascript as java, and everyone pulls funny faces at me. I understand why though!! Thanks again
  17. I want to create a popup file, or a new window using _blank. What is the best way to do this? PHP or java? I would like scrollbars, but not for it to be resizable, and i would like it central to the users screen. Any ideas?!
  18. Thanks a lot guys, i did notice that earlier and meant to ask where it was coming from, but then forgot! Thanks a lot Thorpe and Techie!
  19. That doesnt return anything?! Which i dont get. The table name is correct and populated. The field name flv_location.
  20. No output echoed in terms of errors. No output echoed in terms of flash either I wonder if something like a flash video playlist would be an easier way to do it? Driven on XML pulling in the locations in php. I know this can be done. I have however no idea how!!! Great isnt it!
  21. Oh, and the $ i need to drag out is called $flv_location
  22. Thanks for that Thorpe. Sadly though it doesnt output anything?! Any ideas? <? include "global/db.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript"> function MM_CheckFlashVersion(reqVerStr,msg){ with(navigator){ var isIE = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1); var isWin = (appVersion.toLowerCase().indexOf("win") != -1); if (!isIE || !isWin){ var flashVer = -1; if (plugins && plugins.length > 0){ var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : ""; desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc; if (desc == "") flashVer = -1; else{ var descArr = desc.split(" "); var tempArrMajor = descArr[2].split("."); var verMajor = tempArrMajor[0]; var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r"); var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0; flashVer = parseFloat(verMajor + "." + verMinor); } } // WebTV has Flash Player 4 or lower -- too low for video else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0; var verArr = reqVerStr.split(","); var reqVer = parseFloat(verArr[0] + "." + verArr[2]); if (flashVer < reqVer){ if (confirm(msg)) window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"; } } } } </script> </head> <body> <?php if ($result = mysql_query("SELECT * FROM mms_message_element ORDER BY id ASC")) { if (mysql_num_rows($result)) { while ($row = mysql_fetch_array($getflash)) { echo "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"240\" height=\"180\" id=\"FLVPlayer\"> <param name=\"movie\" value=\"FLVPlayer_Progressive.swf\" /> <param name=\"salign\" value=\"lt\" /> <param name=\"quality\" value=\"high\" /> <param name=\"scale\" value=\"noscale\" /> <param name=\"FlashVars\" value=\"&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName={$row['flv_location']}&autoPlay=false&autoRewind=false\" /> <embed src=\"FLVPlayer_Progressive.swf\" flashvars=\"&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName={$row['flv_location']}&autoPlay=false&autoRewind=false\" quality=\"high\" scale=\"noscale\" width=\"240\" height=\"180\" name=\"FLVPlayer\" salign=\"LT\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /> </object>"; } } } ?> </body> </html> Its not outputting anything on the screen. I appreciate the help so far though
  23. Sorry Trium, i dont mean to be rude, but are you trying to get the code working yourself (like you did the other day with the image upload) or are you looking at ways i can rectify my problem?! Ive looked into the sprintf() functions and to be honest its baffling me!!:S
  24. These are not something I know a great deal about. Obviously its best to take precaution, but do they happen a great deal? Are they always malicious and done on purpose by someone, or totally random and bot'ed?
  25. In the db? Just as a varchar.
×
×
  • 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.