Jump to content

requinix

Administrators
  • Posts

    15,227
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. What errors? Parse error, unexpected T_ECHO? Unexpected $end? Unexpected ">"? Undefined constants "divisor0" or "br"?
  2. Lemme say it a different way: function strposFirstMbChar($string) { $len = strlen($string); for ($i = 0; $i < $len; $i++) { if ($string[$i] >= "\xC0") { return $i; } } return false; }
  3. 1. Read lines until you find "[entities]" 2. Read and save lines until you find "[anything]", or perhaps literally just "[relations]" Are you asking about, like, what functions to call? Where files are? How to use arrays?
  4. If you mean to say "the offset of the first character which has a multi-byte UTF-8 encoding" then find the first byte whose ASCII value is >= 192.
  5. The anchor/fragment (the thing after the #) is never sent to the server. You will never receive it ever. $_GET["say"] will be empty.
  6. That's spot-on. I was thinking of 0.0.0.0 but that's only IPv4. The underlying constants for binding (on Linux) AF_INET and AF_INET6 so that requires two calls to bind(). So actually no, it's definitely not possible to listen to both IPv4 and IPv6 - unless there's something which hides that kind of detail from you.
  7. Nope. You could bind to a port only though.
  8. Are the permission settings on /tmp 1777 (drwxrwxrwt)?
  9. If you're going to write something that deals with an IRC server yourself then you must learn the protocol. Blathering on about "user" and "nickserv" won't do you any good unless you can talk to the server in a way that it understands. I can't remember what I used as a reference back when I wrote a bot, but there's this for starters. At least you're close, though. Thankfully IRC communication is text-based.
  10. Hmm yes, that agrees more with what the post says. Awesome. I don't. I think it's one of those things were you should decide to opt-into it because you have a problem with the normal methods, and then only after you've conducted a thorough evaluation (even trial run) of it. Problem is that unless you manage the connection very carefully, being sure to "open" it right when you need it and "close" it when you are done, the connection will stay in use for the whole duration of your scripts. Which equates to nearly 1000 connections at a time. Which is bad.
  11. If they're all in the same form - name, minimum, maximum, and price - then they should be in the same table. You could move the names off into another table "id | name ---+---------------- 1 | Interior Labour 2 | Exterior Labour (and reference the IDs instead of the names) If you want to store the quotes, that's a business decision. I would suggest it so a customer can reference the quote they got if they have questions for you. For the tables, have one table for the quote as a whole (like who, when, and how much) and another table for the values of the various variables. "quote | variable | amount | unit price | subtotal ---------+---------------+--------+------------+------------ 1 | 1 | 30000 | 2.13 | 63900 1 | 2 | 12000 | 2.34 | 28080
  12. For one it won't work because private $mySQLpassword="$this->mySQLuser".'password'; you can't use expressions as the default values for class variables. That aside, Persistent connections are a good idea only when it takes a (relatively) long time to connect to your database. Nowadays that's almost never the case. The biggest drawback to persistent connections is that it limits the number of users you can have browsing your site: if MySQL is configured to only allow 10 concurrent connections at once then when an 11th person tries to browse your site it won't work for them. Don't use persistent connections. They may sound useful but they have major disadvantages. PDO does not manage the persistence. The MySQL driver does. It reuses connections when a) they are available and B) the host/user/password/database match. If any change then it will not reuse a connection. The best case net effect is that these connections you have will be started and stopped so often because you have different users on the site and making them persistent doesn't do any good. This is a very bad idea. Do not do it. It would entail creating users in MySQL for every user in your site. The whole idea is just... no. Just no, okay? The best thing you can do for security is create a couple users specifically for read-only and for read-write access. The first one has just SELECT privileges on everything and I gotta imagine most of your site will be using that. The other user has INSERT and UPDATE (and DELETE if you think that's not a bad thing to do in a database) and gets used if there are actual changes to make someplace. If, for example, you update a last-browsed-timestamp for a user or record page views then I might consider allowing the read-only user UPDATE privileges on the users table and INSERT in the page views table. The main point is to have as few permissions as possible.
  13. Okay, if you don't understand that, then try clicking a link to a different page.
  14. And you have any better ideas? You need something that will persist: frames and windows are the options available. And you said no frames.
  15. As bad as it sounds, a popup. One initiated by the user and not spawned automatically, of course.
  16. If the problem is the first hop between your modem and the ISP then you can do a tracert/traceroute with a maximum number of hops being (the distance between your machine and the modem/router) + 1. But really, a ping to someplace you know should always be up is just as good - and much easier to implement.
  17. I gave you a link so that you would click it, read the documentation, and use the function correctly. And your script is outputting HTML. <br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='1' color='#000000'><b>PHP Error Message</b></font></td></tr></table><br /> <b>Warning</b>: imagecreatefromjpeg(tiffany_alvord_heart_2bg9s7p.sized.JPG) [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: failed to open stream: No such file or directory in <b>/home/a4566300/public_html/merge.php</b> on line <b>3</b><br /> <br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><div align='center'><a href='http://www.000webhost.com/'><font face='Arial' size='1' color='#000000'>Free Web Hosting</font></a></div></td></tr></table><br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='1' color='#000000'><b>PHP Error Message</b></font></td></tr></table><br /> <b>Warning</b>: Wrong parameter count for imagecopyresampled() in <b>/home/a4566300/public_html/merge.php</b> on line <b>10</b><br /> <br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><div align='center'><a href='http://www.000webhost.com/'><font face='Arial' size='1' color='#000000'>Free Web Hosting</font></a></div></td></tr></table><br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='1' color='#000000'><b>PHP Error Message</b></font></td></tr></table><br /> <b>Warning</b>: imagecopymerge(): supplied argument is not a valid Image resource in <b>/home/a4566300/public_html/merge.php</b> on line <b>12</b><br /> <br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><div align='center'><a href='http://www.000webhost.com/'><font face='Arial' size='1' color='#000000'>Free Web Hosting</font></a></div></td></tr></table>‰PNG IHDR ê ù )Ö©{ °IDATxœíÝÿqÛFÆñGÿm( ˜p"Ó€E7qÑ5p7×@n’\Â9×€“4`( ˜JÒ@¤4 û"½\.°øµ‹ñýÌp0”‰$zòòÅ,.À奤¤Ëç罟%ý{g.b ;ˆ_ËLÛÃó{£"¨8W}ƒØFôܼˆýÀˆÞ<?o5nÛ|îo?ãAEÊÌ JÒ[k;¨õz­ËËKív;=>>ÆøÈZSJ"ˆ›ÍÆù¼wss£Ÿ~úÉüÑ­¨¨8#³¢Ožçáv²%‚Š!& âjµRžç‡Gß ú8‚úVҏ£}@M’ ¢ýˆ…ŠŠ©]©:Jº}Þ^\´ÛíÛ®jìØ—mèý²1G=oû îÇßXÛA¥D×óÝÝÝÉû×ëõQp÷..N¢5;uÞDI*ŠÂù|{{ÛëÏ{zz:y-ÏsÝßß›/]+â‘_¾ú¦ jü úìv;m6ÇçL8‚AÖ¤A̲L›Ífò Ú_ICÑçáááäµ<ÏíýÙŠŠz6’bÝ,1–º1â?;U'Óï$ýemÿ-飤wæþn·Û£?`ê#¿u‚¨$‚X?¬í?[üügA­«¨–¨³T‚Ú앤Üx¼~~^T˲¬}DêÛJ ¢ÏQ2]G}©¨ÓªâþA<Ø }PUÝJDŸ£d¶¬¨Û`{ãpîエ/³Ä„‚hnG_-ÁáJÒa¨še™3¬ŽYj¦ªÇ nîA%ˆê>Ô±J;ˆm O]³ÔÍfcÿûŒ6KMý«ï¤A”¤ëëkI:Ün·K¢$ÏÏŸ¬í¨—{ô 㸃k–ê8Ñ?øqŠ½©ƒšdÍçX\C}‚ÕNFßéúê»ÙlìYêFÒ¯¡wL T{Ý‚éì‡ýWÑ¥Ñçäȯý;⨨Ñ9ԐHµ’Jí³j&bÝPͼ³TG»­ÿñ• >K`¨OÃòÎRSèQß(þJn’¢¡”{¨OãðÎR§¬¨’þ+é&ÔØëÖLD{~˜PKÅê£Ù+IGCe׈fªYê…ª¯Q½KøXH •ÐÙ5¥â\%;KõL"ˆç0ÔG³RÆ4¢(Š6G~£„à…¬ùÑû÷ïµÙl¢1¡>AD)ÏØpªYêYG»¤0ýcA”Ž‡ú¶ÒÜhYQ£ÌR_¨Åü¨-û¬NsÃÌüá{ÃTG~O*ªk~´—ÀÙ5Åó3AD¥¹±ÿý6MÝ£¸*jQº¹¹‰qІ¡>¦TúÞ0å,õJÕaé'IOY–=Ù¾ûî»'ó=ŸUUÃ÷’¾—ô­ª“-^Fúgš¼’õ;ëb¿çùç‚z!ë@Škø_–eÛ?¯ÔñPŸŠˆ9i5ï¾¾¾¶Û½¼íÏöõÕóscŸê8 \Hú¤ïT |WªNžx­jѧ¨ZøéWUý#!Å\”憫OuÈìÇ‘}P½}ª¥TÄÿ© "gÞà\”æ†+ŽÂ•‡Ú™½¾5µCÀÄŽ~ù›¦ †×avå‹}P?›/¶¨¨yˆð—¹AEÒÔ§¢æAöÄзG•"’&pôËŸJEÝóÎR¯¯¯íÙÑ›†?˜«—Jp–º¯¨ÞYªC>öÎ 8%ºªê~eCfw*_]šÞѧbA’ëSkƒÚBðCÒÀD’ëS©¨À©äf©fP¯Ås\Þíª ²äf©­+ªãòžxë´ qÍ»GͲÌ~éj̝‘\jò^‹Ç,Ñj–še™‡`…ˬ¨Þ+`èS±'³T×5Ù1ÛÁ¯¬íÒÜ OÅ‚æ†+¨1WcPmŽûf̝REEÒôÉÜhYQƒ.;¨ÌR**¦ÂܘU*1KÅ2M]QmÌR/’™¥Úõd–jŸ•‘ç¹ý–í˜;¤jʪjUòœçè*p® scÊ>ÕÔÆóA};ꉢ¢iJf–ê jãµxô¨X***¦Âܘz–j{#ãpóz½>9$½Z­Ñ` ¼ËèÖ,…÷Z<f©Xï,5Fár}õõ®kJŸŠi¼Ý‹§tU¢Oö¼·{‰Q¸ê‚Ê,¨PQðÞ’4Fáª*³T rvõå({¤e¾=ª$­×kû%V{À9J¢¢Öé3Kýv²½Âš|–ZWQ½ëš:Îq¤¢â\M^Uë‚*yÎstœãøõ;$hò>µ)¨G¨¨X°¤+jãµxŽŠÊŠ„8W“ÏR©¨€_inØËèJóêQ%f©8O¥ï Sžtt]êjµ:9$½^¯¹Ü Kà]F·æºÔÑ WSEýÍܸ¿¿?y}*Â{KR)ìI@­{T‰>‹Vš®>5dáòµ07Zô©¯‡î¨Ò÷†…kPEÝn·ö[ò!;$¬47ZVÔÑNòÕ»®©%°/@ÊoI*QQ”æƬzÔ¯zÒ÷†)®zg©,Š…˜t–ꫨÞYªCÞwg€„yoI*…›¥¶éQ¯ OÅ‚4.Q$…ëSÛÕ{-ž…Y*Εw‰¢P}*h¯OEe–Ú&¨Þkñ,yߝ׸Œ®DER0ï5Ë2û¥«þ»$k²µ ï="™¥b!¼ËèÖÌRŸÔ¦¢þnn<>>ž¼aÊ».yoI*I×××öKùÐn{®ocŸê(÷\@ŽsåíSò¡Ú6¨}ª£¢~Ó—€¤yûÔX©¨@7}*êà“€Úµq–JŠñÎR©¨ÀôæÛ£JÌR±G¿ü®k´§< ˆY*ðEôYjÛŠÊ,¨áªªcÏR»¬™Tšöš1ô©XÂÜh¹DQ>ä{õd/ßÍ HUŒ>u´ŠúnV@Bº.£+ œ¥v j㺦SÞÍ ˜HSan̪G•¤Õje¿Äˆg/µYªw]Sf©Xï,5Ë2;½OêRQ½÷ˆ¤OÅR¹ªê˜#ËN÷ž}*°W˜® ŽyÐ Ú˜¥b©¨¨@š¼³Ô1TèTf©@¥ñÒOi~u”»Y‰ñ^ú™l*…»›˜¨µ«>³ÔocíY´Yj׊ê½Gä”+…‘E«ª]ƒ*yÖŒ u7+ AÑúÔ>Am\×”ŠŠ9«ŠÊJ8WÞ[’Ž5KíÔÆuM©¨X³ª¨³Tœ§¨³Ô®ÞÈ8ܼ^¯OI¯×k.wÃx—Ñ­Y:4 ï="™¥bA¼³ÔÕj5¸põùêë½G$}*ÄÛ§Žq±JŸ JÝûÔÁw³åíSǸX¥oPg©S®DVšö…*RÂÕ!ïù9@ê/ý”ÆYP¡oPg©TT,Hin̽¢Jïf$ªô½aʼ³T–ÅBx/ýc–:JE½»»kó3yÏÏRæ]FW¾8}ß žÌRíŝèS± ¥¹¢OíT©ûý7˜¥â\•¾7íS‡õVš©UÔ®÷ˆÌ|²à³T**0\in´¬¨®KÙ£JÌRqžJsÃu¾ï”ªÍRW«³T,•÷ÒÏšYjë†TÔß̍ûûû“7Lyu;‘÷ÒOiØâô£õ¨Òé×ß)W "óžV;dá¿¡A-Ì ;¨cÞÍ H\㥟Ұ>•Š Œ£OEm½8ýÐ 6ÎRéQ± —~JTT óíQ%)Ë2û¥^w³´GŠY*P :KZQ™¥• ³Ô1zÔÆuMéS± ÁúÔ1‚Ú¸®)³Tœ¡+U-Ü?%}/飪 Hn¾iÌ>õE÷}<qRQÍ+g¨¨˜¡+U¿§›çço¬íVv»Þ½{wôZßYêAý,é°7öÿE¦\ ¨1J}\‹'UQMc¬i t%ˆu²,ÓÍ͍nnnNþž£¢æmþÌ1‚ê½÷Æjµ²¿‘uÄè`ò n6]^^:Ÿ›ô]P!xE•ªªêÝ 5fÄž^ɳìèAýÝÜx||<yCžçº½½5_ÚŠŠºdKâ‘ëëk;¹"Uªªêá_ðn·;ú¦O]œE±‡\žÂ5VPw2Žæ¶8òûVҏ#}6â#ˆl·[WEm4fE=°g©TÔÙ!ˆqy§+¨ÌRç… Nh»Ýê‡~0_Ê}?¬¢í5¶WªþãﯟŸ bšrßÆìQ˜¥WÄý#(‚8LŸYêXA-Í «Q®öät–Ê9¿õâò4ÎRÇ ª÷‘›ÍÆðFÒ¯#}þÜÄ…ë:K+¨RUUóýFQG%~È l34i¥êAúò5k»ÝÄ´åjhƒÕ6åz1$Dóië:K;¨-*jÊ=*ADl³Ô1ƒÚxÈÄ**AĤºÎRƒVT“£¢JÕ l'‹B€ "i]ýT—õz­»»;ó¥úÍR "f­ëEÁ‚ꚥvèS "Î^–eöe¡W².Ý3¨}f©ÿVUU "Ç‘‡Úª:fP¥î³Ô­ O‘ºš>ÕÙ êÉ^Œ8l'ˆ˜»Íf£_~ùÅ|)jE=°+j—«h"Î]—ÅéǪw–úñãG}øðáp… AÄRu9ò¼¢ÚÞ½{w²z8°D]f©£ÞÈXVP]×¥¨t©¨#öKIGƒ¡ê– \.//íYêZŽYêصÕ="TÚVÕ±ƒ*µ¸G$€JÛ>5DPJ(¨GEf í,5DPÿ27¨¨@=**0m§§G&Ôö´ÚàÕºP€eµZÙ/½±_Tf©@mªjˆ Jô©@kmúÔPA¥OZ¢¢3Ps£ï#¡‚Ê,h‰Š Ì@2=jY–>˜¿)+êÑJjÖ}QX|³ÔPA=AUêùªjÈ æAêùúT**€)+ê'sƒ õ|³T** GP®K¥Gà»Ñ7H@;%… *³T ƒõzm¿t¨ªÑ*ªDUš4Ýè;tPsƒ õšúT**GEýzÿ¡ƒÊ,h‰Š Ì =*0MuìÛ.Ú®$ÖͲŒÕ€'‘Ì$ýº¢ÝçѺ$ KÝ,5FzTBY–¨WקÆêQ2ùêÔ«ëS_Døì“ŠºÝn#|,®²,k–¯¥8Aý,éÝ~ƒŠŠ%h bÇóÞ§«¨À܍DïGIq‚JŠÙyxxÐn·s>G¼CáÏ’þ%QQ±P‰±x~þdmÿf¿1ô {OGOOuïF1· úĨ¨RUU¢Ýnç: ´vnAô‰ÔŒuJéSá“HwªŠÌNՍÏÌí“v‡³¢0KAì&VP™¥.PQ'ϱŸÉ**æÏDIº½½µgDŸ˜=êub:bg^I::]ƒÍôâ|Ä ªÄ,5º‚X?Œ¿&ˆÅúê+UÿòýFQù(á –’þŒµK0YPá·WDÄêUµsÄÝnkÙšRqbõˆŸ•‚ˆ±LZQçŽ "–É‚: q?ª(E-æx&¹YjBA|Puš¥¹ý{ÃÏaabUŠ<K%ˆ81¿úJ#ÏR#®[s‡ "ŠIƒê}3A$MÔƒ>T/D Qìõ{I?Dü<‚ˆ³0iEIñü|Ý`*sjñüL±X±¿úJÒ{I7ú²*añüL óõ“«wABÅ IEND®B`‚<br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><font face='Arial' size='1' color='#000000'><b>PHP Error Message</b></font></td></tr></table><br /> <b>Warning</b>: imagedestroy(): supplied argument is not a valid Image resource in <b>/home/a4566300/public_html/merge.php</b> on line <b>17</b><br /> <br><table border='1' cellpadding='2' bgcolor='#FFFFDF' bordercolor='#E8B900' align='center'><tr><td><div align='center'><a href='http://www.000webhost.com/'><font face='Arial' size='1' color='#000000'>Free Web Hosting</font></a></div></td></tr></table> <!-- Hosting24 Analytics Code --> <script type="text/javascript" src="http://stats.hosting24.com/count.php"></script> <!-- End Of Analytics Code --> Can't do that.
  18. What's wrong is you have 20 different columns for the same thing. Why is that?
  19. imagecopymerge() does not resize. Try imagecopyresampled instead.
  20. Are you absolutely sure you want to do this? Unless you can find something out there already this will take quite some time to get it right. More time if you want to be able to handle lots of different queries. I doubt this work is really necessary. Deconstruct the manual queries you have by yourself. It may sound like a lot of work but it'll be faster and easier than making this SQL parser thing.
  21. You're using single quotes, aren't you? '$var' If you just have the variable in there then you don't need quotes at all. $var As for why it doesn't work: variables aren't interpreted in singly-quoted strings. However they are in doubly-quoted strings. "There's other stuff in this string besides $var" So if you don't have just the variable in there then use double quotes instead.
  22. I'm betting that the .*? is too permissive. Try something that also restricts the input. But if I'm going to be rewriting the expression a little I might as well help with the sheer number of rules you have in there. function bb2html($string) { $match = array ( '#\[\/font\]#', '/\[font(?:c\=(#?\w+)|s\=(\d+)|f\=(\w+))+\]/e', ); $replace = array ( "</font>", "'<font' . ('\\1' ? ' color=\"\\1\"' : '') . ('\\2' ? ' size=\"\\2\"' : '') . ('\\3' ? ' face=\"\\3\"' : '') . '>'", ); return preg_replace($match, $replace, $string); } Oh, and moved to Regex.
  23. The $_GET and $_POST and such superglobals were introduced in 4.1. You are not running PHP 3. Thank God.
  24. Unless I'm forgetting something really important, those latitude and longitude numbers you're providing are way out of range.
  25. It'd be really nice if you could exec() things. If so then grab a copy of ffmpeg, which I'm sure can convert from .au files, and run that on the uploads. But then they're uploading large files. Is it a problem to have the user download the .au, run it through a converter (like yours?), and upload the result? Two of those three steps the user is doing anyways.
×
×
  • 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.