mishwar222
11-30-2011, 03:11 AM
Hello,
I am trying to have my plugin to communicate with external php file. I need to send two values into the php file that deals with them and echo the result and then get the result by my plugin. The problem is I have quoting strings problem preventing the plugin from working like what I need.
This is my code:
In my plugin:
This does not work
$id1 = 1;
$id2 = 2;
ob_start();
include('www.domain.com/test.php?idd1=' . $id1 . '&idd2=' . $id2);
$result = ob_get_contents();
ob_end_clean();
But this does work:
ob_start();
include('www.domain.com/test.php?idd1=1&idd2=2');
$result = ob_get_contents();
ob_end_clean();
Any help?
Thank you
I am trying to have my plugin to communicate with external php file. I need to send two values into the php file that deals with them and echo the result and then get the result by my plugin. The problem is I have quoting strings problem preventing the plugin from working like what I need.
This is my code:
In my plugin:
This does not work
$id1 = 1;
$id2 = 2;
ob_start();
include('www.domain.com/test.php?idd1=' . $id1 . '&idd2=' . $id2);
$result = ob_get_contents();
ob_end_clean();
But this does work:
ob_start();
include('www.domain.com/test.php?idd1=1&idd2=2');
$result = ob_get_contents();
ob_end_clean();
Any help?
Thank you