1,003 Posted Topics

Member Avatar for bobgodwin

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 …

Member Avatar for veedeoo
0
387
Member Avatar for anitg

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 …

Member Avatar for veedeoo
0
985
Member Avatar for ashalatha

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 …

Member Avatar for ashalatha
0
412
Member Avatar for SimonIoa

how about [this](http://coursesweb.net/php-mysql/rating-stars-script-ajax-php_s2)?

Member Avatar for veedeoo
0
185
Member Avatar for napninjanx

In my humble opinion, I think you are pretty normal, unless you are having dreams about these stuffs like I always have :)(: .

Member Avatar for jwenting
0
270
Member Avatar for rahul10721

Cool :). Wow! this thread was posted 6 years ago. This is way older than lastMitch could dig. You are the Man..

Member Avatar for veedeoo
0
1K
Member Avatar for calinaguiluz20
Member Avatar for filipgothic

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>'; }

Member Avatar for filipgothic
0
270
Member Avatar for davy_yg

Why write too many identical upload processors for the slide group, if simple functions can be written to handle all three?

Member Avatar for veedeoo
0
483
Member Avatar for Bile

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'] …

Member Avatar for Bile
0
881
Member Avatar for s_shakib
Member Avatar for gianluzzz

@gianluzzz, can you please let the forum members, which MVC framework you are currently using?

Member Avatar for veedeoo
0
262
Member Avatar for bayosyntax

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).

Member Avatar for mike_2000_17
0
231
Member Avatar for ddanbe

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.

Member Avatar for Dani
0
202
Member Avatar for meryl_1
Member Avatar for [NOPE]FOREVER

GET [here](http://www.php.net//manual/en/reserved.variables.get.php) POST [here](http://www.php.net//manual/en/reserved.variables.post.php)

Member Avatar for DJBirdi
4
160
Member Avatar for samirareddys12
Member Avatar for My question
Member Avatar for Sikander Nasar

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.

Member Avatar for Sikander Nasar
0
241
Member Avatar for widygui
Member Avatar for Sikander Nasar

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 …

Member Avatar for Sikander Nasar
0
186
Member Avatar for hericles

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.

Member Avatar for iamthwee
0
320
Member Avatar for iamthwee

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 …

Member Avatar for iamthwee
0
4K
Member Avatar for Venkatesh_6
Member Avatar for shophiarajan47
Member Avatar for Sandy Douglas
Member Avatar for iamthwee

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 …

Member Avatar for Dani
0
395
Member Avatar for omnik123

Grand Canyon South Rim. Look for the smartest squirrel begging for food in exchange of pretty cool tail swag :). ![016c78b730fb005569e5a47b01c7a65b](/attachments/small/3/016c78b730fb005569e5a47b01c7a65b.jpeg "align-left") Zion National Park in Utah. ![4146333be8aa6d67d9a8965d513f15ef](/attachments/small/3/4146333be8aa6d67d9a8965d513f15ef.jpeg "align-left")

Member Avatar for Agilemind
0
752
Member Avatar for ravi142
Member Avatar for saadi06

try testing it on[ MySQL workbench](http://www.mysql.com/products/workbench/). From there, you can optimize your query.

Member Avatar for veedeoo
0
109
Member Avatar for jKidz
Member Avatar for 68thorby68

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.

Member Avatar for iamthwee
0
328
Member Avatar for EJL242000

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)". ")";

Member Avatar for cwarn23
0
446
Member Avatar for biant92
Member Avatar for nagarajfloret

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.'" />';

Member Avatar for veedeoo
0
219
Member Avatar for centenond

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 …

Member Avatar for Bachu
0
204
Member Avatar for everton.retweets

just another maybe :). I am borrowing Diafol's last line of code. $followers = json_decode($ids, true); foreach($followers as $follower){ echo $follower .'<br/>'; }

Member Avatar for diafol
0
221
Member Avatar for catalinetu
Member Avatar for gdp
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
178
Member Avatar for hriti

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 …

Member Avatar for diafol
0
162
Member Avatar for lefteris.gkinis

@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?

Member Avatar for lefteris.gkinis_1
0
341
Member Avatar for ABDELMOUNIM
Member Avatar for ravi142

catalinetu is correct, just add second and third parameter to the get method. Derived from this public function get($table = '', $limit = null, $offset = null) { }

Member Avatar for veedeoo
0
592
Member Avatar for saravananosiz

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 …

Member Avatar for saravananosiz
0
458
Member Avatar for Jay_7

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.

Member Avatar for veedeoo
0
431
Member Avatar for malatamil

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/>'; }

Member Avatar for malatamil
0
263
Member Avatar for hanamitchi
Member Avatar for veedeoo

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 …

Member Avatar for veedeoo
2
2K
Member Avatar for nadiam

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: …

Member Avatar for nadiam
0
502

The End.