-
Replied To a Post in cURL won't scrape this page. Why?
Sorry for my last post, I think it doesn't help much: I'm seeing some weird results from BlueHost DNS server, whatever you search through **dig** is redirected to the same … -
Replied To a Post in cURL won't scrape this page. Why?
__Forgot to add__ *klnpa.org* is reachable from BlueHost DNS, so it may be this the problem, here's the output: dig @ns1.bluehost.com klnpa.org ; <<>> DiG 9.9.5-3-Ubuntu <<>> @ns1.bluehost.com klnpa.org ; … -
Replied To a Post in cURL won't scrape this page. Why?
> Ah, so as diafol suspected, then, there's something that prevents my server from accessing the Pilot one. (Right?) Yes, the error of `get_headers()` helps a bit: **failed to open … -
Replied To a Post in cURL won't scrape this page. Why?
I think your setup should support this script. Check the PHP error log on Bluehost and, if this doesn't help, then check the access & error log of Apache (or … -
Replied To a Post in Multi Choice Quiz (20 Random Questions)
As I wrote: > the same applies to the **user**, the **password** and the **database name** it means that you have to change them, accordingly with your database setup. -
Replied To a Post in Multi Choice Quiz (20 Random Questions)
This error is generated by the database connection string: $db = new mysqli("host","user","pass","db"); Change the first parameter to the IP of your database for example `localhost` or `127.0.0.1`, the same … -
Replied To a Post in Multi Choice Quiz (20 Random Questions)
The problem is given by the closing bracket `}` of the very first `IF` statement: if(isset($_GET['question'])){ $question = preg_replace('/[^0-9]/', "", $_GET['question']); $next = $question + 1; $prev = $question - … -
Began Watching Storing all exceptions in an array
I have a custom error-handler class (actually it's an exception handler) So, when an exception is thrown, then it'll be caught and stored in the error-handler class.. After all the … -
Replied To a Post in fourm script needed
Have you tried open source solutions? Here's a list: * http://en.wikipedia.org/wiki/Comparison_of_Internet_forum_software -
Replied To a Post in Change timezone in godaddy mysql server
Follow these instructions: http://dev.mysql.com/doc/refman/5.6/en/time-zone-support.html But you should always save as UTC and then convert the _datetime_ to the client local timezone. -
Replied To a Post in cURL won't scrape this page. Why?
Ok, here you can see the code and play the example: * http://runnable.com/VG_QpOHSMpE82e3u/search-with-curl Just click on **run** and then submit the form. -
Replied To a Post in cURL won't scrape this page. Why?
> (Or are you guys saying that you were actually able to return something from http://pilot.passhe.edu:8042/ ?) (yes), it works fine for me, I'm attaching my full examples. If preferred … -
Replied To a Post in Switch On and Off status in laravell
On/off status for what? The website? Then you can use **artisan** from the command console: php artisan down The website will go in maintenance mode. With `up` it will go … -
Replied To a Post in PHP Contact Form Problematic
It happens because you are defining these variables only when a POST request is submitted to the script, while on GET request (i.e. when you open the page) these variables … -
Stopped Watching using windows for 5 years
hello people daniweb....just want to ask honest oppinions from you guys, because this has been bugging me for years. I've been a PHP developer for 5 year using windows. So … -
Began Watching using windows for 5 years
hello people daniweb....just want to ask honest oppinions from you guys, because this has been bugging me for years. I've been a PHP developer for 5 year using windows. So … -
Began Watching postgresql find the average time
i have a table tbltrans transno | agent name | date | --------+-----------+------- 1 01 | waw |2014-10-10| 1 02 | waw |2014-10-15| 1 03 | waw |2014-10-20| 1 04 … -
Replied To a Post in cURL won't scrape this page. Why?
**@Ryujin** In addition to diafol suggestion :) There is no specific rule, you have to try the forms to understand the functionality. In the *vufind* case the first problem is … -
Replied To a Post in Updating PHP in IIS
Follow this link http://windows.php.net/download/ You can choose the NTS (Non Thread Safe) version if IIS is serving PHP as fastcgi module, more information on http://php.iis.net/ -
Replied To a Post in index.php
This is defined by server configuration, if using Apache this can be declared also in the .htaccess context, for example: DirectoryIndex index.html index.php * http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex -
Replied To a Post in Queries exported to separate files file.
If you use prepared statements then it's not a problem, create the list of queries: <?php return array( "query_cities" => "SELECT * FROM cities WHERE name = ?", "query_address" => … -
Replied To a Post in mysql query runs very slow when run first time
Are you using indexes? You can enable the slow query log to see in which conditions this happens: * http://dev.mysql.com/doc/refman/5.6/en/slow-query-log.html -
Began Watching Fatal error: Uncaught exception 'Google_AuthException' with message 'Error
Fatal error: Uncaught exception 'Google_AuthException' with message 'Error fetching OAuth2 access token, message: 'invalid_grant'' in /var/www/html/edplace/dev2568/cron_files/google-api-php-client/src/auth/Google_OAuth2.php:115 Stack trace: #0 /var/www/html/edplace/dev2568/cron_files/google-api-php-client/src/Google_Client.php(131): Google_OAuth2->authenticate(Array, '4/He7CoB42K1zSX...') #1 /var/www/html/edplace/dev2568/cron_files/cron_job_for_export_and_sent_parent_list_to_google_drive.php(126): Google_Client->authenticate('4/He7CoB42K1zSX...') #2 /var/www/html/edplace/dev2568/cron_files/cron_job_for_export_and_sent_parent_list_to_google_drive.php(7): export_to_csv(Array) #3 {main} … -
Replied To a Post in Beginner HTML/CSS Question
There are few errors in the CSS, first at line `17` of the HTML page fix this: header h1 { font-size: 48px; } type="text/css"> By removing `type="text/css">`. Then inside the … -
Replied To a Post in cURL won't scrape this page. Why?
The problem here is that you are defining the array of options for curl without including the POST data: CURLOPT_POSTFIELDS => $curl_data, `$curl_data` is not defined anywhere, and you're including … -
Gave Reputation to rch1231 in Greek Characters
Hello, I ran into this before storing some math equation information. Here is the site that showed me how to resolve the problem. [http://kunststube.net/frontback/](http://kunststube.net/frontback/) -
Began Watching Spring MVC or Play
I am having trouble deciding on a web framework. So far I am stuck between Spring and Play. I am leaning towards Spring, but I want to know more. Spring … -
Stopped Watching Text Data Type or Separate Text File
Hey guys. I'm writing myself an online toolbox (for my code snippets). I have a "Snippets" table. My question is this. Would you save the snippet source in a Text … -
Began Watching Text Data Type or Separate Text File
Hey guys. I'm writing myself an online toolbox (for my code snippets). I have a "Snippets" table. My question is this. Would you save the snippet source in a Text … -
Replied To a Post in how to convert md5 password into binary and then calculate its exclusive OR
Check if in your system there is the **php_gmp.dll** file, then edit php.ini and append: extension=php_gmp.dll Restart Apache and it should work. Check the comments for more information: * http://php.net/manual/en/gmp.installation.php … -
Replied To a Post in i want to print the bill to printer from php mysql database?
**@Lokesh_4** open a new thread, explain the issue and show the code. -
Replied To a Post in placing textbox on top of image
Assign `height` and `width` to the **#banner-background**: #banner-background { width:100%; height:100px; background: url('/images/banner.jpg') no-repeat top left scroll; } Then, if you want, you can assign the background directly to the … -
Replied To a Post in how to convert md5 password into binary and then calculate its exclusive OR
Maybe: $xor1 = gmp_init(md5('test'), 16); $xor2 = gmp_init(decbin(rand(0, 100)), 2); $xor3 = gmp_xor($xor1, $xor2); echo gmp_strval($xor3); ? -
Began Watching how to convert md5 password into binary and then calculate its exclusive OR
hello everyone im working on my masters thesis project, i need a help on how to convert md5 password into binary andthen generate a randomly number, then calculate there exclusive … -
Gave Reputation to diafol in Ajaxed Linked Dropdowns (Select Fields) for Volatile Data
**// EDIT 2014-04-07 //** New version (1.0.3) posted at the [bottom](http://www.daniweb.com/web-development/php/code/476623/ajaxed-linked-dropdowns-select-fields-for-volatile-data#post2082327) Demo Page: http://demos.diafol.org/ajax-linked-dropdowns.php *********************************************** Hello All. Been playing around with more linked dropdowns (select form fields), following the code … -
Gave Reputation to pritaeas in How can i know in witch line of the select is the information that i need?
SELECT @line := @line + 1 AS line, persons.* FROM persons, (SELECT @line := 0) temp -
Replied To a Post in Google API, custom bar search
Yup, use the Geocoding API, you can use cURL or simply `file_get_contents()`, an example: <?php # geocoding $api = 'YOUR_SERVER_API_KEY'; $url = 'https://maps.googleapis.com/maps/api/geocode/'; $format = 'json'; $paramenters = array( 'address' … -
Began Watching Have I really Got This Right?
Hi guys, I'm currently on the pretty cool Database development path. I've quickly got to terms with basic SQL with individual tables, and various queries. Now things seen to be … -
Replied To a Post in PSR-4 and Autoloading
Hi! Define the namespace in **Spotify.php**: <?php namespace Foo\Bar\Baz; class Spotify { public function __construct() { echo "yes"; } } Then it should work fine. -
Replied To a Post in SQL injection
> Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables It happens because of: $sql->bind_param('ss', $uname); Since you're binding only one variable, which is … -
Replied To a Post in SQL injection
The `real_escape_string` method is part of mysqli, so to use it append it to the database object: `$conn->real_escape_string($uname)`. But don't rely on this for security you have to validate the … -
Replied To a Post in filter datagridview through combobox with values from database
> Cannot find column [year] Does the column `year` exists it the queried tables? Have you tried to perform the same queries directly in a MySQL client? -
Replied To a Post in combining sql statements
You can use a view, for example: CREATE VIEW test_view AS SELECT fruit FROM t1 WHERE id IN(1,2) UNION SELECT fruit FROM t1 WHERE fruit = 'cherries'; Or you can … -
Replied To a Post in PHP database connection file including?
Mysqli `num_rows` returns integers not booleans (`true|false`) so if you want to check how many rows you're returning change the if statement to: if($result->num_rows > 0){ But, if the query … -
Replied To a Post in writing to a file
Applying this code at each page load is not really efficient, it can be useful to create static html files to use as cache but not for live content. -
Replied To a Post in writing to a file
It depends on what you want to do, you could remove the container and add it again, just place another node to define in which area of the page you … -
Replied To a Post in PHP database connection file including?
It seems fine, the only problem I can see is related to the space between the include and the string: include"conn.php"; It should be: include "conn.php"; But at query level … -
Replied To a Post in PHP database connection file including?
`login1` is the **database** name or the **table** name, or both? Instead of: if(!$conn){ echo "Connection not established"; } Do: if ($conn->connect_errno) { printf("Connect failed: %s\n", $conn->connect_error); exit(); } As … -
Replied To a Post in writing to a file
The meta tag is added automatically, just specify your own flavour to avoid a change of charset, for example: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Test</title> </head> <body> … -
Replied To a Post in writing to a file
You could use the **DOMDocument** class: * http://php.net/manual/en/class.domdocument.php An example: <?php $file = "./test.html"; $imgs = glob('../images/*.jpg'); $dom = new DOMDocument(); $dom->loadHTMLFile($file); $container = $dom->getElementByID("container"); foreach($imgs as $img) { $basename …
The End.