PDA

View Full Version : Sending information to php page through plugin


pianoman993
01-11-2009, 09:35 PM
Is it possible to send information to an external php through a plugin? I know that you can send information through the URL but that is not secure at all. Are there any other methods?! This is the code I have.

ob_start();

$_POST['username'] = $vbulletin->userinfo['username'];

include("http://mysite.com/custom_includes/manager.main.php? " . $_SERVER['QUERY_STRING']);
$get_manager = ob_get_contents();

ob_end_clean();

I am trying to send the username to my external php module through the plugin but no information is being received. Any and all help is greatly appreciated!!! Thank you!

- Pianoman993

Bellardia
01-11-2009, 10:17 PM
What's so insecure about using a query string from an internal php command? Nobody will be able to see the source.
Especially since it's just a username...not really anything that needs to be protected.

pianoman993
01-11-2009, 11:54 PM
If you tack on anything to then end of a URL anybody can change that value. It's just more of a hassle than anything.

Are you saying that transferring information through the URL is the only way to do it?

Bellardia
01-12-2009, 12:04 AM
But you're sending the information through a plugin...
Users cant change the end of a url because you can't alter the execution of the plugin or see what it is executing. Since it's php it would send the information to the external page and complete, and no one would know.

Another way to 'send' information to another page would be to store it in the database and have the page get its information from the database, but I don't see why you're afraid to send it via get unless there's something I'm not seeing.

pianoman993
01-12-2009, 01:07 AM
Genius!!! Thank you so much!!