-
Posts
3,584 -
Joined
-
Last visited
-
Days Won
3
Everything posted by JonnoTheDev
-
[SOLVED] Dynamic Form posting values for processing
JonnoTheDev replied to nostrodamned's topic in PHP Coding Help
use an array as the checkbox name i.e. <input name="items[]" type="checkbox" Then in your processing you can loop through the array and process the values. -
Print elements of an array and concatenate them in a string
JonnoTheDev replied to g_p_java's topic in PHP Coding Help
That is what implode() does. I'm not sure what it is your after. You may need to explain a bit better. -
Print elements of an array and concatenate them in a string
JonnoTheDev replied to g_p_java's topic in PHP Coding Help
Take a look at the implode() function. e.g. $items = array('a','b','c'); // will produce the string a_b_c print implode("_",$items); -
[SOLVED] converting mp3 to flv or swf on the server
JonnoTheDev replied to thewooleymammoth's topic in Other
Yes Look at FFMPEG, LAME, Mencoder, Mplayer, etc Google these. You will need to install the required apps on your server and learn to use them via command line. Conversion after upload will require the use of the exec() function to set off background processes so make sure your host allows this. There are shared hosting packages available designed for media streaming with all the tools pre-installed if you have difficulty. Here are some http://phpmotion.com/content/view/43/189/ -
Yes with CURL. http://uk2.php.net/curl Do some Googling for examples
-
[SOLVED] mysql current timestampt to php
JonnoTheDev replied to dennismonsewicz's topic in PHP Coding Help
Yeah but its hardly gonna bring a server crashing down. Take your pick on which method you use. -
Read up on normalisation before creating/modifying you tables if you are unsure.
-
How do I build this custom idea in PHP?
JonnoTheDev replied to geektasic's topic in Application Design
There is no technique. You have a set of requirements. If you cannot build this yourself by breaking you project down into smaller components and then tackling each one I suggest searching http://www.hotscripts.com -
[SOLVED] mysql current timestampt to php
JonnoTheDev replied to dennismonsewicz's topic in PHP Coding Help
Or use php's date function: $stamp = "2009-02-02 21:03:52"; print date("d/m/Y", strtotime($stamp)); -
Parsing RSS in real time to be displayed on another site isnt always the best method because if the remote server is slow it slows your site down, also if the remote server is dead you end up with errors on your end. If possible use a cron to grab the RSS data and store it in a db table. Then select rows from the table. Use something like http://www.phpclasses.org/browse/package/3598.html to convert the XML into an array making it easier to search and sort the results.
-
I agree with Mikedean. That POST URL I have never seen. Why not call PayPal tech support?
-
Fatal error: Allowed memory size...exhausted??
JonnoTheDev replied to olimits7's topic in PHP Coding Help
Cant really tell without looking at the whole program. You are going to have to go through line by line and test. Is this osCommerce? - The functions look familiar. -
Fatal error: Allowed memory size...exhausted??
JonnoTheDev replied to olimits7's topic in PHP Coding Help
Its telling you 1. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in ../database.php on line 349 2. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 103 bytes) in ../vendors.php on line 196 -
Fatal error: Allowed memory size...exhausted??
JonnoTheDev replied to olimits7's topic in PHP Coding Help
Your script is exhausted at 128mb. Should not need to use this much memory. I would suggest looking at your code. Comment certain parts out of the procedure to ascertain where the memory leak is occuring. -
PHP Form info send to yahoo email address
JonnoTheDev replied to spainsoccerfreak's topic in PHP Coding Help
Because yahoo's mail server requires SMTP authentication. You cannot add this within the php.ini You will have to use PEAR::Mail http://pear.php.net/package/Mail -
Because it is an html entity and will be converted
-
Get rid of them $li .="<li ><a onclick=\"document.getElementById('venue').value = '".str_replace("'","",$venue)."';currentQuery= '".str_replace("'","",$venue)."';hideDrop();\" href=\"#\">$venue</a></li>";
-
Connect the other site to the database on server A. You can then use a key to lookup the user and validate them.
-
Ah, you are using strtotime for no reason use: $query = "SELECT * FROM charts WHERE username = 'admin' AND MONTH(posted) = '".date("m", time())."'";
-
mysql_real_escape_string() escapes all special characters but will not leave the slashes on the string after it has been stored as addslashes() does. mysql_real_escape_string() should always be used on user inputted data for security. addslashes() can be a pain as you may get into a situation where slashes are added to existing slashes and you end up having to use string replace functions to clean them out as stripslashes() only removes the first instance.
-
Should be $query = "SELECT * FROM charts WHERE username = 'admin' AND MONTH(posted) = '".date("m", strtotime($month))."'";
-
I would suggest Lucene http://framework.zend.com/manual/en/zend.search.lucene.html or Sphinx http://sphinxsearch.com/docs/manual-0.9.9.html
-
Also I wouldn't use addslashes in the first place. Escape data before insertion using mysql_real_escape_string(). Then you dont need stripslashes()
-
each variable
-
Would it be possible to post the urls to the resources you used for integrating php and sphinx. Wouldn't mind having a look at it.