Questions tagged as 'curl'

1
answer

When I run cUrl for localhost: 8080 it can not communicate

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...
asked by 08.02.2017 / 17:59
1
answer

Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

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...
asked by 28.01.2017 / 08:10
1
answer

cURL with Google Maps Directions API returning null

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>...
asked by 19.12.2016 / 14:30
0
answers

Curl - Mega Sena result by contest number

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...
asked by 23.11.2016 / 15:58
0
answers

Get content from a captcha or fill out an external site form

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...
asked by 16.12.2016 / 13:18
1
answer

HttpRequest php error

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-...
asked by 17.11.2016 / 11:56
1
answer

curl does not start in php

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...
asked by 16.10.2016 / 21:39
2
answers

url with parameters returns wrong value

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...
asked by 03.11.2016 / 23:43
1
answer

Adding country to Distance Matrix API

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...
asked by 04.11.2016 / 16:22
0
answers

HealthCheck in PHP

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â...
asked by 26.09.2016 / 06:20