oni-kun
Members-
Posts
1,984 -
Joined
-
Last visited
-
Days Won
1
Everything posted by oni-kun
-
Quick Question: Using TTF font with GD not working
oni-kun replied to cs.punk's topic in PHP Coding Help
Thanks! Exactly what I needed! If the font is not within GD's predefined library path, it will attempt to search for that filename along a library-defined font path. Note the following example: // Set the enviroment variable for GD putenv('GDFONTPATH=' . realpath('.')); // Name the font to be used (note the lack of the .ttf extension) $font = 'SomeFont'; Otherwise you can do as intended and point the font to the relative path. -
2147483647 is the maximum allocatable signed integer, Why are you running into the problem of having the clan ID set as so? There seems to be deeper flaws in the root of your coding logic.
-
Single quotes can freely be used in double, And vice versa. You only need to escape them if they're going to be closing the opening quote.
-
I already knew it was deprecated. Everybody knows that. jeez I'm just asking if uploading an image using a form is secure in your opinion. I don't want it to upload if it isn't an image file. Stop asking the same question, You already have multiple valid answers.
-
Deprecation defines a succeeder. http://php.net/manual/en/ref.fileinfo.php
-
You should use mysql_fetch_assoc on the resource so you can call $row['gender'] if need be instead of by index. Your colours can be decided by a <span>/td tag handled obviously in each iteration of the loop. while ($row = mysql_fetch_assoc($sql)) { if($row['gender'] == 1) { $color="pink"; } else { $color="blue"; } echo "<tr><td style='background-color: $color;'>{$row['gender']}</td>..."; } Of course this is just a quick sample, How you implement it depends on what you simply wish.
-
mysql_real_esacpe_string/stripslashes & CKEditor
oni-kun replied to piedpiper's topic in PHP Coding Help
Again, Only if magic_quotes_gpc is enabled then stripslashes is needed on the output. In a perfect world it should look like this: if (get_magic_quotes_gpc() === 1) { $string = stripslashes($string); } $string = mysql_real_escape_string($string); $sql = .....; -
This should bring a few answers on your site's performance to light. Are you sure it's not your client?
-
Yes. It is redundant in security.
-
mysql_real_esacpe_string/stripslashes & CKEditor
oni-kun replied to piedpiper's topic in PHP Coding Help
You're stripping the escapes, which leaves your code unsanitized including newlines being broken (They are simply escaped sequences.) mysql_real_escape_string does not require stripslashes unless erroneous slashes are placed by magic quotes. Read up on the documentation to make sure you realize the functional structure of this function's use. -
The left div can float and the right be relative, it should not matter. Be sure IE has enough clear spacing to maintain the position or else it'll just break on you (as in your firefox vs IE example)
-
I'd recommend you get an extension such as Firebug to view the current styles over an element, It is a useful tool to debug problems with styles. You simply aren't applying the rules to them.
-
There is a class overview of the object here: http://dev.xoofoo.org/dev_xoops_2018/d5/de9/a00176.html
-
Free address lookup API based on postcode?
oni-kun replied to GetPutDelete's topic in Other Libraries
There are many free geolocation services out there, One notably maxmind's services, You can filter the database yourself or use said software to get the lookup. -
Of course once a user is authenticated they can be subscribed using the API, Have you read all of the documentation?
-
You may want to set the internal user agent using ini_set beforehand, as some servers may deny bot access. ini_set('user_agent', 'value');
-
You should read up on how to deal with the $_POST data you can retrieve from forms, what are you intending to do with the result, It must be stored before sent using a server side language.
-
Why not trim or remove newline entities from the text you don't wish to be converted to <BR>?
-
mysql_real_esacpe_string/stripslashes & CKEditor
oni-kun replied to piedpiper's topic in PHP Coding Help
It purely depends on whether the system has magic_quotes_gpc applied on the need to use stripslashes, You should strip slashes before but always run mysql_real_escape_string() if allowed on a query before running it. Slashes do not matter in the database, only SQL metacharacters need to be sanitized. -
You may want to look at the provided FULLTEXT fields MySQL provides: http://dev.mysql.com/doc/refman/5.1/en/fulltext-search.html It shouldn't be too hard to implement with when ALTERing the table: http://www.pui.ch/phred/archives/2005/05/tags-with-mysql-fulltext.html
-
Ext3/Reiser will not care hinder under a load of folders, but do not keep them in so many as you're wasting physical resources.
-
What progamming language do i need to run a .exe file?
oni-kun replied to DarrenReeder's topic in Application Design
It's simply a CGI gateway application, I'm sure Microsoft's KB would be using that. Dynamic link libraries and statically linked executables can be run with parameters. -
Excel cannot parse the date as it is in an incorrect format, most likely the encoding of the type is incorrect. Try to export in xls compatibility mode to preserve it.
-
That solution should work provided the torrent tracker accepts a non-chunk encoded handle to the peers, otherwise the tracker may drop the connection.
-
If you wish to amend it contact the author; As the file is most likely copywrited. There is no valid solution out of the box to unencode this type of file.