2,113 Posted Topics
Re: In FB you can upload images up to 2048 pixel per side, those will be resized to 960x720, which is the max size in the lightbox. But everything depends on your target and in the usage of these images inside your application. If your app, for example, needs to handle … | |
Re: This is a good start: http://www.debian.org/doc/manuals/debian-reference/ch05.en.html Bye! | |
Re: At the moment **unityshell-rotated** is not supported for 12.04, check these links for more information: * http://ubuntuforums.org/showthread.php?t=1974833 * https://launchpad.net/~paullo612/+archive/unityshell-rotated regarding libnux, the latest and available version is 2.0: **libnux-2.0-0** | |
Re: Try this: <?php $ok = '<a href="msg_update.php" input type="submit" class="button" value="protected page">Update Home Page Message</a>'; # this is mix of input and a tags, it's not correct $error = '<p>This is not the page you were looking for.</p>'; $con = @mysql_connect(my login stuff); $connection_err = false; mysql_select_db(more stuff); if(!$con) { … | |
Re: @Garret85 to check if PHP is installed type `php -v` in the terminal, you will get the version. Bye! | |
Re: Maybe is the **$md5Key**, in your code: $md5Key="44q9dn7WCUrLHgi8bPsdiBIlLi6WaHI0"; //MD5 key but this doesn't seem a valid hash, for two reasons: * it's not lower case * there are invalid characters, an md5 hash is composed by hexadecimal numbers only, so: 0-9 a-f. Now I'm wondering if this key is saved … | |
Re: Explain better please, you have to create a tool? Are you going to use GD, Imagick or something else? | |
Re: Hi, you have to use a WHERE condition in your query to select only the data related to the logged user. For example: select * from user_details where user_id = 12; If you paste: * the query used to select the data to display * the tables structures (just run … | |
Re: Let's start from line 20: if ($fld=='news_added') { $check = " where `inserted_date` = '$date' AND `news_added` = '$value' ";} the problem here is that if this condition is false and the other two conditions (line 21 and 22) are true, **$check** variable will print only: AND `code` = '$value' … | |
Re: Try: name.strip().isalpha(); `.strip()` will remove spaces above and at the end of the string, `.isalpha()` will return **true/false**, you will get **false** if there is a space in the middle, to avoid that you can add `.replace`: name.strip().replace(' ','',1).isalpha(); bye! | |
Re: This means that your script is using more memory than the allowed. If you post the script maybe somebody will be able to help you. | |
Re: It [seems there is no driver](https://bugs.launchpad.net/baltix/+bug/959043) but at the end it is suggested a PPA to install the drivers: https://launchpad.net/~michael-gruz/+archive/canon-trunk as alternative there is also a thread that explains how to use the drivers for the ip 2200 and make them work with the 1300, this is old but you … | |
Re: Go to *Settings » Accounts and Imports* and click on **Import mail and contacts**. For more information you can follow this article: http://support.google.com/mail/bin/answer.py?hl=en&answer=117173 | |
Re: Check for any log available, if you are using Apache server check for acces.log and error.log, then search and check for any uploaded file/image. In order to limit defacements you have to sanitize data, any POST, GET, COOKIE, PUT request: you have to check if you are receving the expected … ![]() | |
Re: In addition to deceptikon. Supposing you have a form field named **gender** which sends the data with POST method: <input type="text" name="gender" /> This can work: if(!in_array(strtolower(trim($_POST['gender'])),array('m','male','f','female')) { $errors[] = ''; # message } if nothing is matching the array values then it sends an error. This can work also … ![]() | |
Re: Line 52 you forgot `;` at the end of the value: `$ans = "Real Glo"; // Answer to image.` | |
Re: You can use **get_browser()** function or **$_SERVER['HTTP_USER_AGENT']** to read the user agent of the clients and if there is a match with Google bots you will not run the query, something like: <?php $browser = $_SERVER['HTTP_USER_AGENT']; if(!preg_match('/Google[bot]/i',$browser)) { # insert query here } else { echo 'bot'; } ?> the … | |
Re: If your computer is enough performant you can install Windows inside VMware: http://www.howtogeek.com/howto/18768/run-windows-in-ubuntu-with-vmware-player/ | |
Re: Change `$array[1] = Hello World;` to `$array[1] = 'Hello World';` and then it will work, bye :) | |
![]() | Re: Remove the () from the regex, seems to work for me: <?php function translate($content,$lang){ $l = $lang; $pattern = array('en'=>'/\{\{.[^\}\}]*\|\|/','cy'=>'/\|\|.[^\{\{]*\}\}/'); # change this $brackets = array('en'=>'}}','cy'=>'{{'); $content = preg_replace($pattern[$l],'',$content); $content = str_replace($brackets[$l],'',$content); return $content; } $content=<<<CONTENT <p>{{Dyma destun (cy example) rand ||Here's some text en (example) rand}}</p> CONTENT; echo translate($content,'en'); … ![]() |
![]() | Re: **@LastMitch** if you install an extension like **stylish** in your browser you can add a simple rule to hide that bar: #toolbar { display:none; } besides I like that bar and I use it! bye! :D ![]() |
Re: For a live cd check this link: http://cdimage.debian.org/debian-cd/current-live/i386/iso-hybrid/ more info: http://www.debian.org/CD/live/ | |
Re: This happens also in javascript, I found this problem while working on a cart application. Check also these: http://stackoverflow.com/questions/3726721/php-math-precision & http://stackoverflow.com/questions/1458633/elegant-workaround-for-javascript-floating-point-number-problem | |
Re: Change your code from line 9 to 26 with this: <?php $file = file('file.txt'); # read file into array $count = count($file); if($count > 0) # file is not empty { $milestone_query = "INSERT into milestones(ID, NAME, URL, EMAIL, LOGO, ADTEXT, CATEGORY, PUBDATE) values"; $i = 1; foreach($file as $row) … | |
Re: In your restricted page enable a $_SESSION to record the `$_SERVER['REQUEST_URI']`, for example: <?php if(!isset($_SESSION['logged'])) # this is where you check if access is allowed { $_SESSION['destination'] = $_SERVER['REQUEST_URI']; header('Location: login.php'); } else { if(isset($_SESSION['destination'])) { unset($_SESSION['destination']); } } ?> And in you login script, after you validate the credentials … | |
Re: Check this project: http://code.google.com/p/red5-flex-streamer/ it's done with java, flash and php. | |
Re: In your code you have `$q` declared in line 19 and 22, the first query statement will be overwrited by the second and only this last will be performed by mysql_query. At line 23 add `or die(mysql_error());` to see if there is an error. Also change `$r.mysql_close();` with `mysql_close();` or … ![]() | |
Re: You can use **highlight_string()**: http://www.php.net/manual/en/function.highlight-string.php <?php $string = ' <?php if($c==1) { echo $c; } ?> '; echo highlight_string($string,true); ?> ![]() | |
Re: Usually you ca use `$_SERVER['HTTP_REFERER'];` but it seems that Gmail doesn't send the referer header: https://mail.google.com/mail/help/intl/en_GB/more.html#protecting | |
Re: Try this: <?php namespace Dbase; class Dbconn { public function conn() { return new \PDO("mysql:host=localhost;dbname=roundth4_rtb2", 'root', ''); } } ?> then inside the class you can include the connection class: <?php require 'dbconn.class.php'; class headScript { private $db; public function __construct() { $this->db = new Dbase\Dbconn(); } public function headLoad() … | |
Re: Line 69: $image_random_name= random_name(15).".".$extension ; try this: $image_random_name = $_FILES['image']['name'][$i]; or you can use **$filename** which is declared in line 58 and change line 70 to: $copy = @move_uploaded_file($_FILES['image']['tmp_name'][$i], $images_location.$filename); Bye! | |
Re: Check the length of the password field in the database, you wrote: > my password is = "y" > the one that i log in =d41d8cd98f00b204e9800998ecf8427e > the one in db = 415290769594460e2e48 now: echo md5('y'); #outputs 415290769594460e2e485922904f345d which is the same of the db version, but it seems that … | |
Re: In addition, an injection it's a string which can change the behaviour of the query, it's not related directly with XSS: https://www.owasp.org/index.php/SQL_Injection [https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)](https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)) | |
Re: This depends on IIS7 which caches each processed file, it is done to increase speed.. to disable caching use these instructions: [http://technet.microsoft.com/en-us/library/cc754957(v=ws.10).aspx](http://technet.microsoft.com/en-us/library/cc754957(v=ws.10).aspx) http://www.ehow.com/how_8532771_turn-off-iis7-caching-php.html bye! | |
Re: If the server is under linux you can use **dmidecode** for the motherboard serial: sudo dmidecode --type 2 |grep -i serial For the harddisk use **hdparm**: sudo hdparm -I /dev/sda | grep -i serial this will check for the serial of the master hd, for slaves you have to check … | |
Re: Change it like this: <?php class myClass { public $myVar="this is demo"; public function myTextdemo() { return $this->myVar; # the problem was here } } $obj = new myClass(); echo $obj->myVar; # and here you wrote $obj->$myVar with an extra $ ?> use **return** to output data from a function … | |
Re: From this [example](http://www.flabell.com/files/29_e0507_801783b7bc58aae348c1f53fc8f14f05/deploy/mp3gallery/xml/mp3gallery.xml) file I see there is a **tracks** block in which you have to insert each mp3 data: <tracks> <item id="11"> <title> <![CDATA[ Mix Track 2 ]]> </title> <artist> <![CDATA[ feat. Eo ]]> </artist> <!-- if you want this item to have a different artist(for example featuring artist … | |
Re: Hi, inside the controller create a function to retrieve the sub-category, and then point your javascript to that link, I'm supposing you will use ajax for this. So inside the controller you write a simple function: public function get_subcat() { $cat = $this->uri->segment(3); $this->db->where('category',$cat); $d['query'] = $this->db->get('table_to_query'); $this->load->view('subcat',$d); } inside … | |
Re: I'm not sure this will help but here is missing the ending single quote: $stmt=OCIParse($conn,'SELECT * FROM USERS where USER_NAME = "USER_1"'); | |
Re: Change this part: $imgdata[0] = $width; $imgdata[1] = $height; with this: $width = $imgdata[0]; $height = $imgdata[1]; bye! | |
Re: The problem is that **$results** is not an array. With **ocifetch()** you get *the next row from a query into internal buffers* so, you get a single part of the *result set*, try **ocifetchinto()**, you can read an example here: * http://www.php.net/manual/en/function.ocifetchinto.php#58115 Or try to use **ocifetchstatement()** which is the … | |
Re: Change that *echo* with: while($row = mysql_fetch_object($data)) { echo $row->Column1; } bye! | |
![]() | Re: Post the code and the full error, bye. |
Re: You can build a restful api: http://en.wikipedia.org/wiki/Representational_state_transfer this will allow you to connect to your database. Bye! | |
Re: The first argument of `fnmatch()` is the pattern to match, but this variable is not defined inside the function, so this can be a problem, the same seems to happen with `$parameters` at line 7. But a part that, what kind of error do you get? Try to place some … | |
Re: Use strtotime(), you can do it like this: $date = date('Y-m-d', strtotime($_POST['date'])) . ' 00:00:00'; And use a datetime field, since the timestamp: >The TIMESTAMP data type is used for values that contain both date and time parts. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC. … | |
Re: I suggest you to create a simple file and try the connection and a query to your database, something like this: <?php # config parameters $host = ''; $user = ''; $pass = ''; $db = ''; $table = ''; $conn = mysql_connect($host,$user,$pass); if (!$conn) { die('connection error: ' . … ![]() | |
Re: Besides sysctl.conf you have to edit `/proc/sys/vm/swappiness`, just replace with 90. Then you can use `sudo swapoff -a` and `sudo swapon -a` to load the new value without rebooting. | |
Re: Maybe `--mat-time` flag can be helpful for you: http://curl.haxx.se/docs/manpage.html#-m |
The End.