2,113 Posted Topics
Re: The md5sum is part of the **coreutils** which can be found & downloaded from this link: http://www.gnu.org/software/coreutils/ | |
Re: You can save the resized file into PNG format, this will help to preserve quality. The length of the file will be higher than a JPG equivalent, but you can use some tools as *optipng* to compress the file without loosing quality. Or use JPG format also for the resized … | |
Re: Most of the applications are installed under `/usr` directory, but you can also install software inside the `bin` directory of your profile and make the application available only to you, if you are searching for the config files, most of them can be found under `/etc` directory, anyway check these … | |
![]() | Re: > I used VLC version 1.0.6 for Ubuntu 10.04 You should update your VLC. From VideoLan website: http://www.videolan.org/vlc/download-ubuntu.html > VLC version 1.0.6 in Ubuntu 10.04 is severely out-of-date. We recommend you install VLC 1.1.x manually. bye. ![]() |
Re: It depends on the storage engine, field types, encoding. Check this link: http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html bye! | |
Re: I've already replied to this here: http://www.daniweb.com/web-development/php/threads/429083/searching-for-specific-text-on-a-page#post1837188 Please don't open more than one thread for the same question, if I cannot reply quickly someone else will do it.. | |
Re: If you use json_decode() you can treat the input as an array: $d = json_decode($linkcontents,true); print_r($d); that outputs: Array ( [count] => 5 [map] => (Server Map) [uptime] => 1436.2805321217 [cumulative_uptime] => 69137.853084564 [name] => (server name) [max] => 12 [country] => (contry) [identifier] => (server IP) [game_mode] => (game … | |
Re: I'm experiencing the same problem, I noticed that I cannot scroll over ~210 lines (sometimes 200, sometimes 220), the scrollbar stops but the cursor can go further. I can reproduce the issue just by pasting the result of this script: <?php $a = range(0,300); $n = count($a); $result = null; … | |
Re: You can also try this solution: <?php function badword($word,$blacklist) { if(in_array($word,$blacklist)) { $w = substr($word,0,1); $len = strlen($word)-1; for($i=0;$i<$len;$i++) { $w .= '*'; } } else { $w = $word; } return $w; } $blacklist = array('hello','world','bad','word'); $word = 'world'; echo badword($word,$blacklist); # output: w**** ?> **$blacklist** can be loaded … ![]() | |
Re: What kind of error you get? | |
Re: If you run `explain table_name` in your mysql client and paste the output together with an example of data maybe we can give you a hand. And also paste the query. ![]() | |
Re: This can happen also if you send an empty string twice. Post your code. | |
Re: You can do it like this: <?php function avg($limit = 9) { $array = array(); $result = array(); for($i = 0; $i <= $limit; $i++) { $r = rand(1,100); if(in_array($r,$array)) { #add another loop $i--; } else { $array[] = $r; } } $c = count($array); $s = array_sum($array); $avg … | |
Re: I'm afraid you cannot do that in the same script because the shebang needs to be in the first line, but you can separate them: #!/bin/bash a=$1 echo "hello $a from bash " ./script.php $a and inside script.php #!/usr/bin/php <?php $a = $argv; echo "and hello $a[1] from php\n"; ?> … | |
Re: Check this project: http://sourceforge.net/projects/opensourcepos/ And turn-off CAPS when you write in a forum, it's equal to yelling. Bye! | |
Re: Set an absolute path in the second argument of move_uploaded_files(), at the moment this is relative to the script. The same applies to file_exists(). You can use `$_SERVER['DOCUMENT_ROOT']`. Also use getimagesize() to ensure that uploaded file is really an image, at least do this check, the mime it self is … | |
Re: The execution is automatic, you need to write also the command path. for example: 30 * * * * /usr/bin/php /srv/cron/mail.php Otherwise add `#!/usr/bin/php` at the top of your script and make the file executable: #!/usr/bin/php <?php // . . . echo 'example'; ?> In command line use chmod: `chmod … | |
Re: From from the manual: > By default vsftpd is configured to authenticate system users and allow them to download files so if you log with **garrett** user the directory will be located in **/home/garrett/**, the configuration for the anonymous account is different, here the link to the manual with some … | |
Re: As workaround you can use an iframe to display the pdf and place the history.back link in the page, something like: <html> <head><title>go back</title></head> <body> <p><a href="javascript:history.go(-1)">prev</a></p> <iframe width="900px" height="600px" frameborder="0" src="view.html" /> </body> </html> and in the **view.html** you place an **object** tag or a plugin as suggested by … | |
Re: I think the problem is in the second query, since `zip` is in both tables you should get an error like `Column 'zip' in field list is ambiguous` so try to add `or die(mysql_error())` to check if this error happens, or just change the query to: $query = "SELECT name, … | |
Re: Check this: http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html bye! | |
Re: Basically run: sudo ufw default deny sudo ufw enable sudo ufw allow 443/tcp sudo ufw allow 4444/tcp and also udp if you need to enable that too. You can list all rules by using: sudo ufw status You can read more by using `man ufw` or reading this document: https://help.ubuntu.com/community/UFW | |
| |
Re: Remove the trailing slash: suPHP_ConfigPath /home/u471282391/public_html bye! | |
Re: Yes, by using **mkdir**, you can use **man** command to get more information: man mkdir or in general search for a list of basic commands, like this one: http://code.google.com/edu/tools101/linux/basics.html | |
Re: Change this: $query = mysql_query($sql); with: $query = mysql_query($sql) or die(mysql_error()); and check what you get. Also the session of the banned user should be destroyed. ![]() | |
Re: Can you paste the code are you using? Have you tried to run the gearman job server? You need to write something like: gearmand -j 5 -v -l usage.log you can also increase verbosity by adding up to five **v** `-vvvvv`. Besides, gearman suites better on linux, if you need … | |
Re: If I understood you can also replace previous `$random_id` **array_rand()** and **implode()** with: $random_id = shuffle($id); # or you can use array_rand($id,1); $sql1 = "SELECT * FROM table WHERE id = '$random_id[0]'"; and if you want one single result from the query then add `limit 1` at the end, bye. | |
Re: It's seems fine to me. In php.ini there is a directive that permits to disable GET, check for `variables_order` in: http://php.net/manual/en/ini.core.php if **G** is not present then you have to edit the configuration and reload the server. Bye. | |
![]() | Re: Yes, here you can find more information: http://php.net/manual/en/language.types.array.php ![]() |
Re: Here in Italy is high: 9.50$ (in euro 7.17€) per gallon.. ~1.895€ per liter but in some places we arrive to 2€ per liter... this happens because almost 60% of the final price is composed by government taxes and vat.. | |
Re: So, have you tried the link formed by `get_bloginfo('template_directory')` and `/banner/728x90.JPG`? Do you get relative or absolute path? | |
Re: Check for file_get_contents() to get the file from remote, file_put_contents() to save the file: $file = file_get_contents($url); file_put_contents('/path/new_name',$file); You can check links by using parse_url() and pathinfo(), for example to get the basename from a link use: pathinfo(parse_url($url,PHP_URL_PATH),PATHINFO_BASENAME); so, if the url is `http://www.website.tld/images/this_image.jpg` you get **this_image.jpg** you should also … | |
Re: Load data into a variable, like `$xml` and use SimpleXML: $data = new SimpleXMLElement($xml,LIBXML_NOCDATA); $array = json_decode(json_encode($data),true); print_r($array); json_encode/decode will remove the SimpleXML obj. | |
Re: This string is 65 characters long, if you use `var_dump(explode(':',$string));` you will see **two** strings of 32 characters each, so probably these are two md5 hashes, and you can't decrypt an hash, you can only try to find a collision, i.e. a string that creates the same hash. In order … | |
![]() | Re: If I understood the problem this should work: RewriteRule ^(includes|and|other|directories) - [L] place it right after `RewriteEngine On` the rules won't be applied in those directories. Bye! :D |
Re: Use strtoupper(): http://php.net/manual/en/function.strtoupper.php bye. | |
Re: Try with urlencode(): `redirect(urlencode('abc.php?satisfaction=5&surname=trfhtrd&given_name=tryhtr'));` a part from that: redirect() is the CI function or is custom? If custom then post the code, bye! | |
Re: Put also the host in the url, so this: /folder1/folder2/image.png becomes: http://mywebsite.tld/folder1/folder2/image.png and it should work. Othersiwe you could display the images inside Google/Yahoo/... servers. Bye! | |
Hi! *Minimize HTTP requests*. One of the suggestion I always read is to combine files, so I made a little Class that merges files on the fly, the supported formats are CSS and Javascript. With little efforts, I think, it can work fine also with JSON and CSV. Usage is … | |
Re: In addition, check for beanstalkd, you can delay jobs and let them run at specific time: https://github.com/kr/beanstalkd/blob/master/doc/protocol.txt Check for the **job lifecycle** which explains how to deal with delays. | |
Re: Can you explain better? The conditional statements are fine, I see just a difference in the last one where the first 3 variables are not grouped as the previous conditions, but that should not change the behaviour. Also, I tested the conditions with: $origin = 'NAIA 1'; $vehicle = 'Van'; … | |
Re: Check previous code that you don't posted. Maybe there is a conditional statement in the mail block code, which includes $variable. | |
Re: Not tested, but try: $words = explode(',', implode('.,', $string)); this gives you an array again, if you want just a string then use just `implode('.', $string)`. Edit___ Or: foreach($words as $value) { $doopnamen .= substr($value, 0, 1).'.'; } so, if $string: $string = 'alfa beta'; from the loop you get … | |
Re: Hi, I can't help you much on this, so while waiting for better assistance, check the source of that page, you will see that they use few javascript functions to do the converting process. Maybe from there you can find what is going wrong. | |
Re: PHP can run also in command line: http://php.net/manual/en/features.commandline.php But, if you install PHP 5.4.0 you get also a webserver, just run: php -S localhost:8000 from the directory with the files to test and you can browse them. Said this, with every programming language you can open a socket and serve … ![]() | |
Re: You can use: * Ajax to display results in your HTML page * an iframe * otherwise you need to make your page processable by PHP in this last option you can mantain the .html extension if you need it, but you have to change the configuration file of your … | |
Re: It could be the ID (fotop & fotog) in your tags: your javascript is searching for an ID, but each ID this must be unique, if your pages loops ten times, you will have 10 fotop and 10 fotog ID and this is wrong. Change your script to add numbers … | |
Re: This works for me: <?php $img = "img2.jpg"; $exif = exif_read_data($img,'IFD0'); echo $exif['Make']; ?> I think you don't need to do all this: $image = chunk_split(base64_encode(file_get_contents($_FILES['fileupload']['tmp_name']))); //store image in $image at least not for the exif_read_data() function, just provide the name and the correct path of the file. | |
Re: listrecord.php does not contain a form, so what you send to update.php is just the id through the link, so in update.php change [icode]$id=$_POST['id'];[/icode] to [icode]$id=$_GET['id'];[/icode] and remove the others $_POST, they are not defined. |
The End.