Calling an API to do authentication / user login

It’s better not to do so. And I’m completely against overriding the default authentication mechanism simply because of WordPress and it’s plugins usually are depended on the website’s database. But if you’re really into this situation WordPress provides a filter called authenticate: add_filter( ‘authenticate’, ‘wpse75679_auth’, 30, 3 ); function wpse75679_auth( $user, $username, $password ) { … Read more

wp_remote_get() returns 403 while file_get_contents() does not

Why do you have curly brackets in there? Maybe sanitize/process the query string with htmlspecialchars() first. The error is complaining about non-standard characters…which is what your curly brackets are doing. Build the query string with the $ip value, convert with htmlspecialchars(), then add the URL to the query string. Pass that variable to the wp_remote_get() … Read more

Output and filter data from a XML url

Periodically read the XML file, parse it, and insert/update/delete your custom WordPress “realestate” posttype. I have done this before, for various realestate clients. Step 1 (the easy way): Find out if there is already a plugin/code to read your specific XML. There are probably dozens of others using the same XML structure to fill a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)