![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 249 Pomógł: 0 Dołączył: 22.12.2011 Ostrzeżenie: (10%) ![]() ![]() |
Mam zainstalowany dodatek do mozilli WebMail Notifier - który sprawdza mailing.
Mailing jest na free.os.pl - administrator milczy na prośbę zrobienia takiego skryptu. Do tego dodatku potrzebny jest skrypt. To są dane ze strony: 1. Login:
2. Hasło:
a to mój skrypt: Kod // JavaScript Document function initHandler(handler){ handler.name="MyMail"; this.dataURL="http://free.os.pl"; this.loginData=["http://free.os.pl/index.php?mode=submit","name","password","key="+encodeURIComponent("abc=12")]; this.mailURL="http://free.os.pl"; } function getCount(aData){ //aData is a html source in dataURL var fnd=aData.match(/\"folders\":\[{\"id\":1.+?\"unread\":(\d+)/); //find mail count if(fnd){ var num; //get mail count here return num; }else{ return -1;//display 'not checked' message } } oraz przerobiony gotowy skrypt interia.pl Kod var name="INTERIA.PL"; var ver="2010-11-12"; function init(){ this.initStage=ST_PRE; this.loginData=["http://free.os.pl/index.php?mode=submit","email","password"]; this.dataURL="http://free.os.pl"; this.mailURL="http://free.os.pl"; this.mailDomain="free.os.pl"; } function getCount(aData){ var fnd=aData.match(/\"folders\":\[{\"id\":1.+?\"unread\":(\d+)/); if(fnd){ return fnd[1]; }else{ fnd=aData.match(/Odebrane<\/a>.+?\((?:(\d+)\/)?\d+?\)/); if(fnd)return fnd[1]?fnd[1]:0; else return -1; } } function process(aHttpChannel, aData) { switch(this.stage){ case ST_PRE: this.stage=ST_LOGIN; this.getHtml("http://free.os.pl/"); return true; } return this.baseProcess(aHttpChannel, aData); } Obydwa skrypty nie działają (otwiera się strona mailingu lecz nie loguje się). Nie jestem profesjonalistą dopiero zaczynam więc proszę o jakąkolwiek pomoc lub wskazówki. -------------------- TERA TRYBI.pl
|
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Moderatorzy Postów: 36 557 Pomógł: 6315 Dołączył: 27.12.2004 ![]() |
zapytaj gościa z tego tematu:
http://forum.php.pl/index.php?showtopic=19...mp;#entry942353 mial identyczny problem -------------------- "Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista "Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 07:25 |