Jump to content

requinix

Administrators
  • Posts

    15,289
  • Joined

  • Last visited

  • Days Won

    436

Everything posted by requinix

  1. And what line is 141? Is it the one where you try to echo $response? You can't just output objects like that. Try print_r. But you've got a pretty big bug here: when you create $operationsObject, $operations is an empty array. You add to $operations later but that's too late because $operationsObject has already been created. Move that line until after the array is ready to be used.
  2. Yes, you mentioned that already. What do you mean that porn sites are "indexing on your PHP script"?
  3. FYI it doesn't have to be a PHP object: PHP's arrays will serialize into a JSON object when they are associative (have keys). So you can remove the (object) typecast. Having that array looks right to me. You're definitely passing $operationsObject to the API, right, and not $operations? What's your full code look like now?
  4. Why are porn sites "indexing" your site? That doesn't make sense.
  5. ...Why are you adding a json_decode? Read the docs: the request body is an object containing an "operations" key whose value is an array of the operations to perform. You have the array of operations to perform already. What you don't have is them inside an object.
  6. The Mailchimp SDK isn't the smartest thing around. When you give it requests to execute, you have to match exactly what the API says you're supposed to use. Here, the API wants the request body to be an object with an "operations" key that is the array of operations. You almost but not quite have that.
  7. All you'll be able to find on Google is people saying that it's as simple as looking at the hierarchy your var_dump() output is showing you: array(16) { <--- this is $cert ... ["extensions"]=> <--- this is $cert["extensions"] array(9) { ... ["subjectAltName"]=> <--- this is $cert["extensions"]["subjectAltName"] string(32) "email:[email protected]"
  8. SSL_CLIENT_CERT is a string value containing the certificate data. It is not a file.
  9. I'm not sure you understand how users work. Or at least what "users" it is that you need. If you don't want the "competition" to see things then there are a few options, but none of them involve creating users on the server or changing file ownerships or permissions. For instance, if you want something really easy to set up and that it's not something you'll need to change often, then htpasswd-style authentication is quick. Example
  10. Which file was not found? What are you doing to get that error? Is it coming from the webserver or from PHP? Why do you have all those users and why are they owning these files? What are the file permissions?
  11. I believe the SSL_CLIENT_CERT value is the cert as a string, so try plugging that into what gizmola showed. Beyond that, if you have problems getting code to work, then posting that code would make it a lot easier for us to help fix it.
  12. openssl_x509_parse looks relevant. What have you tried with that?
  13. I don't know much about them, but Queues could potentially be useful for this. The standard solution is to have something running in the background, as in via a cronjob, that periodically looks for tasks and executes them until it runs out. The API server responds to a request with some sort of task identifier that can be polled later, and only queues up the job to be run. When the background process runs it eventually gets around to that job, it updates the status (which could be returned by a poll) and then does whatever it needs to do.
  14. No offense but this is a very basic math question. https://www.google.com/search?q=how+to+convert+numbers+between+different+units
  15. And what, may I ask, do you think "complete cyber security mitigation" is? If you are good with Python and Java then use Python and Java. Why PHP?
  16. Read the documentation for get_current_user() and tell me what it says.
  17. $_SERVER["DOCUMENT_ROOT"] will be the path to your public_html.
  18. Just make sure not to put ginerjm's code onto a real server running on the internet.
  19. Looks like your problem is that you're using regular expressions for parsing HTML instead of PHP's other features. https://3v4l.org/6mIfq
  20. What's outdated is not the include() function itself but how you use files and write the code inside them. But first things first: see if you can track down the conflicting $serial variable and change it to be something else.
  21. You're probably using the $serial variable for something in another file. If you use this outdated pattern of including files then you have to make sure you don't accidentally reuse variables.
  22. Separately, XHTML has been dead for years. Longer than it was alive, I think. Learn and use HTML 5 instead.
  23. No clue.
  24. Have you investigated whether those services provide push messages or notifications? So that you don't have to poll them yourself. Because if you have to poll them yourself then your data will always be potentially out of date.
  25. If you think my explanation was detailed then you should check gizmola's 😁
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.