php script to submit javascript button?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rxsid
Forum Commoner
Posts: 82
Joined: Thu Aug 29, 2002 12:04 am

php script to submit javascript button?

Post by rxsid »

Hi all,

I've got a wireless print server, DLink DP-G321, that seems to need a 'reset' fairly often. This is normally done manually by going to the print servers web interface management pages and clicking on a button that is a javascript button. Here's the code from that page:

Code: Select all

<FORM ACTION=/ReplyT.htm METHOD=POST>
....blah
<a href=javascript:document.forms[0].submit()>
....blah
</form>
I would like to be able to write a PHP script that I could schedule in the windows xp scheduler, that would essentially 'click' that button for me and do the reboot at that scheduled time.
I'm running PHP 5.0.4 on apache 2.0.54 on winxp pro.
Any suggestions/links to tutorials on how to do this sort of thing (php script to 'submit' a form) would be greatly appreciated.

Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

cURL is your new friend.
rxsid
Forum Commoner
Posts: 82
Joined: Thu Aug 29, 2002 12:04 am

Post by rxsid »

awesome! thanks feyd.
Post Reply