)(Gravitek Posted January 22, 2007 Share Posted January 22, 2007 Hi all,sorry about the subject, this one is seemingly hard to explain.Is it possible for PHP (or even Javascript) to post variables in to a form on another website? This particular website has INPUT NAME specified in the source code.This is for two internal systems at my job, and I require this functionality to avoid having to type form data in twice.Thanks Quote Link to comment https://forums.phpfreaks.com/topic/35178-populate-form-on-javascript-site/ Share on other sites More sharing options...
fert Posted January 22, 2007 Share Posted January 22, 2007 look into CURL and ajax Quote Link to comment https://forums.phpfreaks.com/topic/35178-populate-form-on-javascript-site/#findComment-166132 Share on other sites More sharing options...
bibby Posted January 22, 2007 Share Posted January 22, 2007 If the other site has register globals on (allowing you to fake $_POSTs as $_GETs),by all means pass variables through query strings for remote logins or the like. That's how most phpBB sites get porno ads. :PI've been considering a javascript approach to something that I have to do this week on a system that I do not control.The plan (plan D, if you're wondering) is to include('http://remoteServer.com/file.html') , and have php generated javascript fill in the form after it loads.The scenario is that they use a webform to enter data that they already know on the local system.So if I can't get the other company to play nice with me in database exchanges, then I'll write a robot to fill in their forms as they're accustomed to. bastards. Quote Link to comment https://forums.phpfreaks.com/topic/35178-populate-form-on-javascript-site/#findComment-166156 Share on other sites More sharing options...
)(Gravitek Posted January 22, 2007 Author Share Posted January 22, 2007 [quote author=fert link=topic=123456.msg510300#msg510300 date=1169441645]look into CURL and ajax[/quote]After researching CURL, it seems that it's only useful if you are dealing with php on the other server. The other server is using webpages that have a .nsf extension, which is likely made using Java / IBM's X10 Programming Language...It looks like the only solution that I have is to work with the page after it has been processed by the server - meaning I'm going to need some sort of javascript that will post the data in to the form fields, identified by their INPUT NAME in the source code... Quote Link to comment https://forums.phpfreaks.com/topic/35178-populate-form-on-javascript-site/#findComment-166226 Share on other sites More sharing options...
)(Gravitek Posted January 22, 2007 Author Share Posted January 22, 2007 [quote author=bibby link=topic=123456.msg510324#msg510324 date=1169445270]If the other site has register globals on (allowing you to fake $_POSTs as $_GETs),by all means pass variables through query strings for remote logins or the like. That's how most phpBB sites get porno ads. :PI've been considering a javascript approach to something that I have to do this week on a system that I do not control.The plan (plan D, if you're wondering) is to include('http://remoteServer.com/file.html') , and have php generated javascript fill in the form after it loads.The scenario is that they use a webform to enter data that they already know on the local system.So if I can't get the other company to play nice with me in database exchanges, then I'll write a robot to fill in their forms as they're accustomed to. bastards.[/quote]This sounds like it's exactly what I need - you're dealing with the 'already-processed' HTML... Surely javascript can fill in fields after the page has loaded? maybe some sort of html frames system or something? Quote Link to comment https://forums.phpfreaks.com/topic/35178-populate-form-on-javascript-site/#findComment-166230 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.