Ask a Question related to PHP Development, Design and Development.
-
Steven Stern #1
POSTing to my own scripts
I've got some scripts that back-end multiple HTML forms, accepting data via
POST. What I'd like to do is have some automated processing take place via
cron, using those same scripts to do the back-end processing. I'm looking for
a way to invoke those scripts from a script *not* executed via a browser
session.
I've found one way via streams ([url]http://www.php.net/stream[/url]), by creating a
pretend browser session.
1. Is there an easy-to-use class that encapsulates this? That is, something
that I pass an array of field names and values along with the target URL?
2. Is there a better way?
Steven Stern Guest
-
not posting
can someone elaborate on why this code is not working: #! Perl\bin\perl -w use strict; $|++; use WWW::Mechanize; my $mech =... -
CS: Scripts do not appear in Scripts menu
I have several utility AppleScripts that I created for Illustrator 10. I'd like to use these in CS, and they work correctly when I choose "Browse"... -
XML posting
I wan't to send a string containing XML to a Microsoft XML gateway. I'm using the include code below as an include and calling the function with... -
scripts that control other scripts
Is there any behaviour script that when attached to a sprite can control the functionality of any other scripts attached to that sprite? I want to... -
Re Posting this Pls Help
I have reposted this in the hope some one can help. If it has been covered before I apologise but I cannot find an answer to this problem. I... -
Andy Hassall #2
Re: POSTing to my own scripts
On Wed, 15 Sep 2004 13:42:31 GMT, Steven Stern
<sdsternNOSPAMHERE@NOSPAMHEREmindspring.com> wrote:
If you want automated posting, then Perl's WWW::Mechanize module is excellent,>I've got some scripts that back-end multiple HTML forms, accepting data via
>POST. What I'd like to do is have some automated processing take place via
>cron, using those same scripts to do the back-end processing. I'm looking for
>a way to invoke those scripts from a script *not* executed via a browser
>session.
>
>I've found one way via streams ([url]http://www.php.net/stream[/url]), by creating a
>pretend browser session.
>
>1. Is there an easy-to-use class that encapsulates this? That is, something
>that I pass an array of field names and values along with the target URL?
>
>2. Is there a better way?
or the LWP module for a lower-level approach.
For a PHP solution, then I think there's cURL: [url]http://uk.php.net/curl[/url] but I've
never used it.
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Andy Hassall Guest
-
Manuel Lemos #3
Re: POSTing to my own scripts
Hello,
On 09/15/2004 10:42 AM, Steven Stern wrote:This class does exactly what you ask, it submits forms with POST,> I've got some scripts that back-end multiple HTML forms, accepting data via
> POST. What I'd like to do is have some automated processing take place via
> cron, using those same scripts to do the back-end processing. I'm looking for
> a way to invoke those scripts from a script *not* executed via a browser
> session.
>
> I've found one way via streams ([url]http://www.php.net/stream[/url]), by creating a
> pretend browser session.
>
> 1. Is there an easy-to-use class that encapsulates this? That is, something
> that I pass an array of field names and values along with the target URL?
including submitting large files if necessary, it can collect cookies
and redirection if you need to emulate a login session.
[url]http://www.phpclasses.org/httpclient[/url]
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
[url]http://www.phpclasses.org/[/url]
PHP Reviews - Reviews of PHP books and other products
[url]http://www.phpclasses.org/reviews/[/url]
Metastorage - Data object relational mapping layer generator
[url]http://www.meta-language.net/metastorage.html[/url]
Manuel Lemos Guest
-
Steven Stern #4
Re: POSTing to my own scripts
On Wed, 15 Sep 2004 15:42:08 -0300 (more or less), Manuel Lemos
<mlemos@acm.org> wrote:
>Hello,>
>This class does exactly what you ask, it submits forms with POST,
>including submitting large files if necessary, it can collect cookies
>and redirection if you need to emulate a login session.
>
>[url]http://www.phpclasses.org/httpclient[/url]
THANKS
Steven Stern Guest
-
R. Rajesh Jeba Anbiah #5
Re: POSTing to my own scripts
Steven Stern <sdsternNOSPAMHERE@NOSPAMHEREmindspring.com> wrote in message news:<afhgk0t9atclcqiv67gepmus6d1k2ga9qm@4ax.com>. ..
[url]http://in2.php.net/fsockopen[/url]> I've got some scripts that back-end multiple HTML forms, accepting data via
> POST. What I'd like to do is have some automated processing take place via
> cron, using those same scripts to do the back-end processing. I'm looking for
> a way to invoke those scripts from a script *not* executed via a browser
> session.
>
> I've found one way via streams ([url]http://www.php.net/stream[/url]), by creating a
> pretend browser session.
>
> 1. Is there an easy-to-use class that encapsulates this? That is, something
> that I pass an array of field names and values along with the target URL?
[url]http://in.php.net/curl[/url]> 2. Is there a better way?
--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
R. Rajesh Jeba Anbiah Guest
-
David Risner #6
Re: POSTing to my own scripts
Steven Stern wrote:
You should look at the curl module. It nicely encapsulates this.> I've got some scripts that back-end multiple HTML forms, accepting data via
> POST. What I'd like to do is have some automated processing take place via
> cron, using those same scripts to do the back-end processing. I'm looking for
> a way to invoke those scripts from a script *not* executed via a browser
> session.
>
> I've found one way via streams ([url]http://www.php.net/stream[/url]), by creating a
> pretend browser session.
>
> 1. Is there an easy-to-use class that encapsulates this? That is, something
> that I pass an array of field names and values along with the target URL?
>
> 2. Is there a better way?
--
David G. Risner
Software Engineer, California State University, Los Angeles
[url]http://www.risner.org/david/[/url]
David Risner Guest



Reply With Quote

