1,003 Posted Topics
Re: hi, Try reading [One](http://www.smipple.net/snippet/Alex/List%20images%20from%20folder%20via%20PHP%20%28revised%29) and[ two](http://stackoverflow.com/questions/18809992/how-to-get-the-image-with-largest-size-among-all-the-images-on-the-page). Modify codes presented on two echo 'wide image<br/>'; $k = 0; //$area = 0; $x = 0; $y = 0; $largest_image; for ($i = 0; $i <= sizeof ($a_img); $i++) { if(@$a_img[$i]) { if(@getimagesize (@$imgdir.$a_img[$i])) { list($width, $height, $type, $attr) = getimagesize(@$imgdir.$a_img[$i]); // calculate … | |
Re: it says, video file is corrupt. For now, stay away from those html5 player and use jwplayer or flow player. These are the standard player of the web. Both players are capable of flash fallback. To be able to convert video files to ogg, webm, flash, h264, and others, you … | |
Re: Hi, Can you at least give us few lines of the CSV file. It is okay to change the data to something else as long as the structure is the same as the original. I can't promise you with anything, but I need to see at least few entries on … | |
Re: how about [this](http://coursesweb.net/php-mysql/rating-stars-script-ajax-php_s2)? | |
![]() | Re: In my humble opinion, I think you are pretty normal, unless you are having dreams about these stuffs like I always have :)(: . |
Re: Cool :). Wow! this thread was posted 6 years ago. This is way older than lastMitch could dig. You are the Man.. | |
Re: you need to rewrite your array to something like below to associate every fruit to each color. <?php echo '<b> Fruits </b> <br/>'; $fruits = array('lemon'=>'#FFFF00','orange'=>'#FFA500', 'apple'=>'#FF0000'); ksort($fruits); foreach($fruits as $k => $v){ echo '<p style="color:'. $v .';">'. $k .'</p>'; } | |
Re: Why write too many identical upload processors for the slide group, if simple functions can be written to handle all three? | |
Re: There are many ways of doing this, and one of the most effective is the double loop (while(inside the class) and foreach(outside)). Return the array from the while loop and iterate them outside, when the class is instantiated.. example public function gallery_loader(){ $image_array = array(); while(..........){ $item['src'] = $row['src']; $item['desc'] … | |
| |
Re: @gianluzzz, can you please let the forum members, which MVC framework you are currently using? | |
Re: I think matlab can interface with C and JAVA languages, but I am not sure. If so, then you can write your PLC in C or JAVA and post your question in [C forum](http://www.daniweb.com/software-development/c/118) or [JAVA forum](http://www.daniweb.com/software-development/java/9). | |
Re: Good question. Some of the codes I posted here on Daniweb made it to Github and github members were very kind in asking my permission. | |
![]() | Re: GET [here](http://www.php.net//manual/en/reserved.variables.get.php) POST [here](http://www.php.net//manual/en/reserved.variables.post.php) |
Re: I guess it would be something like this base64_decode($pics) yes? | |
Re: Hi, you can generate coupon code by implementing [str_shuffle](http://www.php.net//manual/en/function.str-shuffle.php) PHP function. example codes function get_coupon_code($string_length = 5){ $coupon_code = substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz), 0, $string_length); } echo get_coupon_code(5); If you want the coupon to be an image, you can use [imagestring](http://www.php.net//manual/en/function.imagestring.php) function. | |
Re: From what script is this? Is it from PHP using a PHP/Java bridge, or simply a regular PHP script? If it is from regular PHP application script, then the IO is the class or object and intValue is the static method of that object. for example, we can have a … | |
Re: Magento is pretty much follows the same MVC pattern as Zend framework. You will need to have some really good understanding on how MVC pattern works. ![]() | |
![]() | Re: Your helper looks good. Just always remember that $CI =& get_instance(); will call the CI's main controller class by reference. So, all of the native helpers and libraries are available and usable by the function if it is in helper and by the object and methods if it is in … ![]() |
![]() | Re: it is similar to the template engine cache function. The only difference is that in template engine such as smarty, we can define which block of contents should be ignore by the cacheing mechanism. In codeigniter, it will keep the cached the contents based on the definition of $x as … |
Re: Grand Canyon South Rim. Look for the smartest squirrel begging for food in exchange of pretty cool tail swag :).  Zion National Park in Utah.  | |
Re: good catched AndrisP. Spaces indeed. | |
Re: try testing it on[ MySQL workbench](http://www.mysql.com/products/workbench/). From there, you can optimize your query. | |
Re: pretty much there are few things you can do with .htaccess file. Please read #9 on this [article](http://www.zen-cart.com/wiki/index.php/Important_Site_Security_Recommendations#9._Use_.htaccess_files_to_protect_against_unwanted_snooping). While you are at it, try reading some topics that are related to your situation. ![]() | |
Re: try $sql = "CREATE TABLE $uID(". "Col0 int(10) NOT NULL auto_increment,". "Col1 varchar(255) NOT NULL,". "Col2 varchar(255) NOT NULL,". "Col3 varchar(255) NOT NULL,". "PRIMARY KEY(Col0)". ")"; | |
Re: webthumbnail.org is pretty easy to use. <?php ## define constraints $height = 300; $width = 400; $screen = 1280; $format = 'png'; $alt = 'this is alt'; $url = 'http://daniweb.com'; echo '<img src="http://api.webthumbnail.org?width='.$width.'&height='.$height.'&screen='.$screen.'&format='.$format.'&url='.$url.'" alt="'.$alt.'" />'; | |
Re: if the photos name and file name are stored in the database, you need pagination. We have plenty of pagination scripts and threads here in [Daniweb](http://www.daniweb.com/search/query/pagination/0?q=site%3A*%2F+pagination#gsc.tab=0&gsc.q=site%3A*%2F%20pagination&gsc.page=1). if the photos are in the directory and you are reading the contents by way of PHP, then you want the pagination using javascript … | |
Re: just another maybe :). I am borrowing Diafol's last line of code. $followers = json_decode($ids, true); foreach($followers as $follower){ echo $follower .'<br/>'; } ![]() | |
| |
Re: in addition to Mr. Pritaeas's response, this $regex = '/TITLE>(.+?)TITLE/'; gives us the expected result. Blank website. Blank site. Nothing to see here.</ Yes, this </ is included. So, it isn't really the same result as $regex = '/<TITLE>(.+?)\<\/TITLE\>/'; which will give us Blank website. Blank site. Nothing to see … | |
Re: Hi, If you are running PHP version 5.3.6 or higher, this should work <?php function get_file_ext($filename){ $info = new SplFileInfo($filename); return($info->getExtension()); } to test the function above try.. echo get_file_ext('05.Judaiyaan [MusikMaza.Com].mp3'); that should output mp3 **side notes:** If you will be renaming the uploaded file, you need to get the … ![]() | |
Re: @lefteris.gkinis, > Please whatch on my web site and see how the code it looks like... > http://www.panos-oliveoil.gr It appears to me that you have about 3 <head></head> html tags on your source code? | |
Re: catalinetu is correct, just add second and third parameter to the get method. Derived from this public function get($table = '', $limit = null, $offset = null) { } | |
Re: Hi, You can create a PHP script that will connect to your database to check the clients with payments due. The script should be able to process the payment and update the payment status as needed. Lastly, create a daily cron job for the script above. This can be done … | |
Re: hi, here is a similar question about [mssql](http://stackoverflow.com/questions/14299813/pdo-to-connect-to-mssql-over-mssql-functions). I did not evaluate any of the claims, but it appears to be promising. | |
Re: you can use explode if you want. $this_category = explode(',' , $row['category_id']); foreach($this_category as $cat){ echo $cat.'<br/>'; } or if you want to become creative , you can do it like this foreach((explode(',',$row['category_id'])) as $cat){ echo $cat.'<br/>'; } | |
Hello Everyone, I wrote this script way back in 2008 as Version1. However, I was forced to forget about this, because it was criticized by many developers with BS, MS, and "Seasoned PHP Developer" under their names. During those days, I couldn't stand up for my own reasons, because I … | |
Re: hi, there are many ways of achieving this. The most simple is to create a session on index.php and then check if the session exists on home.php. If the session does not exist, the user is redirected to the index.php sample codes filename: index.php <?php session_start(); $_SESSION['been_here'] = true; header("Location: … |
The End.