Questions tagged as 'php'

2
answers

How to read a file with a mailing list?

I have a text file with many emails and I want to save everything in a database, how do I get each email from the file in PHP? Emails are comma-separated.     
asked by 07.05.2014 / 01:04
3
answers

Calculate distances between two coordinates

I am using this function below to calculate the difference between two coordinates. Through google maps is informed a difference of about 2 to 3km. But the function is returning me the result 56.480188542761 Km. I would like to know if there is...
asked by 04.07.2014 / 16:31
3
answers

What is the difference between DirectoryIterator and FileSystemIterator?

In PHP, there is the class DirectoryIterator .   The DirectoryIterator class provides a simple interface for viewing the contents of filesystem directories. There is also FileSystemIterator , which documentation only gives this descript...
asked by 30.09.2016 / 16:44
1
answer

Automatically post to Twitter from the PHP site

I'm developing a backoffice in PHP. And every time the administrator adds a product, that product will automatically be published to Twitter. On Twitter it will appear: the product name your image and the link to the site I had t...
asked by 14.05.2014 / 12:20
1
answer

What is a wrapper class?

What is a wrapper class? How can they be useful? Cite examples of usage at php or
asked by 03.02.2014 / 16:58
1
answer

SQL using an Array of words

This is the following I have a search field on a form where the user types for example a color or product and is returned to it a list of products with the characteristics typed in the form, the problem and the following, when I pass the array i...
asked by 23.12.2014 / 14:51
2
answers

How to use Packages in Laravel 4?

I am new to the Laravel 4 framework. In Laravel 3 it was simple to use Bundles. In version 4 it was removed the use of the Bundles and started to use Packages, but I did not understand how it is used, even seeing in the documentation. For exampl...
asked by 13.12.2013 / 17:38
2
answers

What is the difference between define () and const?

What is the difference between declaring constants with define() or with const . Would it be the same or are there any details that I should know about? define('TESTE', 'constante 1'); const TESTE2 = 'constante 2'; echo TEST...
asked by 04.01.2015 / 19:17
2
answers

What is the difference between "/ *" and "/ **" comments in PHP?

I've always been curious about this, but since I've never changed my life into anything, I've never tried to find out. If there is a difference, what would be between these types of comments in PHP? /* Comentário 1 */ /** Comentário 2 */...
asked by 24.10.2015 / 20:11
1
answer

What is curl / curl_setopt

I'm doing an integration with MailChimp, and I came across this code: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $submit_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT...
asked by 16.04.2015 / 15:06