PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > remote submit... is it possible?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
remote submit... is it possible?

Réponse
 
LinkBack Outils de la discussion
Vieux 08/04/2008, 11h25   #1 (permalink)
Mauro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut remote submit... is it possible?

Hi,
I'm trying to remote-control a site over which I have little control
(it is a php app I installed on MY site, but I would like to leave it
alone as much as possible).
This app presents a series of forms to do various things.
I can pre-fill the forms just manipulating the URL (*veeeery* long
URLs, but it works).

The problem:
I still have to manually hit the [submit] button.
Is there a way to force it programmatically?

The form is a <form enctype="multipart/form-data" action="http://
192.168.0.222/index.php?do=newtask&amproject=2" method="post">
and the button is a stupid <button accesskey="s" type="submit">Add
this task</button>

Can someone me, please?
TiA
Mauro
  Réponse avec citation
Vieux 08/04/2008, 13h10   #2 (permalink)
Erwin Moller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: remote submit... is it possible?

Mauro schreef:
> Hi,


Hi Mauro,

> I'm trying to remote-control a site over which I have little control
> (it is a php app I installed on MY site, but I would like to leave it
> alone as much as possible).
> This app presents a series of forms to do various things.
> I can pre-fill the forms just manipulating the URL (*veeeery* long
> URLs, but it works).
>
> The problem:
> I still have to manually hit the [submit] button.
> Is there a way to force it programmatically?


Post a form on a page you have before you?
Hit the Enterbutton works on most browsers.

I am not sure I can follow you however: You do not mind creating
horrible URLs, but you DO mind pressing the submit button?

Anyway, with a small modification in the page you can make it autosubmit
via javascript.
For example:
index.php?do=newtask&amproject=2&amp;autosubmit= Y

Then from index.php:
check if autosubmit is in the URL, and if it is, do something like:
document.forms.myform.submit();

For that to work you must change your site of course. (You know: the one
you didn't want to change.)

Regards,
Erwin Moller

>
> The form is a <form enctype="multipart/form-data" action="http://
> 192.168.0.222/index.php?do=newtask&amproject=2" method="post">
> and the button is a stupid <button accesskey="s" type="submit">Add
> this task</button>
>
> Can someone me, please?
> TiA
> Mauro

  Réponse avec citation
Vieux 08/04/2008, 15h14   #3 (permalink)
Scott Bryce
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: remote submit... is it possible?

Mauro wrote:
> I'm trying to remote-control a site over which I have little control


Perl, and I am sure other languages as well, has the capability to
submit information to a form on a web page that you do not have visible
in a browser.
  Réponse avec citation
Vieux 08/04/2008, 16h00   #4 (permalink)
Mauro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: remote submit... is it possible?

On 8 Apr, 16:14, Scott Bryce <sbr...@scottbryce.com> wrote:
> Mauro wrote:
> > I'm trying to remote-control a site over which I have little control

>
> Perl, and I am sure other languages as well, has the capability to
> submit information to a form on a web page that you do not have visible
> in a browser.


Thanks,
that's exactly what I need.
Do You have specific pointers?
I would hate to browse hundreds of packages on CPAN only to discover I
chose the wrong one.

TiA
Mauro
  Réponse avec citation
Vieux 08/04/2008, 17h16   #5 (permalink)
Sherman Pendley
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: remote submit... is it possible?

Mauro <ZioByte@gmail.com> writes:

> On 8 Apr, 16:14, Scott Bryce <sbr...@scottbryce.com> wrote:
>> Mauro wrote:
>> > I'm trying to remote-control a site over which I have little control

>>
>> Perl, and I am sure other languages as well, has the capability to
>> submit information to a form on a web page that you do not have visible
>> in a browser.

>
> Thanks,
> that's exactly what I need.
> Do You have specific pointers?
> I would hate to browse hundreds of packages on CPAN only to discover I
> chose the wrong one.


LWP is the low-level mechanism for web client programming, and supports
a variety of protocols.

WWW::Mechanize uses LWP, and adds higher-level capabilities like parsing
and submitting forms, maintaining a jar for multi-page "session
", and more.

One hurdle to using these tools is that they're *not* JavaScript-aware.
If you want to "drive" a site that relies on JS, you'll have to examine it
to see what effect (if any) the JS has on the submitted data, then duplicate
that effect in your Perl code.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h36.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09772 seconds with 13 queries