Jump to content

populate form on javascript site


)(Gravitek

Recommended Posts

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
Link to comment
Share on other sites

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. :P

I'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.

Link to comment
Share on other sites

[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...
Link to comment
Share on other sites

[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. :P

I'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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.