jquery - php run actions on a different website -
jquery - php run actions on a different website -
i got problem, building application allows users alter info changed in admin panel. application filters out vulnerable data. when alter info in aplication, must updated in original admin panel. must upload xml-file admin panel. goes manual, must automated. must upload via admin panel or else info wont updated in panel. straight updating file_put_contents
doesn't work sadly.
this piece of code located on mydomain.com/system_backup.php
. in admin panel , requires log in username , pass before able utilize it.
//the html on page. system_backup.php <form action="system_backup.php" method="post" enctype="multipart/form-data"> //downloads current xml-file server <input name="download" type="submit" class="formbtn" id="download" value="download configuration"> //select xml file local system. <input name="conffile" type="file" class="formfld" id="conffile" size="40"> //restore/update xml-file. <input name="restore" type="submit" class="formbtn" id="restore" value="restore configuration"> </form>
this looks this.
when open page in browser next login prompt given javascript/jquery.
so there way create automated script php, log in , update file using admin panel? if not possible php, possible in different language? have run each night cron-job.
it possible , quite easy. have figure out method web server using authenticating users , send appropriate info in headers (or cookies).
for example, if server using basic access authentication (and does), have add together header request, looking this:
authorization: basic xxxxxxxxxxxxx
where xxxxxxxxxxxxx base64 of string: username:password
.
php jquery html
Comments
Post a Comment