PHP cURL: could not resolve host (over VPN)

I work remotely and can access internal servers via VPN. When my VPN connection is established, I can reach my webserver via curl: curl http://sub.mydomain.com I can also reach the webserver in a …

How to get 3 latest videos from youtube channel?

I know there are too many similar question like in my title, but I have problem that prevents me to make it works. I tested with three accounts and all of them in one day exceeded “request quota”. I …

Bit.ly API call hitting original URL before/after creating short url

I’m generating Bit.ly short url with v3 api. In original URL I have some DB action after hitting it. But when I generates the bit.ly url, it automatically hit the original URL. Check my below code …

How to read data from a webpage in two instances (objects)?

I’m working on this project:

Corrupted image on auto download using url with curl in php

I want to download images from my server without clicking anything – when my php file executes it will download automatically, but the problem is the file is corrupt. However, when I paste the url …

Converting PHP Curl queries to Python requests

I’ve been facing a few problems trying to convert the following PHP curl queries to Python requests. Given PHP Code $cfile = new CURLFile($filePath,$fileType,$filename); $request='{“signers”:[“abc@…

Why do I keep getting unsupported_grant_type when using oAuth2 and curl?

I am trying to authenticate my self with uber rush api, and I keep getting an unsupported_grant_type error message. I am not sure what am I doing wrong here. Any help would be really appreciated. …

Aws PHP Sdk 3: S3::putObject(): AWS HTTP error: cURL error 6: Couldn’t resolve host ‘s3.Ireland.amazonaws.com’

I’m trying to upload an image to an S3 bucket using the version 3 of the SDK, but I receive the following error: Error executing “PutObject” on “https://s3.Ireland.amazonaws.com/my-bucket-name/…

Can you include raw JSON in Guzzle POST Body?

This should be soo simple but I have spent hours searching for the answer and am truly stuck. I am building a basic Laravel application and am using Guzzle to replace the CURL request I am making at …

PHP [function.file-get-contents]: Failed to open stream

This is really annoying me, the php script was working and returning the weather from open weather map but literally all of a sudden the php script takes forever to execute and the following error is …