I am attempting to operate a CURL script in wordpress but I am getting an issue.

After i test drive it, i recieve a 500 internal error as Wordpress changes the URL.

Therefore the script reaches www.site.com/curl_script.php - After i test that (navigate to www.site.com/curl_script.php) I finish up likely to www.site.com/curl_script.php/wordpress-admin/install.php which returns a 500 internal error.

Now after experimenting using the script, I have observed the issue. It appears to become a function that I am running (the curl function) thats leading to wordpress to consider me to that particular url.

Ive had similar issues for this but have handled to repair it simply by altering what they are called from the functions, but this does not appear to operate any longer.

The function:

  function verify_user($ref, $username, $uu_name){

    $ch = curl_init($server_root);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);

    $result = curl_exec($ch);

    $data = json_decode($result);

    global $ref_;

    $ref_ = $data->ref_id;

//fetch some more info

    $chh = curl_init($server_root);

    curl_setopt($chh, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($chh, CURLOPT_POST, 1);

    $resultt_2 = curl_exec($chh);

    $data_custt = json_decode($resultt_2);

    $cust_st = $data__->user_status;

    if ($cust_st == "FAILED"){

    echo "this is bad";


    elseif ($cust_st == "PASSED") {

    echo "this is good";


Now after i refer to this as function:

verify_user_info($ref, $username, $uu_name);

Wordpress plays up...

However when i leave the function out (don't refer to it as), everything works fine.

It appears that Wordpress is presuming the consumer is trying to operate cellular phone, when that isn't the situation.

Any tips on how to fix this, dynamically as others uses this script too?

If seems like you are receiving rerouted in some way, despite the fact that should should not be if CURLOPT_FOLLOWLOCATION isn't set. Use the curl_getinfo function to debug the URL that's being utilized.