-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
[SOLVED] Upgraded to php5 and now mail() not working
Adam replied to nutt318's topic in PHP Coding Help
There have been no changes to the mail function, if there had been they would be listed on the manual. I assume this must be some kind of configuration error... -
You can use file_get_contents() to get the source code, then use preg_match() to locate the first image. The pattern would be something like: <img[^\bsrc\b]+src="(.+?)"[^>]+>
-
You'd just use http://localhost/path/to/files
-
http://www.google.co.uk/search?q=rtf+to+html+conversion+using+php Would seem TinyMCE has built-in function for conversion. Edit: This may not be true actually, I just saw it briefly mentioned on one of the links.
-
From what I can see, you're not actually calling the start() function at any point... Either in the <body> 'onload' attribute, or using 'window.onload' you need to call the start() function.
-
[SOLVED] Smarty - can we write a php code in a .tpl file ?...
Adam replied to jaikar's topic in PHP Coding Help
What exactly do you plan to put in the {php} tags though? Take a look here. -
[SOLVED] Eregi function, how do I make it search 'word' at END of a string?
Adam replied to cs.punk's topic in Regex Help
By the way I'd always use the preg functions from now on, instead of ereg. In the latest release of PHP (5.3.0) it's deprecated, most likely to be removed in PHP 6. -
You wouldn't use JS for this, you'd just validate with PHP. If you really, really wanted to, I guess you could use AJAX.
-
[SOLVED] Smarty - can we write a php code in a .tpl file ?...
Adam replied to jaikar's topic in PHP Coding Help
If you're using Smarty, why would you need to put PHP in a template file? Smarty has a lot of built-in functions, plus the ability to easily create your own. -
Well technically you should never consider using JS to prevent anyone from doing anything, JS can be switched off and so is useless for security. What exactly do you mean by a value that isn't in a database? Do you have any examples?
-
http://www.google.co.uk/search?q=css+anchors
-
Maybe since they weren't allowed to ship IE8 with it, they decided to look for any new instance of firefox.exe and add sleep(60000);
-
Oh no, wait, the styles are all wrong... .linky { color: #FFA200; color: #878787; letter-spacing: 5px; text-decoration:none; color:#FFFFFF; } --edit-- Learn CSS... http://www.w3schools.com/css/
-
Try this.. echo '<li><a href="game.php?id=' . $row[1] . '"><span class="linky">' . $row[1] . '</span></a><br></li>';
-
If you supply "orderbyASC" it will order the results in ascending order, if you don't, descending.
-
Put this just before your query call: $asc = (isset($_GET['orderbyASC'])) ? 'ASC' : 'DESC'; Edit: Whoops, corrected a mistake!
-
There's a few methods of doing this (search the forums for past topics for more information on them). With your setup what I'd do personally rather than having separate HTML files for each language, which obviously means editing 2 files whenever you change the structure of the page, I'd implement a SMARTY style tag that you can encase around any text to be translated. So you'd have a kind of master file in English, then depending upon a param passed in the URL (e.g. "lang=nl" you can look up the translation in the specified language. So say {t}hello{/t} would translate into "Hallo" (I think, I don't know Dutch).
-
print date("Y-m-d G:i:s", strtotime($row['date_expires'] . "+2 minutes"));
-
[SOLVED] stop a user typing in a direct path to download a file
Adam replied to jesushax's topic in PHP Coding Help
Your web host should allow you to stores files outside of the web root. When you login through an FTP client, do you have to drill through to "htdocs" or "public_html" (or something similar)? -
[SOLVED] stop a user typing in a direct path to download a file
Adam replied to jesushax's topic in PHP Coding Help
Use a script to retrieve the file, but store the original in a directory not accessible from a browser (i.e. outside of the public_html / htdocs dir). -
I have to agree - use a different skin, improve the quality of the logo.
-
If you decide to still go ahead with original idea, there is a way you can do it by generating a new key. Found this: https://lists.ubuntu.com/archives/ubuntu-users/2006-June/082869.html
-
How about system() or exec()?
-
spell check implementation in textarea and html area
Adam replied to zohab's topic in PHP Coding Help
You could also look into Aspell. As patrickmvi said though they take some configuration, which isn't always possible with some shared hosting plans.