Skip to content
Advertisement

cURL issue with Google consent redirect

I’m running into an issue with cURL while getting customer review data from Google (without API). Before my cURL request was working just fine, but it seems Google now redirects all requests to a cookie consent page. Below you’ll find my current code: $result now just prints “302 Moved. The document had moved here.” I also tried setting curl_setopt($ch, CURLOPT_FOLLOWLOCATION,

php json parse access child values

I’m trying to filter and later access to the child data of a nested json file using PHP but for now i’m unable to do it. Json example: I’ve tried with this code: So $domain_id is an external value that I passed through the function. The idea is that if it matches one of the child’s values, then I can

Decode string with x in PHP that has char encoded over 255

My problem is about string decoding. Let’s assume a string like: I want to decode it and to look like that: λƛ¬∧⟑∨⟇÷ €½∆ø↔¢⌐æ I tried to use But it’s not what was expected. In python something like that works: Answer You don’t need to decode that. This is legal notation for strings in PHP. https://3v4l.org/0e0Po

php DOMDocument preg_replace fail detect

Basically, I want to replace content with hyperlink when detected matching keyword tag. the replace need to be outside of caption/image/figure/figcaption/iframe/a of existing content, because putting hyperlink inside these will causing format breaking. my php Now I facing 2 issue want to exclude replace hyperlink tag into but it fail on regex.. currently it display like this… this DOMDocument loadHTML

PHP Compare 2 Timestamps Logic

I’m working with an API that generates a token that I use for subsequent requests that is valid for 15 minutes. I’m storing a timestamp when the token is first generated and adding 15 minutes to this and storing that as a session variable like this: When I make a subsequent call to the API I’m checking to see if

Form doesn’t take me to action url when submitting

When I submit my form it doesn’t take me to the right url, it instead just stays on the same url and adds the params to it. Like this: /todo?message=themessage rather than what it should be as /todo/add In my /todo/add url, I have a php script that is assigned to that route, which just echos a string and nothing

Advertisement