2,113 Posted Topics

Member Avatar for suncica2222

Try this: <?php $url = 'https://twitter.com/darknille/status/355651101657280512'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_VERBOSE, FALSE); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_NOBODY, true); curl_exec($ch); if(!curl_errno($ch)) { $info = curl_getinfo($ch); echo $intReturnCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); switch($intReturnCode) { case 200: case 302: case 304: echo "true"; break; default: echo "false"; …

Member Avatar for suncica2222
0
592
Member Avatar for ehpratah

If you add an equal sign it will work, but at 18.06 will change to default again. Is this the expected behaviour? else if (strtotime($current_time) >= (strtotime($serving_time) - 3900 ))

Member Avatar for ehpratah
0
192
Member Avatar for Dani
Member Avatar for Fiorentino01^

Replace `<?` with `<?php` from line 44 to 47. Note also that short tags are enabled by your **php.ini** config - http://php.net/manual/en/language.basic-syntax.phptags.php

Member Avatar for Fiorentino01^
0
354
Member Avatar for eburlea

Change last line to: echo ${$mystring}[0]; And it will work, otherwise it will refer to the name of the string `myarray`.

Member Avatar for eburlea
0
117
Member Avatar for sharma.chiragfaith

You should disable `system()` and similar functions. At the moment I can list root of the server. Also consider to run this into a [jail root](https://help.ubuntu.com/community/DebootstrapChroot).

Member Avatar for cereal
0
218
Member Avatar for kantigniter

Hello, please provide the queries you're trying to perform, table structures and an example of data, at the moment (at least for me) it's difficult to understand the issue.

Member Avatar for kantigniter
0
506
Member Avatar for lakmal411
Member Avatar for Rizi004
0
296
Member Avatar for diafol

It's a nice restyle, but I would really like a bit more contrast on text.

Member Avatar for diafol
0
230
Member Avatar for CharlieJoe

Check the Debian documentation: http://www.debian.org/doc/ It's quite good.

Member Avatar for mc.sQr
0
193
Member Avatar for McLaren

When you write `"path": "/D/projektai/glab"` the segment `/D/` stands for `D:\`? I see also a call to `/tmp/` but this is a *nix path, not windows; if you have a tmp folder, for example in `C:`, you will have to set: `C:/tmp/xdebug.log` but check with documentation, in Windows I'm not …

Member Avatar for McLaren
0
329
Member Avatar for cgull

Set an absolute path, absolute to the system not to the web root, so change this: $pdfFilePath = "../uploads/$filename"; to: $pdfFilePath = "c:/mysite/uploads/$filename";

Member Avatar for cereal
0
3K
Member Avatar for kevinyu

Inside `$data2` change: 'name' >= 'pw', to: 'name' => 'pw', The same goes for `value` in the same array and `type` in `$data3`. By the way, this is Daniweb not SO.

Member Avatar for cereal
0
207
Member Avatar for aVar++

I think he is referring to an in-site notification system, as google-plus or fb: when a watched article is updated the subscribed users get an event notification, so they can click on the icon, select the thread and jump to the discussion.

Member Avatar for Dani
0
252
Member Avatar for Dani

I think Common.php cannot be extended as the other core files because it is statically loaded by `/system/core/CodeIgniter.php`: /* * ------------------------------------------------------ * Load the global functions * ------------------------------------------------------ */ require(BASEPATH.'core/Common.php'); Before checking `system/core/CodeIgniter.php`, I've also tried to overwrite that function through hooks, but obviously it doesn't work, even setting `pre_system` …

Member Avatar for diafol
0
1K
Member Avatar for ing

Can you show the .htaccess code? Apache offers three different modules: * mod_auth * mod_auth_digest * mod_aut_dbm are these enabled? Have you used **htpasswd** or **htdigest** to generate the password file? You wrote about **htaccess** command but this does not exists. For more information check this: http://httpd.apache.org/docs/2.0/howto/auth.html To "move" the …

Member Avatar for cereal
0
424
Member Avatar for kantigniter

First argument of `where()` method is a string, at the moment it seems to be a constant, so change them to: $this->db->where('Interior_house_id', $Interior_house_id); $this->db->where('Interior_room_id', $Interior_room_id);

Member Avatar for kantigniter
0
999
Member Avatar for sash_kp

If you have a static IP you can add it as `allow` rule: <Limit GET POST PUT> Options -Indexes Order allow,deny Deny from all Allow from xxx.xxx.xxx.xxx </Limit> Otherwise you can use the Authenticantion modules: http://httpd.apache.org/docs/2.0/howto/auth.html

Member Avatar for cereal
0
276
Member Avatar for mpc123

`$txt2` is considered a string, so you have to use quotes: "SELECT * FROM table FIND_IN_SET('$txt2', field)" And it should work.

Member Avatar for mpc123
0
106
Member Avatar for Nathaniel10

To me it seems to work fine: $v0 = 3; $v1 = 5; $v2 = 7; echo min( max(($v0 - $v1), 0), $v2); `$v0 - $v1 = -2` so max() between `-2` and `0` is `0`, min() result will be `0`, inverting **$v0** and **$v1** will output `2` as expected. …

Member Avatar for Nathaniel10
0
370
Member Avatar for wolfgangcs

Try: $this->db->where('active',1)->order_by('date_added','desc')->limit($num, $start)->get('posts'); When selecting all the fields, the `select()` method is not needed.

Member Avatar for cereal
0
91
Member Avatar for joseph.lyons.754

Replace the quotes that surrounds the field name `'town'` with back ticks, so this: $rs=mysql_query("select CommercialEnterprise_Email from commercialenterprise WHERE 'town' = 'Killkee'"); Becomes: $rs=mysql_query("select CommercialEnterprise_Email from commercialenterprise WHERE `town` = 'Killkee'"); If you still get errors add `mysql_error()`: http://php.net/manual/en/function.mysql-error.php

Member Avatar for Webville312
0
208
Member Avatar for mpc123

Change the wrapping quotes to double quotes: $old = array(' ', '/', 'amp;', "'"); Or escape the quote: $old = array(' ', '/', 'amp;', '''); and it should work.

Member Avatar for cereal
0
121
Member Avatar for Dani

The format for PWS files is one word per line, as you done. In Ubuntu the dictionaries used by **pspell** are in `/usr/lib/aspell/`, but you can use this command from a terminal to read the configuration and retrieve the correct path: aspell config |grep -i data-dir Regarding the replacement files: …

Member Avatar for Dani
0
316
Member Avatar for ZER09

Unfortunately this is a [restriction:](http://dev.mysql.com/doc/refman/5.0/en/view-restrictions.html) > Subqueries cannot be used in the FROM clause of a view. But you could try with procedures, first you install the tables `range_numbers` and `range_dates`: delimiter // drop procedure if exists range_tables// create procedure `range_tables`() language sql deterministic sql security definer BEGIN DROP TABLE …

Member Avatar for ZER09
0
333
Member Avatar for Dani

As side note: Tor changes the IP every 10 minutes or so by default. But the users can force the change at each request. In this particular case there could be a problem with the matching IPs.

Member Avatar for LastMitch
0
105
Member Avatar for ditty

Provide the code, or at least an example of what is not working for you, it could be a problem of headers. Also have you checked sendmail error log? Does the sender email exists? Do you receive any responses from mail daemons?

Member Avatar for Webville312
0
242
Member Avatar for engr_pir

In addition to previous notes, the direction of the text depends on the HTML [`dir` attribute](http://www.w3.org/TR/html401/struct/dirlang.html#h-8.2), an example of multilanguage page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>sample arabic language</title> </head> <body> <p lang="ar" dir="rtl">مرحبا</p> <p>hello</p> </body> </html> If your page is not mixed and you have only Arabic, …

Member Avatar for engr_pir
0
335
Member Avatar for ca_linddha

Keep in mind that **$_POST** works as an array, so if you want to use one of the keys, you have to write: $_POST['password'] not `$_POST[password]` which lacks of quotes. The same applies to `$_POST[sbg]`. For this reason you are probably getting `d41d8cd98f00b204e9800998ecf8427e` from: $pass=md5($_POST[password]); Because it appears as a …

Member Avatar for cereal
0
187
Member Avatar for joshl_1995

If you have access to the mail directory you can use Plancake library: https://github.com/plancake/official-library-php-email-parser It will parse the files into an object, from there you can store it into the database. If you don't have direct access, you may want to add IMAP library to get the messages: http://www.php.net/manual/en/ref.imap.php

Member Avatar for joshl_1995
0
551
Member Avatar for winbala5

Check the API of tumblr: http://www.tumblr.com/docs/en/api/v2#blog-info In the section Blog Info there are many methods to retrieve the information you're looking for.

Member Avatar for cereal
0
145
Member Avatar for SQLpower

Regarding the date try: date('d-m-Y', mktime(0, 0, 0, date("m"), date("d") + $_POST['exdays'], date("Y"))); Concerning the second question, you can use [`json_encode()`](http://php.net/manual/en/function.json-encode.php) to convert the array to a string and so, you can save it as `varchar` or `text` type, otherwise you need a `blob` type. __Edit__ Sorry Webville, I just …

Member Avatar for SQLpower
0
256
Member Avatar for davidjennings

Move these: $image_value = array(); $description_value = array(); outside the while statement, otherwise the array resets after each loop. Also you can avoid the use of `array_push()` by writing: while($row = mysql_fetch_array($result)) { $image_value[] = $row['image_id']; $description_value[] = $row['description']; }

Member Avatar for davidjennings
0
3K
Member Avatar for ska_defender

If you can execute a shell, search the library: find / -name *pdo*so 2>/dev/null the `2>/dev/null` segment will suppress the errors (usually due to permessions), you can remove it if you want to get all the output. After you save the config file remember to reload the server.

Member Avatar for cereal
0
257
Member Avatar for asharsit

Check this thread: http://www.daniweb.com/web-development/php/threads/455388/display-ip-address-of-the-systems-on-a-lan-using-php

Member Avatar for cereal
0
215
Member Avatar for Fiorentino01^

Basically: mysql_query('INSERT QUERY HERE'); $codCliente = mysql_insert_id(); Here's the link to the manual: http://php.net/manual/en/function.mysql-insert-id.php

Member Avatar for cereal
0
188
Member Avatar for geneh23

If you're trying to insert data then change the above query to: "INSERT INTO `tablename` (`image_name`) values('$img_file')" This will create a new entry in the table. While if you want to update an existing row, for example the row with id 1, use an update statement: "UPDATE `tablename` SET `image_name` …

Member Avatar for cereal
0
720
Member Avatar for lewashby

If you still have Ubuntu try to follow this method: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu Otherwise try the suggested method on BackTrack website: * http://www.backtrack-linux.org/tutorials/usb-live-install/ * http://www.backtrack-linux.org/wiki/index.php/UNetbootin_USB_Installer

Member Avatar for lewashby
0
376
Member Avatar for McLaren

Use reload: sudo service apache reload in practice Apache will perform a graceful restart, it is the same of running: apachectl -k graceful it means that will finish to serve the current requests before restarting. For more information and options check: http://httpd.apache.org/docs/2.2/en/stopping.html

Member Avatar for McLaren
0
154
Member Avatar for ceeandcee

Check also `parse_url()` it will return an array of the url components, included the hashmark `#` fragment: * http://php.net/manual/en/function.parse-url.php Bye.

Member Avatar for cereal
0
220
Member Avatar for joseph.lyons.754

Consider **SwiftMailer** library, it works fine and [once installed](http://swiftmailer.org/docs/installing.html) it's easy to use: * http://swiftmailer.org/docs/sending.html In particular check the send method and the batch mode at the end of the page. The **[mail()](http://php.net/manual/en/function.mail.php)** function is not the best choice for large sets because it is resource expensive and it doesn't …

Member Avatar for cereal
0
227
Member Avatar for ferdinandmucos

You could use `file_put_contents()` to save the array to the text files: file_put_contents('questions.txt', json_encode($questions)); Then use `file_get_contents()` to get the arrays from the files and use `array_combine()` to match them. As suggestion use `json_encode()` to save data to txt files, and then just run this to retrieve: $questions = json_decode(file_get_contents('questions.txt'),TRUE); …

Member Avatar for arunmagar
0
268
Member Avatar for Dani

The difference is that if **bar** is null `isset()` will return FALSE, while `array_key_exists()` will still return TRUE: $foo['bar'] = NULL; echo isset($foo['bar']) ? 'true':'false'; echo array_key_exists('bar',$foo) ? 'true':'false'; So it depends on your intentions.

Member Avatar for cereal
0
395
Member Avatar for kantigniter

Line 32: <option value="<?php echo $ho('interior_house_id');?>"><?php echo $ho['interior_house_desc'];?></option> Change `$ho('interior_house_id')` to `$ho['interior_house_id']` and it should work. Also I suggest you to use $this->input->post() instead of $_POST since it sanitized by the framework (if `$config['global_xss_filtering'] = TRUE;`). Bye!

Member Avatar for cereal
0
5K
Member Avatar for gilgil2

Hi, take a look at Google Custom Search API: https://developers.google.com/custom-search/v1/overview Once you get results you can scan the links in search of [microformats](http://microformats.org/wiki/hcard) or metadata. To do that you will need a **microformat parser** or something like [`get_meta_tags()`](http://php.net/manual/en/function.get-meta-tags.php) for metadata. Then, if you want more results or compare data, you …

Member Avatar for gilgil2
0
154
Member Avatar for weeraa

Hi, in order to help we need details. Post some error codes or at least the code block which seems to create the problem. Also check server, database and PHP errors logs.

Member Avatar for arunmagar
0
279
Member Avatar for cereal

#This is for Laravel 3.*# ## Hello, ## With this snippet I'm providing a simple way to automatically filter `Input::get()` and `Input::old()`. To achieve this result we need to make few changes: * extend Input and Redirect classes by creating new files in `application/libraries/`, the files are: **input.php** and **redirect.php**; …

1
378
Member Avatar for tahakirmani88

You can use a recursive function which checks if the value of the pair `$key => $value` is an array, in this case it loops again, an example: <?php $food = array( 'Healthy' => array('Salad','Rice','Vegtables' => array('Tomatto','Onion')), 'UnHealthy' => array('pasta', 'Vegetables' =>array('potatto', 'Corn'))); function recursive_loop($array) { foreach($array as $key => …

Member Avatar for diafol
0
6K
Member Avatar for imti321

It seems `send_mail()` function is receiving a malformed email address, check the submitted array **$info** to see what is wrong. By the way, Swiftmailer requires at least four parameters in order to work: setTo(), setFrom(), setSubject() and setBody(). Check documentation for more information: http://swiftmailer.org/docs/sending.html

Member Avatar for imti321
0
677
Member Avatar for geewebid

Hi, If the directory `down/` is not directly accessible by web use `$this->input->server('DOCUMENT_ROOT')` instead of `base_url()`. Also, use `file_exists()` to be sure about the requested file and `pathinfo()` to grab the filename from `$this->input->post('filedown')`, otherwise a user can execute `../../../random_file`: $filedown = pathinfo($this->input->post('filedown'),PATHINFO_BASENAME); $datas = $this->input->server('DOCUMENT_ROOT').'/down/'.$filedown; if(file_exists($datas)) { force_download($filedown, $datas); …

Member Avatar for Dani
0
2K

The End.