PDA

View Full Version : Quoting Strings problem


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

kh99
12-01-2011, 11:30 PM
I can't see any problem with that. I changed 'include' to 'echo' and compared the two results and they look identical.