When I run cUrl for localhost: 8080 it can not communicate
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
cur...
When launching a script PHP I had a wonderful surprise:
Warning: file_get_contents (): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
Here is an excerpt from my PHP PHP :
<?php
$siteU...
Here is the code I'm using:
$arquivo = "destino.json";
$info = file_get_contents($arquivo);
$lendo = json_decode($info);
foreach($lendo->rotas as $campo){
echo "<b>Origem:</b>...
script by Daniel Omine modified by me. Original: link
$c = curl_init();
$cookie_file = __DIR__.DIRECTORY_SEPARATOR.'megasena.txt';
curl_setopt_array($c, array(
CURLOPT_URL => 'http://www.loterias.caixa.gov.br/wps/portal/loterias/land...
Good morning of stackoverflow.
I'm going through a problem that I can not see the light of solution.
I have the following situation:
I'm working on a portal, and this portal, I needed to send information to the site in our headquarters. So, it d...
I can not use the script because of the class HttpRequest I have already downloaded several classes and always the error:
( link )
$request = new HttpRequest();
$request->setUrl('https://api.infobip.com/sms/1/text/advanced');
$request-...
I'm learning php and was testing the curl, however it's crashing in curl_init ();
The code I am using to test is below, I put some print to test where the error was and what happens is that the output only exits zero.
<?php
// create a n...
I have the following query with api of Google Maps
http://maps.googleapis.com/maps/api/distancematrix/xml?origins=Muriae&destinations=Rio de Janeiro&mode=CAR&language=pt-br&sensor=false
That returns me the foll...
I'm using a function to return from google matrix api, the distance between two cities.
The problem is that when cities have names similar to those of North American cities, the distance calculation gives an error.
Is there a way to tell t...
Build a PHP code that requests a web page, checks the returned HTTP code, and allows you to fetch a string from the html source.
I used CURL for this. The code is basically this:
class HealthCheck
{
/**
* Apontamento para uma instâ...