├── LICENSE.txt
├── POLICY.txt
├── README.md
├── autoupdate.php
├── conf
├── abv.conf
├── aol.conf
├── apropo.conf
├── atlas.conf
├── aussiemail.conf
├── azet.conf
├── badoo.conf
├── bebo.conf
├── bigstring.conf
├── bookcrossing.conf
├── bordermail.conf
├── brazencareerist.conf
├── canoe.conf
├── care2.conf
├── clevergo.conf
├── cyworld.conf
├── doramail.conf
├── eons.conf
├── evite.conf
├── facebook.conf
├── faces.conf
├── famiva.conf
├── fastmail.conf
├── fdcareer.conf
├── flickr.conf
├── flingr.conf
├── flixster.conf
├── fm5.conf
├── freemail.conf
├── friendfeed.conf
├── friendster.conf
├── gawab.conf
├── gmail.conf
├── gmx_net.conf
├── graffiti.conf
├── hi5.conf
├── hotmail.conf
├── hushmail.conf
├── hyves.conf
├── inbox.conf
├── india.conf
├── indiatimes.conf
├── inet.conf
├── interia.conf
├── katamail.conf
├── kids.conf
├── kincafe.conf
├── konnects.conf
├── koolro.conf
├── lastfm.conf
├── libero.conf
├── linkedin.conf
├── livejournal.conf
├── lovento.conf
├── lycos.conf
├── mail2world.conf
├── mail_com.conf
├── mail_in.conf
├── mail_ru.conf
├── meinvz.conf
├── meta.conf
├── mevio.conf
├── motortopia.conf
├── multiply.conf
├── mycatspace.conf
├── mydogspace.conf
├── mynet.conf
├── myspace.conf
├── netaddress.conf
├── netlog.conf
├── ning.conf
├── nz11.conf
├── o2.conf
├── operamail.conf
├── orkut.conf
├── perfspot.conf
├── plaxo.conf
├── plazes.conf
├── plurk.conf
├── pochta.conf
├── popstarmail.conf
├── rambler.conf
├── rediff.conf
├── sapo.conf
├── skyrock.conf
├── tagged.conf
├── techemail.conf
├── terra.conf
├── twitter.conf
├── uk2.conf
├── vimeo.conf
├── virgilio.conf
├── vkontakte.conf
├── walla.conf
├── web_de.conf
├── wpl.conf
├── xanga.conf
├── xing.conf
├── xuqa.conf
├── yahoo.conf
├── yandex.conf
├── youtube.conf
└── zapak.conf
├── config.php
├── default.php
├── example.php
├── images
├── ers.gif
└── oks.gif
├── index.htm
├── index.html
├── index.php
├── install.txt
├── install_visual.pdf
├── more_examples
├── css
│ ├── jquery.fancybox-1.3.4.css
│ ├── style.css
│ └── uniform.default.css
├── example_autodetect.php
├── example_list.php
├── get_contacts.php
├── imgs
│ ├── Thumbs.db
│ ├── all_services.png
│ ├── all_services_up.png
│ ├── bg-input-focus.png
│ ├── bg-input.png
│ ├── blank.gif
│ ├── email_services.png
│ ├── ers.gif
│ ├── fancy_close.png
│ ├── fancy_loading.png
│ ├── fancy_nav_left.png
│ ├── fancy_nav_right.png
│ ├── fancy_shadow_e.png
│ ├── fancy_shadow_n.png
│ ├── fancy_shadow_ne.png
│ ├── fancy_shadow_nw.png
│ ├── fancy_shadow_s.png
│ ├── fancy_shadow_se.png
│ ├── fancy_shadow_sw.png
│ ├── fancy_shadow_w.png
│ ├── fancy_title_left.png
│ ├── fancy_title_main.png
│ ├── fancy_title_over.png
│ ├── fancy_title_right.png
│ ├── fancybox-x.png
│ ├── fancybox-y.png
│ ├── fancybox.png
│ ├── oks.gif
│ ├── social_services.png
│ └── sprite.png
└── js
│ ├── jquery.easing-1.3.pack.js
│ ├── jquery.fancybox-1.3.4.pack.js
│ ├── jquery.mousewheel-3.0.4.pack.js
│ └── jquery.uniform.min.js
├── notifier.php
├── openinviter.php
├── plugins
├── _base.php
├── _hosted.plg.php
├── abv.plg.php
├── aol.plg.php
├── apropo.plg.php
├── atlas.plg.php
├── aussiemail.plg.php
├── azet.plg.php
├── badoo.plg.php
├── bebo.plg.php
├── bigstring.plg.php
├── bookcrossing.plg.php
├── bordermail.plg.php
├── brazencareerist.plg.php
├── canoe.plg.php
├── care2.plg.php
├── clevergo.plg.php
├── cyworld.plg.php
├── doramail.plg.php
├── eons.plg.php
├── evite.plg.php
├── facebook.plg.php
├── faces.plg.php
├── famiva.plg.php
├── fastmail.plg.php
├── fdcareer.plg.php
├── flickr.plg.php
├── flingr.plg.php
├── flixster.plg.php
├── fm5.plg.php
├── freemail.plg.php
├── friendfeed.plg.php
├── friendster.plg.php
├── gawab.plg.php
├── gmail.plg.php
├── gmx_net.plg.php
├── graffiti.plg.php
├── hi5.plg.php
├── hotmail.plg.php
├── hushmail.plg.php
├── hyves.plg.php
├── inbox.plg.php
├── india.plg.php
├── indiatimes.plg.php
├── inet.plg.php
├── interia.plg.php
├── katamail.plg.php
├── kids.plg.php
├── kincafe.plg.php
├── konnects.plg.php
├── koolro.plg.php
├── lastfm.plg.php
├── libero.plg.php
├── linkedin.plg.php
├── livejournal.plg.php
├── lovento.plg.php
├── lycos.plg.php
├── mail2world.plg.php
├── mail_com.plg.php
├── mail_in.plg.php
├── mail_ru.plg.php
├── meinvz.plg.php
├── meta.plg.php
├── mevio.plg.php
├── motortopia.plg.php
├── msn.plg.php
├── multiply.plg.php
├── mycatspace.plg.php
├── mydogspace.plg.php
├── mynet.plg.php
├── myspace.plg.php
├── netaddress.plg.php
├── netlog.plg.php
├── ning.plg.php
├── nz11.plg.php
├── o2.plg.php
├── operamail.plg.php
├── orkut.plg.php
├── perfspot.plg.php
├── plaxo.plg.php
├── plazes.plg.php
├── plurk.plg.php
├── pochta.plg.php
├── popstarmail.plg.php
├── rambler.plg.php
├── rediff.plg.php
├── sapo.plg.php
├── skyrock.plg.php
├── tagged.plg.php
├── techemail.plg.php
├── terra.plg.php
├── twitter.plg.php
├── uk2.plg.php
├── vimeo.plg.php
├── virgilio.plg.php
├── vkontakte.plg.php
├── walla.plg.php
├── web_de.plg.php
├── wpl.plg.php
├── xanga.plg.php
├── xing.plg.php
├── xuqa.plg.php
├── yahoo.plg.php
├── yandex.plg.php
├── youtube.plg.php
└── zapak.plg.php
├── postinstall.php
└── stats.php
/README.md:
--------------------------------------------------------------------------------
1 | # OpenInviter
2 |
3 | Open source OpenInviter is a free import contacts (addressbook) script from email providers and social networking site. It s a free self hosted solution that does not use a third party gateway (or API) to import contacts.
4 |
5 | Requirements: Your server will need to have PHP5 installed with DOMDocument support and either cURL or WGET.
6 |
7 | ## Installation
8 |
9 | * Upload the files to your webserver (subfolder is highly advised).
10 | * Run postinstall.php (http://yourdomain/openinviter_dir/postinstall.php)
11 |
12 | **You may encounter the following errors:**
13 | i) The cookie storing folder if not writable. (Change the cookie folder or modify it's permisions.)
14 | ii) Php DOM extension is not installed. (Install dom extension for php)
15 | iii) You don't have curl or wget installed. (Install curl or wget)
16 |
17 | **You may encounter the following warnings:**
18 | i) A plugin does not work properly. (Your server has either a firewall or there is a connectivity error)
19 |
20 | **Note:** You have to fix all the errors or openinviter will probably not work.
21 |
22 | **Note*:** You can't run postinstall.php again for 2 minutes.
23 |
24 | * Edit config.php to suit your needs.
25 | * Delete postinstall.php
26 | * Run example.php (http://yourdomain/openinviter_dir/example.php) and try to fetch your contacts.
--------------------------------------------------------------------------------
/conf/abv.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/aol.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/apropo.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/atlas.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/aussiemail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/azet.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/badoo.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/bebo.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/bigstring.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/bookcrossing.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/bordermail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/brazencareerist.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/canoe.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/care2.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/clevergo.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/cyworld.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/doramail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/eons.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/evite.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/facebook.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/faces.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/famiva.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/fastmail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/fdcareer.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/flickr.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/flingr.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/flixster.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/fm5.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/freemail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/friendfeed.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/friendster.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/gawab.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/gmail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/gmx_net.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/graffiti.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/hi5.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/hotmail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/hushmail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/hyves.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/inbox.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/india.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/indiatimes.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/inet.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/interia.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/katamail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/kids.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/kincafe.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/konnects.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/koolro.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/lastfm.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/libero.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/linkedin.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/livejournal.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/lovento.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/lycos.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/mail2world.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/mail_com.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/mail_in.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/mail_ru.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/meinvz.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/meta.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/mevio.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/motortopia.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/multiply.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/mycatspace.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/mydogspace.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/mynet.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/myspace.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/netaddress.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/netlog.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/ning.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/nz11.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/o2.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/operamail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/orkut.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/perfspot.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/plaxo.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/plazes.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/plurk.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/pochta.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/popstarmail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/rambler.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/rediff.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/sapo.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/skyrock.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/tagged.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/techemail.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/terra.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/twitter.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/uk2.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/vimeo.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/virgilio.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/vkontakte.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/walla.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/web_de.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/wpl.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/xanga.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/xing.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/xuqa.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/yahoo.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/yandex.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/youtube.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/conf/zapak.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/config.php:
--------------------------------------------------------------------------------
1 | "OI_USERNAME", // Get it from OpenInviter.com
4 | "private_key"=>"OI_PRIVATE_KEY", // Get it from OpenInviter.com
5 | "cookie_path"=>'/tmp',
6 | "message_body"=>"You are invited to OpenInviter.com", // the website on your account. If wrong, please update your account at OpenInviter.com
7 | "message_subject"=>" is inviting you to OpenInviter.com", // the website on your account. If wrong, please update your account at OpenInviter.com
8 | "transport"=>"curl", //Replace "curl" with "wget" if you would like to use wget instead
9 | "local_debug"=>"on_error", //Available options: on_error => log only requests containing errors; always => log all requests; false => don`t log anything
10 | "remote_debug"=>FALSE, //When set to TRUE OpenInviter sends debug information to our servers. Set it to FALSE to disable this feature
11 | "hosted"=>FALSE, //When set to TRUE OpenInviter uses the OpenInviter Hosted Solution servers to import the contacts.
12 | "proxies"=>array(), //If you want to use a proxy in OpenInviter by adding another key to the array. Example: "proxy_1"=>array("host"=>"1.2.3.4","port"=>"8080","user"=>"user","password"=>"pass")
13 | //You can add as many proxies as you want and OpenInviter will randomly choose which one to use on each import.
14 | "stats"=>TRUE,
15 | "plugins_cache_time"=>1800,
16 | "plugins_cache_file"=>"oi_plugins.php",
17 | "update_files"=>true,
18 | "stats_user"=>"", //Required to access the stats
19 | "stats_password"=>"" //Required to access the stats
20 | );
21 | ?>
22 |
--------------------------------------------------------------------------------
/default.php:
--------------------------------------------------------------------------------
1 | http://openinviter.com";
3 | ?>
--------------------------------------------------------------------------------
/images/ers.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/images/ers.gif
--------------------------------------------------------------------------------
/images/oks.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/images/oks.gif
--------------------------------------------------------------------------------
/index.htm:
--------------------------------------------------------------------------------
1 | Open source OpenInviterTM (Open InviterTM) is a free import contacts (addressbook) script from email providers like Libero, GMX.net, Netaddress, Doramail, Live/Hotmail, Xing, Care2, O2, Canoe, Mail2World, Lycos, Yahoo!, Virgilio, Yandex, India, Evite, Interia, Mail.ru, Web.de, Abv, IndiaTimes, KataMail, AOL, Uk2, Freemail, Terra, Wp.pt, Clevergo, Grafitti, Kids, OperaMail, Plaxo, Bordermail, Mynet.com, Nz11, Meta, Mail.in, 5Fm, Rambler, Inet, Aussiemail, Zapakmail, MSN, Techemail, LinkedIn, Walla, Atlas, Apropo, FastMail, Popstarmail, Bigstring, Hushmail, Mail.com, Rediff, Inbox.com, Pochta, Azet, Sapo.pt, YouTube, Gawab, GMail or social portals like Famiva, Flixster, Facebook, Friendfeed, Cyworld, Last.fm, Vkontakte, Mycatspace, Brazencareerist, Skyrock, Plazes, Bookcrossing, Livejournal, Vimeo, Badoo, Friendster, Hyves, Multiply, Perfspot, Bebo, Twitter, Flickr, Konnects, Mydogspace, Eons, Lovento, Ning, Kincafe, Plurk, Tagged, Hi5, NetLog, Orkut, Flingr, Motortopia, MySpace, Koolro, Fdcareer, Xanga, Xuqa, Meinvz, Mevio, Faces. This contacts importer script is integrating with content management systems (aka CMS) like Joomla, Atmail5, RoundCube, joovili, phpizabi, vBulletin, JamRoom, SimpleMachines Forum (SMF), PHPMELODY, Vwebmail, phpFoX, myBB, symfony, Joomla1.0, PhpBB, Social Engine 4, Dating Pro, nowFire, Etano, Wordpress, E107, PunBB, jamit job, Social Engine, Boonex Dolphin, Buddy Zone, Drupal. Open Inviter is written in PHP 5 (no database required but cURL or wget required) and running on any webserver (tested on Apache) offering advanced tell a friend features. OpenInviterTM is a free self hosted solution that does not use a third party gateway (or API) to import contacts.Download it at: OpenInviter
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 | Open source OpenInviterTM (Open InviterTM) is a free import contacts (addressbook) script from email providers like Libero, GMX.net, Netaddress, Doramail, Live/Hotmail, Xing, Care2, O2, Canoe, Mail2World, Lycos, Yahoo!, Virgilio, Yandex, India, Evite, Interia, Mail.ru, Web.de, Abv, IndiaTimes, KataMail, AOL, Uk2, Freemail, Terra, Wp.pt, Clevergo, Grafitti, Kids, OperaMail, Plaxo, Bordermail, Mynet.com, Nz11, Meta, Mail.in, 5Fm, Rambler, Inet, Aussiemail, Zapakmail, MSN, Techemail, LinkedIn, Walla, Atlas, Apropo, FastMail, Popstarmail, Bigstring, Hushmail, Mail.com, Rediff, Inbox.com, Pochta, Azet, Sapo.pt, YouTube, Gawab, GMail or social portals like Famiva, Flixster, Facebook, Friendfeed, Cyworld, Last.fm, Vkontakte, Mycatspace, Brazencareerist, Skyrock, Plazes, Bookcrossing, Livejournal, Vimeo, Badoo, Friendster, Hyves, Multiply, Perfspot, Bebo, Twitter, Flickr, Konnects, Mydogspace, Eons, Lovento, Ning, Kincafe, Plurk, Tagged, Hi5, NetLog, Orkut, Flingr, Motortopia, MySpace, Koolro, Fdcareer, Xanga, Xuqa, Meinvz, Mevio, Faces. This contacts importer script is integrating with content management systems (aka CMS) like Joomla, Atmail5, RoundCube, joovili, phpizabi, vBulletin, JamRoom, SimpleMachines Forum (SMF), PHPMELODY, Vwebmail, phpFoX, myBB, symfony, Joomla1.0, PhpBB, Social Engine 4, Dating Pro, nowFire, Etano, Wordpress, E107, PunBB, jamit job, Social Engine, Boonex Dolphin, Buddy Zone, Drupal. Open Inviter is written in PHP 5 (no database required but cURL or wget required) and running on any webserver (tested on Apache) offering advanced tell a friend features. OpenInviterTM is a free self hosted solution that does not use a third party gateway (or API) to import contacts.Download it at: OpenInviter
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | TM (Open InviterTM) is a free import contacts (addressbook) script from email providers like Libero, GMX.net, Netaddress, Doramail, Live/Hotmail, Xing, Care2, O2, Canoe, Mail2World, Lycos, Yahoo!, Virgilio, Yandex, India, Evite, Interia, Mail.ru, Web.de, Abv, IndiaTimes, KataMail, AOL, Uk2, Freemail, Terra, Wp.pt, Clevergo, Grafitti, Kids, OperaMail, Plaxo, Bordermail, Mynet.com, Nz11, Meta, Mail.in, 5Fm, Rambler, Inet, Aussiemail, Zapakmail, MSN, Techemail, LinkedIn, Walla, Atlas, Apropo, FastMail, Popstarmail, Bigstring, Hushmail, Mail.com, Rediff, Inbox.com, Pochta, Azet, Sapo.pt, YouTube, Gawab, GMail or social portals like Famiva, Flixster, Facebook, Friendfeed, Cyworld, Last.fm, Vkontakte, Mycatspace, Brazencareerist, Skyrock, Plazes, Bookcrossing, Livejournal, Vimeo, Badoo, Friendster, Hyves, Multiply, Perfspot, Bebo, Twitter, Flickr, Konnects, Mydogspace, Eons, Lovento, Ning, Kincafe, Plurk, Tagged, Hi5, NetLog, Orkut, Flingr, Motortopia, MySpace, Koolro, Fdcareer, Xanga, Xuqa, Meinvz, Mevio, Faces. This contacts importer script is integrating with content management systems (aka CMS) like Joomla, Atmail5, RoundCube, joovili, phpizabi, vBulletin, JamRoom, SimpleMachines Forum (SMF), PHPMELODY, Vwebmail, phpFoX, myBB, symfony, Joomla1.0, PhpBB, Social Engine 4, Dating Pro, nowFire, Etano, Wordpress, E107, PunBB, jamit job, Social Engine, Boonex Dolphin, Buddy Zone, Drupal. Open Inviter is written in PHP 5 (no database required but cURL or wget required) and running on any webserver (tested on Apache) offering advanced tell a friend features. OpenInviterTM is a free self hosted solution that does not use a third party gateway (or API) to import contacts.Download it at: OpenInviter";
4 | ?>
--------------------------------------------------------------------------------
/install.txt:
--------------------------------------------------------------------------------
1 | Openinviter installation Guide.
2 |
3 | Thank you for downloading The OpenInviter General Package. This document will guide you through the installation process.
4 |
5 | A: Requirements:
6 |
7 | Your server will need to have PHP5 installed with DOMDocument support and either cURL or WGET.
8 |
9 |
10 |
11 | B: Install:
12 |
13 |
14 |
15 | 1. Extract the contents of the openinviter.tar.gz file you have just downloaded.
16 |
17 | Note: tar -xzvf openinviter.tar.gz
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 2. Upload the extracted files to your webserver (subfolder is highly advised).
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | 3. Run postinstall.php (http://yourdomain/openinviter_dir/postinstall.php)
34 |
35 |
36 |
37 | You may encounter the following errors:
38 | i) The cookie storing folder if not writable. (Change the cookie folder or modify it's permisions.)
39 |
40 | ii) Php DOM extension is not installed. (Install dom extension for php)
41 |
42 | iii) You don't have curl or wget installed. (Install curl or wget)
43 |
44 |
45 |
46 | You may encounter the following warnings:
47 |
48 | i) A plugin does not work properly. (Your server has either a firewall or there is a connectivity error)
49 |
50 |
51 |
52 | Note: You have to fix all the errors or openinviter will probably not work.
53 |
54 | Note*: You can't run postinstall.php again for 2 minutes.
55 |
56 | 4. Edit config.php to suit your needs.
57 |
58 |
59 |
60 |
61 |
62 | 5. Delete postinstall.php
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | 6. Run example.php (http://yourdomain/openinviter_dir/example.php) and try to fetch your contacts.
71 |
72 | Note: example.php is modifiable but keep in mind the structure of the file.
73 |
74 |
--------------------------------------------------------------------------------
/install_visual.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/install_visual.pdf
--------------------------------------------------------------------------------
/more_examples/css/style.css:
--------------------------------------------------------------------------------
1 | html, body, div, ul {
2 | margin: 0;
3 | padding: 0;
4 | }
5 |
6 | body {
7 | color: #262626;
8 | background: #f4f4f4;
9 | font: normal 12px/18px Verdana, sans-serif;
10 | }
11 |
12 | #content {
13 | width: 400px;
14 | margin: 40px auto 0 auto;
15 | padding: 0 60px 30px 60px;
16 | border: solid 1px #cbcbcb;
17 | background: #fafafa;
18 | -moz-box-shadow: 0px 0px 10px #cbcbcb;
19 | -webkit-box-shadow: 0px 0px 10px #cbcbcb;
20 | }
21 |
22 | h1 {
23 | margin: 30px 0 15px 0;
24 | font-size: 30px;
25 | font-weight: bold;
26 | font-family: Arial;
27 | }
28 |
29 | h1 span {
30 | font-size: 50%;
31 | letter-spacing: -0.05em;
32 | }
33 |
34 | hr {
35 | border: none;
36 | height: 1px; line-height: 1px;
37 | background: #E5E5E5;
38 | margin-bottom: 20px;
39 | padding: 0;
40 | }
41 |
42 | p {
43 | margin: 0;
44 | padding: 7px 0;
45 | }
46 |
47 | a {
48 | outline: none;
49 | }
50 |
51 | a img {
52 | border: 1px solid #BBB;
53 | padding: 2px;
54 | margin: 10px 20px 10px 0;
55 | vertical-align: top;
56 | }
57 |
58 | a img.last {
59 | margin-right: 0;
60 | }
61 |
62 | ul {
63 | margin-bottom: 24px;
64 | padding-left: 30px;
65 | }
66 |
--------------------------------------------------------------------------------
/more_examples/imgs/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/Thumbs.db
--------------------------------------------------------------------------------
/more_examples/imgs/all_services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/all_services.png
--------------------------------------------------------------------------------
/more_examples/imgs/all_services_up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/all_services_up.png
--------------------------------------------------------------------------------
/more_examples/imgs/bg-input-focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/bg-input-focus.png
--------------------------------------------------------------------------------
/more_examples/imgs/bg-input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/bg-input.png
--------------------------------------------------------------------------------
/more_examples/imgs/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/blank.gif
--------------------------------------------------------------------------------
/more_examples/imgs/email_services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/email_services.png
--------------------------------------------------------------------------------
/more_examples/imgs/ers.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/ers.gif
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_close.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_loading.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_nav_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_nav_left.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_nav_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_nav_right.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_shadow_e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_shadow_e.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_shadow_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_shadow_n.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_shadow_ne.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_shadow_ne.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_shadow_nw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_shadow_nw.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_shadow_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_shadow_s.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_shadow_se.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_shadow_se.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_shadow_sw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_shadow_sw.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_shadow_w.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_shadow_w.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_title_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_title_left.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_title_main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_title_main.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_title_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_title_over.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancy_title_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancy_title_right.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancybox-x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancybox-x.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancybox-y.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancybox-y.png
--------------------------------------------------------------------------------
/more_examples/imgs/fancybox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/fancybox.png
--------------------------------------------------------------------------------
/more_examples/imgs/oks.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/oks.gif
--------------------------------------------------------------------------------
/more_examples/imgs/social_services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/social_services.png
--------------------------------------------------------------------------------
/more_examples/imgs/sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/srajbr/OpenInviter/81584e3758609aeb3fbe90f36ecb56f7a1cc4112/more_examples/imgs/sprite.png
--------------------------------------------------------------------------------
/more_examples/js/jquery.mousewheel-3.0.4.pack.js:
--------------------------------------------------------------------------------
1 | /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2 | * Licensed under the MIT License (LICENSE.txt).
3 | *
4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY
7 | *
8 | * Version: 3.0.4
9 | *
10 | * Requires: 1.2.2+
11 | */
12 |
13 | (function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
14 | f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
--------------------------------------------------------------------------------
/notifier.php:
--------------------------------------------------------------------------------
1 | array('code'=>'100','desc'=>'Invalid Method','fatal'=>false),
13 | 'headers'=>array('code'=>'101','desc'=>'Incomplete headers','fatal'=>true),
14 | 'post'=>array('code'=>'102','desc'=>'Invalid POST content','fatal'=>false),
15 | 'auth'=>array('code'=>'103','desc'=>'Bad authentification data','fatal'=>true),
16 | 'xml'=>array('code'=>'105','desc'=>'Invalid XML structure','fatal'=>true),
17 | 'api_version'=>array('code'=>'106', 'desc'=>'Invalid Api version please upgrade manually','fatal'=>true),
18 | );
19 |
20 | private $privateKey;
21 | private $username;
22 |
23 | private function getAuth()
24 | {
25 | include(dirname(__FILE__).'/config.php');
26 | $this->privateKey=$openinviter_settings['private_key'];
27 | $this->username=$openinviter_settings['username'];
28 | global $HTTP_RAW_POST_DATA;
29 | if ($_SERVER['REQUEST_METHOD']!='POST') $this->error('method');
30 | if (!isset($_SERVER['HTTP_X_USER'])) $this->error('headers');
31 | elseif (!isset($_SERVER['HTTP_X_SIGNATURE'])) $this->error('headers');
32 | if (empty($HTTP_RAW_POST_DATA)) $this->error('post');
33 | $this->user=htmlentities($_SERVER['HTTP_X_USER'],ENT_QUOTES);
34 | $xml=trim(gzuncompress($HTTP_RAW_POST_DATA));
35 | $signature=$_SERVER['HTTP_X_SIGNATURE'];
36 | if ($this->username!=$this->user) $this->error('auth');
37 | $signature_check=$this->makeSignature($this->privateKey,$xml);
38 | if ($signature_check!=$signature) $this->error('auth');
39 | if ($xml=='CHECK STATUS') $this->requestTypes='check';
40 | elseif ($xml=='UPDATE') $this->requestTypes='update';
41 | else $this->error['xml'];
42 | return true;
43 | }
44 |
45 | public function response()
46 | {
47 | if ($this->getAuth())
48 | {
49 | if ($this->requestTypes=='update') { include('autoupdate.php'); return gzcompress("NOTIFICATIONS OK",9); }
50 | elseif($this->requestTypes=='check') return gzcompress("WAITING FOR UPDATES",9);
51 | }
52 | else return false;
53 | }
54 |
55 | private function error($errorID,$header="HTTP/1.0 400 Bad Request")
56 | {
57 | $error=$this->ersArray[$errorID];
58 | header($header);echo (gzcompress("{$error['desc']}",9));exit;
59 | }
60 |
61 | private function makeSignature($var1,$var2)
62 | {
63 | return md5(md5($var1).md5($var2));
64 | }
65 |
66 | }
67 | $notifications=new notifications_response();
68 | echo $notifications->response();
69 | ?>
--------------------------------------------------------------------------------
/plugins/_hosted.plg.php:
--------------------------------------------------------------------------------
1 | 'OpenInviter - Hosted',
7 | 'version'=>'1.0.0',
8 | 'description'=>"Import contacts using the OpenInviter hosted solution",
9 | 'base_version'=>'1.7.5',
10 | 'type'=>'hosted',
11 | 'check_url'=>'http://openinviter.com'
12 | );
13 | /**
14 | * OpenInviter Hosted Solution
15 | *
16 | * Imports user's contacts using OpenInviter's Hosted Solution
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class _hosted extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | public $requirement=false;
27 | public $allowed_domains=false;
28 | public $service='_hosted';
29 | public $timeout=60;
30 |
31 | public function __construct($service='_hosted')
32 | {
33 | $this->service=$service;
34 | }
35 |
36 | public function getHostedServices()
37 | {
38 | $path=$this->settings['cookie_path'].'/oi_hosted_services.txt';$services_cache=false;
39 | if (file_exists($path)) if (time()-filemtime($path)<=7200) $services_cache=true;
40 | if (!$services_cache)
41 | {
42 | if (!$this->init()) return array();
43 | $headers=array('X_USER'=>$this->settings['username'],'X_SIGNATURE'=>md5(md5($this->settings['private_key']).$this->settings['username']));
44 | $res=$this->post("http://hosted.openinviter.com/hosted/services.php",array(),false,false,false,$headers);
45 | if (empty($res)) { $this->internalError="Unable to connect to server.";return array(); }
46 | if (strpos($res,"ERROR: ")===0) { $this->internalError=substr($res,7);return array(); }
47 | file_put_contents($path,$res);
48 | }
49 | $plugins['email']=unserialize(file_get_contents($path));
50 | return $plugins;
51 | }
52 |
53 | /**
54 | * Login function
55 | *
56 | * Requests the OpenInviter Server to import the contacts for a certain service and user.
57 | * Parses the response and stores the contacts in the designated variable.
58 | *
59 | * @param string $user The current user.
60 | * @param string $pass The password for the current user.
61 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
62 | */
63 | public function login($user,$pass)
64 | {
65 | if (!isset($this->hostedServices['email'][$this->service])) { $this->internalError="Unknown service.";return false; }
66 | $this->resetDebugger();
67 | $this->service_user=$user;
68 | $this->service_password=$pass;
69 | if (!$this->init()) return false;
70 | $xml="".$this->service."{$user}{$pass}";
71 | $headers=array('Content-Type'=>'application/xml','X_USER'=>$this->settings['username'],'X_SIGNATURE'=>md5(md5($this->settings['private_key']).$xml));
72 | $res=$this->post("http://hosted.openinviter.com/hosted/hosted.php",gzcompress($xml,9),false,false,false,$headers,true);
73 | if (empty($res)) { $this->internalError="Unable to connect to server.";return false; }
74 | $res=gzuncompress($res);
75 | if (!$res) { $this->internalError="Unable to import contacts. Please try again later.";return false; }
76 | libxml_use_internal_errors(true);
77 | $parsed_res=simplexml_load_string($res);
78 | libxml_use_internal_errors(false);
79 | if (!$parsed_res) { $this->internalError="Unable to import contacts. Please try again later.";return false; }
80 | if ((string)$parsed_res->error!='OK') { $this->internalError=(string)$parsed_res->error;return false; }
81 | $this->contacts=array();
82 | foreach ($parsed_res->contacts->contact as $contact) $this->contacts[(string)$contact->email]=(string)$contact->name;
83 | $this->login_ok=true;
84 | return true;
85 | }
86 |
87 | /**
88 | * Get the current user's contacts
89 | *
90 | * Returns the contacts array that was previously imported.
91 | *
92 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
93 | */
94 | public function getMyContacts()
95 | {
96 | if (!$this->login_ok) { $this->internalError="Unable to import contacts. Please try again later.";return false; }
97 | return $this->contacts;
98 | }
99 |
100 | /**
101 | * Terminate session
102 | *
103 | * Terminates the current user's session,
104 | * debugs the request and reset's the internal
105 | * debudder.
106 | *
107 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
108 | */
109 | public function logout()
110 | {
111 | if (!$this->checkSession()) return false;
112 | $this->debugRequest();
113 | $this->resetDebugger();
114 | $this->stopPlugin();
115 | return true;
116 | }
117 | }
118 | ?>
119 |
--------------------------------------------------------------------------------
/plugins/abv.plg.php:
--------------------------------------------------------------------------------
1 | 'Abv',
4 | 'version'=>'1.0.7',
5 | 'description'=>"Get the contacts from a Abv account",
6 | 'base_version'=>'1.8.4',
7 | 'type'=>'email',
8 | 'check_url'=>'http://m.abv.bg',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>array('/(abv.bg)/i','/(gyuvetch.bg)/i','/(gbg.bg)/i'),
11 | 'imported_details'=>array('first_name','email_1')
12 | );
13 | /**
14 | * Abv Plugin
15 | *
16 | * Imports user's contacts from Abv AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class abv extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 | protected $userAgent='Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 3650;424) Opera 6.10 [en]';
28 |
29 | public $debug_array=array(
30 | 'initial_get'=>'mobile',
31 | 'login_post'=>'location.replace("',
32 | 'first_redirect'=>'jsessionid',
33 | 'home_page'=>'accesskey',
34 | 'contacts'=>'CNT_ID_BB'
35 | );
36 |
37 | /**
38 | * Login function
39 | *
40 | * Makes all the necessary requests to authenticate
41 | * the current user to the server.
42 | *
43 | * @param string $user The current user.
44 | * @param string $pass The password for the current user.
45 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
46 | */
47 | public function login($user,$pass)
48 | {
49 | $this->resetDebugger();
50 | $this->service='abv';
51 | $this->service_user=$user;
52 | $this->service_password=$pass;
53 | if (!$this->init()) return false;
54 |
55 | $res=$this->get("http://m.abv.bg/");
56 | if ($this->checkResponse("initial_get",$res))
57 | $this->updateDebugBuffer('initial_get',"http://www.abv.bg/",'GET');
58 | else
59 | {
60 | $this->updateDebugBuffer('initial_get',"http://www.abv.bg/",'GET',false);
61 | $this->debugRequest();
62 | $this->stopPlugin();
63 | return false;
64 | }
65 |
66 | $form_action="https://passport.abv.bg/acct/passport/login";
67 | $post_elements=array('service'=>'mobile','username'=>$user,'password'=>$pass);
68 | $res=$this->post($form_action,$post_elements,true);
69 | if ($this->checkResponse('login_post',$res))
70 | $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
71 | else
72 | {
73 | $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
74 | $this->debugRequest();
75 | $this->stopPlugin();
76 | return false;
77 | }
78 |
79 | $url_redirect=$this->getElementString($res,'location.replace("','"');
80 | $res=$this->get($url_redirect,true);
81 | if ($this->checkResponse("first_redirect",$res))
82 | $this->updateDebugBuffer('first_redirect',"{$url_redirect}",'GET');
83 | else
84 | {
85 | $this->updateDebugBuffer('first_redirect',"{$url_redirect}",'GET',false);
86 | $this->debugRequest();
87 | $this->stopPlugin();
88 | return false;
89 | }
90 |
91 | $res=$this->get('http://m.abv.bg/j/home.jsp',true);
92 | if ($this->checkResponse("home_page",$res))
93 | $this->updateDebugBuffer('home_page',"http://m.abv.bg/j/home.jsp",'GET');
94 | else
95 | {
96 | $this->updateDebugBuffer('home_page',"http://m.abv.bg/j/home.jsp",'GET',false);
97 | $this->debugRequest();
98 | $this->stopPlugin();
99 | return false;
100 | }
101 | $contacts_url=$this->getElementString($res,'accesskey="3" href="..','"');
102 | $this->login_ok="http://m.abv.bg{$contacts_url}";
103 | return true;
104 | }
105 |
106 | /**
107 | * Get the current user's contacts
108 | *
109 | * Makes all the necesarry requests to import
110 | * the current user's contacts
111 | *
112 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
113 | */
114 | public function getMyContacts()
115 | {
116 | if (!$this->login_ok)
117 | {
118 | $this->debugRequest();
119 | $this->stopPlugin();
120 | return false;
121 | }
122 | else $url=$this->login_ok;
123 | $contacts=array();
124 | $res=$this->get($url,true);
125 | if ($this->checkResponse("contacts",$res))
126 | $this->updateDebugBuffer('contacts',"{$url}",'GET');
127 | else
128 | {
129 | $this->updateDebugBuffer('contacts',"{$url}",'GET',false);
130 | $this->debugRequest();
131 | $this->stopPlugin();
132 | return false;
133 | }
134 | if (preg_match_all("#name\=\"CNT\_ID\_BB\" type\=\"checkbox\" value\=\"(.+)\"#U",$res,$ids))
135 | foreach($ids[1] as $k=>$id)
136 | {
137 | $res=$this->get("http://m.abv.bg/j/contact_preview.jsp?ac=sab&cid={$id}",true);
138 | $name=$this->getElementString($res,'
','<');
139 | $email=$this->getElementString($res,'to=','"');
140 | if(!empty($email)) $contacts[$email]=array('first_name'=>$name,'email_1'=>$email);
141 | }
142 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
143 | return $this->returnContacts($contacts);
144 | }
145 |
146 | /**
147 | * Terminate session
148 | *
149 | * Terminates the current user's session,
150 | * debugs the request and reset's the internal
151 | * debudder.
152 | *
153 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
154 | */
155 | public function logout()
156 | {
157 | if (!$this->checkSession()) return false;
158 | $this->get("http://m.abv.bg/j/logout.jsp",true);
159 | $this->debugRequest();
160 | $this->resetDebugger();
161 | $this->stopPlugin();
162 | return true;
163 | }
164 |
165 | }
166 |
167 | ?>
--------------------------------------------------------------------------------
/plugins/aussiemail.plg.php:
--------------------------------------------------------------------------------
1 | 'Aussiemail',
4 | 'version'=>'1.0.4',
5 | 'description'=>"Get the contacts from a Aussiemail account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://freemail.aussiemail.com.au/email/scripts/loginuser.pl',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Aussiemail Plugin
15 | *
16 | * Imports user's contacts from Aussiemail AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class aussiemail extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array(
29 | 'initial_get'=>'loginName',
30 | 'login_post'=>'EV1',
31 | 'login_post1'=>'location',
32 | 'url_contacts'=>'addTo'
33 | );
34 |
35 | /**
36 | * Login function
37 | *
38 | * Makes all the necessary requests to authenticate
39 | * the current user to the server.
40 | *
41 | * @param string $user The current user.
42 | * @param string $pass The password for the current user.
43 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
44 | */
45 | public function login($user,$pass)
46 | {
47 | $this->resetDebugger();
48 | $this->service='aussiemail';
49 | $this->service_user=$user;
50 | $this->service_password=$pass;
51 | if (!$this->init()) return false;
52 |
53 | $res=$this->get("http://freemail.aussiemail.com.au/email/scripts/loginuser.pl");
54 | if ($this->checkResponse("initial_get",$res))
55 | $this->updateDebugBuffer('initial_get',"http://freemail.aussiemail.com.au/email/scripts/loginuser.pl",'GET');
56 | else
57 | {
58 | $this->updateDebugBuffer('initial_get','http://freemail.aussiemail.com.au/email/scripts/loginuser.pl','GET',false);
59 | $this->debugRequest();
60 | $this->stopPlugin();
61 | return false;
62 | }
63 | $form_action='http://freemail.aussiemail.com.au/email/scripts/loginuser.pl?EV1='.$this->getElementString($res,'EV1=','"');
64 | $post_elements=array('loginName'=>$user,'user_pwd'=>$pass,'login'=>'Login');
65 | $res=$this->post($form_action,$post_elements);
66 |
67 | if (strpos($res,'index.pl?EV1=')!==false)
68 | {
69 | if ($this->checkResponse("login_post",$res))
70 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
71 | else
72 | {
73 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
74 | $this->debugRequest();
75 | $this->stopPlugin();
76 | return false;
77 | }
78 | $url_redirect=$this->getElementString($res,'HREF="','"');
79 | $res=$this->get($url_redirect,true);
80 | }
81 | else
82 | if ($this->checkResponse("login_post1",$res))
83 | $this->updateDebugBuffer('login_post1',"{$form_action}",'POST',true,$post_elements);
84 | else
85 | {
86 | $this->updateDebugBuffer('login_post1',"{$form_action}",'POST',false,$post_elements);
87 | $this->debugRequest();
88 | $this->stopPlugin();
89 | return false;
90 | }
91 |
92 |
93 | $url_contacts='http://freemail.aussiemail.com.au/email/scripts/miniContacts.pl';
94 | $this->login_ok=$url_contacts;
95 | return true;
96 | }
97 |
98 | /**
99 | * Get the current user's contacts
100 | *
101 | * Makes all the necesarry requests to import
102 | * the current user's contacts
103 | *
104 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
105 | */
106 | public function getMyContacts()
107 | {
108 | if (!$this->login_ok)
109 | {
110 | $this->debugRequest();
111 | $this->stopPlugin();
112 | return false;
113 | }
114 | else $url=$this->login_ok;
115 | $res=$this->get($url,true);
116 | if ($this->checkResponse("url_contacts",$res))
117 | $this->updateDebugBuffer('contacts_file',$url,'GET');
118 | else
119 | {
120 | $this->updateDebugBuffer('contacts_file',$url,'GET',false);
121 | $this->debugRequest();
122 | $this->stopPlugin();
123 | return false;
124 | }
125 |
126 | $contacts = array();
127 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
128 | $xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);$name="";
129 | foreach($data as $node)
130 | {
131 | $stringBulk=$node->getAttribute('href');
132 | if (strpos($stringBulk,'addTo(')!==false)
133 | { $name=$this->getElementString($stringBulk,'"','"');$email=$this->getElementString($stringBulk,'" <','>'); }
134 | if (!empty($email)) $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
135 | }
136 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
137 | return $this->returnContacts($contacts);
138 | }
139 |
140 | /**
141 | * Terminate session
142 | *
143 | * Terminates the current user's session,
144 | * debugs the request and reset's the internal
145 | * debudder.
146 | *
147 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
148 | */
149 | public function logout()
150 | {
151 | if (!$this->checkSession()) return false;
152 | $res=$this->get('http://freemail.aussiemail.com.au/email/scripts/logout.pl',true);
153 | $this->debugRequest();
154 | $this->resetDebugger();
155 | $this->stopPlugin();
156 | return true;
157 | }
158 |
159 | }
160 |
161 | ?>
--------------------------------------------------------------------------------
/plugins/azet.plg.php:
--------------------------------------------------------------------------------
1 | 'Azet',
4 | 'version'=>'1.0.5',
5 | 'description'=>"Get the contacts from a Azet account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://emailnew.azet.sk/',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Azet Plugin
15 | *
16 | * Imports user's contacts from Azet AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.1
20 | */
21 | class azet extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array(
29 | 'initial_get'=>'heslo',
30 | 'login_post'=>'OtvorPomoc',
31 | 'url_contacts'=>'adr_mail'
32 | );
33 |
34 | /**
35 | * Login function
36 | *
37 | * Makes all the necessary requests to authenticate
38 | * the current user to the server.
39 | *
40 | * @param string $user The current user.
41 | * @param string $pass The password for the current user.
42 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
43 | */
44 | public function login($user,$pass)
45 | {
46 | $this->resetDebugger();
47 | $this->service='azet';
48 | $this->service_user=$user;
49 | $this->service_password=$pass;
50 | if (!$this->init()) return false;
51 |
52 | $res=$this->get("http://emailnew.azet.sk/");
53 | if ($this->checkResponse("initial_get",$res))
54 | $this->updateDebugBuffer('initial_get',"http://emailnew.azet.sk/",'GET');
55 | else
56 | {
57 | $this->updateDebugBuffer('initial_get',"http://emailnew.azet.sk/",'GET',false);
58 | $this->debugRequest();
59 | $this->stopPlugin();
60 | return false;
61 | }
62 |
63 | $form_action=$this->getElementString($res,'action="','"');
64 | $post_elements=array('form[username]'=>$user,
65 | 'form[password]'=>$pass,
66 | 'Posliform'=>urldecode('Prihl%C3%A1si%C5%A5')
67 | );
68 | $res=$this->post($form_action,$post_elements,true);
69 | if ($this->checkResponse('login_post',$res))
70 | $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
71 | else
72 | {
73 | $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
74 | $this->debugRequest();
75 | $this->stopPlugin();
76 | return false;
77 | }
78 |
79 | $sid=$this->getElementString($res,'href="Adresar.phtml?&','&');
80 | $url_contacts="http://emailnew.azet.sk/Adresar.phtml?{$sid}&t_vypis=";
81 | file_put_contents($this->getLogoutPath(),$sid);
82 | $this->login_ok=$url_contacts;
83 | return true;
84 | }
85 |
86 | /**
87 | * Get the current user's contacts
88 | *
89 | * Makes all the necesarry requests to import
90 | * the current user's contacts
91 | *
92 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
93 | */
94 | public function getMyContacts()
95 | {
96 | if (!$this->login_ok)
97 | {
98 | $this->debugRequest();
99 | $this->stopPlugin();
100 | return false;
101 | }
102 | else $url=$this->login_ok;
103 | $res=$this->get($url);
104 | if ($this->checkResponse("url_contacts",$res))
105 | $this->updateDebugBuffer('url_contacts',$url,'GET');
106 | else
107 | {
108 | $this->updateDebugBuffer('url_contacts',$url,'GET',false);
109 | $this->debugRequest();
110 | $this->stopPlugin();
111 | return false;
112 | }
113 | $contacts=array();
114 | $contacts_name=$this->getElementDOM($res,"//td[@class='adr_meno']");
115 | $contacts_email=$this->getElementDOM($res,"//td[@class='adr_mail']");
116 | if (isset($contacts_email)) foreach($contacts_email as $key=>$value) if (isset($contacts_name[$key])) $contacts[trim(preg_replace('/[^(\x20-\x7F)]*/','',(string)$value))]=array('first_name'=>$contacts_name[$key],'email_1'=>trim(preg_replace('/[^(\x20-\x7F)]*/','',(string)$value)));
117 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
118 | return $this->returnContacts($contacts);
119 | }
120 |
121 | /**
122 | * Terminate session
123 | *
124 | * Terminates the current user's session,
125 | * debugs the request and reset's the internal
126 | * debudder.
127 | *
128 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
129 | */
130 | public function logout()
131 | {
132 | if (!$this->checkSession()) return false;
133 | if (file_exists($this->getLogoutPath()))
134 | {
135 | $sid=file_get_contents($this->getLogoutPath());
136 | $url_logout="http://moje.azet.sk/odhlasenie.phtml?$sid'";
137 | $res=$this->get($url_logout,true);
138 | }
139 | $this->debugRequest();
140 | $this->resetDebugger();
141 | $this->stopPlugin();
142 | return true;
143 | }
144 |
145 | }
146 |
147 | ?>
--------------------------------------------------------------------------------
/plugins/badoo.plg.php:
--------------------------------------------------------------------------------
1 | 'Badoo',
8 | 'version'=>'1.0.5',
9 | 'description'=>"Get the contacts from a badoo.com account",
10 | 'base_version'=>'1.6.7',
11 | 'type'=>'social',
12 | 'check_url'=>'http://www.badoo.com/',
13 | 'requirement'=>'email',
14 | 'allowed_domains'=>false,
15 | );
16 | class badoo extends openinviter_base
17 | {
18 | private $login_ok=false;
19 | public $showContacts=true;
20 | public $internalError=false;
21 | protected $timeout=30;
22 |
23 | public $debug_array=array(
24 | 'login_post'=>'location',
25 | 'get_friends'=>'name',
26 | );
27 |
28 | /**
29 | * Login function
30 | *
31 | * Makes all the necessary requests to authenticate
32 | * the current user to the server.
33 | *
34 | * @param string $user The current user.
35 | * @param string $pass The password for the current user.
36 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
37 | */
38 | public function login($user,$pass)
39 | {
40 | $this->resetDebugger();
41 | $this->service='badoo';
42 | $this->service_user=$user;
43 | $this->service_password=$pass;
44 |
45 | if (!$this->init()) return false;
46 |
47 | $res = $this->get('http://badoo.com/?lang_id=3',true);
48 | $url = $this->getElementString($res,'
');
49 | $res = $this->get("http://badoo.com/signin/".$url,true);
50 | $post_elements=array();
51 | $post_elements['email']=$user;
52 | $post_elements['password']=$pass;
53 | $post_elements['post']='';
54 | $res = $this->post("http://badoo.com/signin/",$post_elements,true);
55 | if ($this->checkResponse("login_post",$res))
56 | $this->updateDebugBuffer('login_post',"http://badoo.com/signin/",'POST');
57 | else
58 | {
59 | $this->updateDebugBuffer('login_post',"http://badoo.com/signin/",'POST',false);
60 | $this->debugRequest();
61 | $this->stopPlugin();
62 | return false;
63 | }
64 | $id=$this->getElementString($res,"user_id=","&");
65 | if (!is_numeric($id)) return false;
66 | $this->login_ok=$id;
67 | return true;
68 | }
69 |
70 | /**
71 | * Get the current user's contacts
72 | *
73 | * Makes all the necesarry requests to import
74 | * the current user's contacts
75 | *
76 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
77 | */
78 | public function getMyContacts()
79 | {
80 | if (!$this->login_ok)
81 | {
82 | $this->debugRequest();
83 | $this->stopPlugin();
84 | return false;
85 | }
86 | else $id=$this->login_ok;
87 | $res=$this->get("http://badoo.com/{$id}/contacts/subscriptions.phtml",true);
88 | if ($this->checkResponse("get_friends",$res))
89 | $this->updateDebugBuffer('get_friends',"http://badoo.com/{$id}/contacts/subscriptions.phtml",'GET');
90 | else
91 | {
92 | $this->updateDebugBuffer('get_friends',"http://badoo.com/{$id}/contacts/subscriptions.phtml",'GET',false);
93 | $this->debugRequest();
94 | $this->stopPlugin();
95 | return false;
96 | }
97 | $contacts=array();
98 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
99 | $xpath=new DOMXPath($doc);$query="//a[@class='name']";$data=$xpath->query($query);
100 | foreach($data as $node)
101 | {
102 | $name=$node->nodeValue;
103 | $cId=str_replace('uid1','01',$node->getAttribute('id'));
104 | $href="http://badoo.com/{$id}/contacts/message/{$cId}";
105 | if (!empty($href)) $contacts[$href]=$name;
106 | }
107 | return $contacts;
108 | }
109 | /**
110 | * Send message to contacts
111 | *
112 | * Sends a message to the contacts using
113 | * the service's inernal messaging system
114 | *
115 | * @param string $cookie_file The location of the cookies file for the current session
116 | * @param string $message The message being sent to your contacts
117 | * @param array $contacts An array of the contacts that will receive the message
118 | * @return mixed FALSE on failure.
119 | */
120 | public function sendMessage($session_id,$message,$contacts)
121 | {
122 | $countMessages=0;
123 | foreach($contacts as $url=>$name)
124 | {
125 | $countMessages++;
126 | $res = $this->get($url."?swf=1");
127 | $master_id = $this->getElementString($url,'http://badoo.com/','/');
128 | $post_url = "http://badoo.com/{$master_id}/contacts/ws-post.phtml";
129 | $post_elements = array('s1'=>$this->getElementString($res,'name="s1" value="','"'),'contact_user_id'=>$this->getElementString($res,'name="contact_user_id" value="','"'),'action'=>'add');
130 | $post_elements['flash'] = '1';
131 | $post_elements['message'] = $message['subject']."
".$message['body'];
132 | $res = $this->post($post_url,$post_elements,true);
133 | sleep($this->messageDelay);
134 | if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
135 | }
136 | return true;
137 | }
138 | /**
139 | * Terminate session
140 | *
141 | * Terminates the current user's session,
142 | * debugs the request and reset's the internal
143 | * debudder.
144 | *
145 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
146 | */
147 | public function logout()
148 | {
149 | if (!$this->checkSession()) return false;
150 | $res=$this->get("http://badoo.com/signout/");
151 | $this->debugRequest();
152 | $this->resetDebugger();
153 | $this->stopPlugin();
154 | return true;
155 | }
156 | }
157 | ?>
158 |
--------------------------------------------------------------------------------
/plugins/bigstring.plg.php:
--------------------------------------------------------------------------------
1 | 'Bigstring',
4 | 'version'=>'1.0.5',
5 | 'description'=>"Get the contacts from an Bigstring account",
6 | 'base_version'=>'1.8.0',
7 | 'type'=>'email',
8 | 'check_url'=>'http://www.bigstring.com/?old=1',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Bigstring Plugin
15 | *
16 | * Imports user's contacts from Bigstring AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class bigstring extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array('initial_get'=>'user',
29 | 'login_post'=>'progress_upload_bar',
30 | 'url_contacts'=>'contacts'
31 | );
32 |
33 | /**
34 | * Login function
35 | *
36 | * Makes all the necessary requests to authenticate
37 | * the current user to the server.
38 | *
39 | * @param string $user The current user.
40 | * @param string $pass The password for the current user.
41 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
42 | */
43 | public function login($user, $pass)
44 | {
45 | $this->resetDebugger();
46 | $this->service='bigstring';
47 | $this->service_user=$user;
48 | $this->service_password=$pass;
49 | if (!$this->init()) return false;
50 |
51 | $res = $this->get("http://www.bigstring.com");
52 | if ($this->checkResponse("initial_get",$res))
53 | $this->updateDebugBuffer('initial_get',"http://www.bigstring.com",'GET');
54 | else
55 | {
56 | $this->updateDebugBuffer('initial_get',"http://www.bigstring.com",'GET',false);
57 | $this->debugRequest();
58 | $this->stopPlugin();
59 | return false;
60 | }
61 |
62 | $form_action='http://www.bigstring.com/mail/index.php';
63 | $post_elements=array('user'=>$user,'pass'=>$pass);
64 | $res=$this->post($form_action,$post_elements,true);
65 | $res=$this->get("http://www.bigstring.com/mail/mailbox.php",true);
66 | if ($this->checkResponse("login_post",$res))
67 | $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
68 | else
69 | {
70 | $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
71 | $this->debugRequest();
72 | $this->stopPlugin();
73 | return false;
74 | }
75 |
76 | $url_contacts="http://www.bigstring.com/mail/ajax/contacts/viewcontact.php";
77 | $this->login_ok=$url_contacts;
78 | return true;
79 | }
80 |
81 | /**
82 | * Get the current user's contacts
83 | *
84 | * Makes all the necesarry requests to import
85 | * the current user's contacts
86 | *
87 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
88 | */
89 | public function getMyContacts()
90 | {
91 | if (!$this->login_ok)
92 | {
93 | $this->debugRequest();
94 | $this->stopPlugin();
95 | return false;
96 | }
97 | else $url=$this->login_ok;
98 | $post_elements=array('user'=>$this->service_user."@bigstring.com",'pass'=>$this->service_password,"lang"=>"en");
99 | $res=$this->post($url,$post_elements);
100 | if ($this->checkResponse("url_contacts",$res))
101 | $this->updateDebugBuffer('url_contacts',$url,'POST');
102 | else
103 | {
104 | $this->updateDebugBuffer('url_contacts',$url,'POST',false);
105 | $this->debugRequest();
106 | $this->stopPlugin();
107 | return false;
108 | }
109 |
110 | $contacts=array();
111 | if (preg_match_all("#\(\'\'\,\'(.+)\'\,\'(.+)\'#U",$res,$matches))
112 | {
113 | foreach($matches[2] as $key=>$name)
114 | if (!empty($matches[1][$key])) $contacts[$matches[1][$key]]=array('email_1'=>$matches[1][$key],'first_name'=>$name);
115 | }
116 | return $this->returnContacts($contacts);
117 | }
118 |
119 | /**
120 | * Terminate session
121 | *
122 | * Terminates the current user's session,
123 | * debugs the request and reset's the internal
124 | * debudder.
125 | *
126 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
127 | */
128 | public function logout()
129 | {
130 | if (!$this->checkSession()) return false;
131 | $res=$this->get("http://www.bigstring.com/email/logout.php",true);
132 | $this->debugRequest();
133 | $this->resetDebugger();
134 | $this->stopPlugin();
135 | }
136 | }
137 | ?>
--------------------------------------------------------------------------------
/plugins/evite.plg.php:
--------------------------------------------------------------------------------
1 | 'Evite',
4 | 'version'=>'1.0.4',
5 | 'description'=>"Get the contacts from an Evite account",
6 | 'base_version'=>'1.6.7',
7 | 'type'=>'email',
8 | 'check_url'=>'http://www.evite.com/',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>array('/(evite.com)/i'),
11 | 'imported_details'=>array('first_name','last_name','email_1'),
12 | );
13 | /**
14 | * Evite Plugin
15 | *
16 | * Imports user's contacts from Evite's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.1
20 | */
21 | class evite extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | protected $timeout=30;
26 | public $debug_array=array(
27 | 'initial_get'=>'submitForm',
28 | 'login_post'=>'Log out',
29 | 'get_contacts'=>'abCheck'
30 | );
31 |
32 | /**
33 | * Login function
34 | *
35 | * Makes all the necessary requests to authenticate
36 | * the current user to the server.
37 | *
38 | * @param string $user The current user.
39 | * @param string $pass The password for the current user.
40 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
41 | */
42 | public function login($user,$pass)
43 | {
44 | $this->resetDebugger();
45 | $this->service='evite';
46 | $this->service_user=$user;
47 | $this->service_password=$pass;
48 | if (!$this->init()) return false;
49 | $res=$this->get("http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",true);
50 | if ($this->checkResponse('initial_get',$res))
51 | $this->updateDebugBuffer('initial_get',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET');
52 | else
53 | {
54 | $this->updateDebugBuffer('initial_get',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET',false);
55 | $this->debugRequest();
56 | $this->stopPlugin();
57 | return false;
58 | }
59 |
60 | $form_action="http://www.evite.com/loginRegForm";
61 | $post_elements=array('cmd'=>'login','submitForm'=>'true','redirect'=>'http://www.evite.com/pages/addrbook/contactList.jsp','emailLogin'=>$user,'passLogin'=>$pass,'rememberMe'=>'on');
62 | $res=$this->post($form_action,$post_elements,true);
63 | if ($this->checkResponse("login_post",$res))
64 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
65 | else
66 | {
67 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
68 | $this->debugRequest();
69 | $this->stopPlugin();
70 | return false;
71 | }
72 |
73 | $this->login_ok="http://www.evite.com/pages/addrbook/contactList.jsp";
74 | return true;
75 | }
76 |
77 | /**
78 | * Get the current user's contacts
79 | *
80 | * Makes all the necesarry requests to import
81 | * the current user's contacts
82 | *
83 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
84 | */
85 | public function getMyContacts()
86 | {
87 | if (!$this->login_ok)
88 | {
89 | $this->debugRequest();
90 | $this->stopPlugin();
91 | return false;
92 | }
93 | else $url = $this->login_ok;
94 | $res=$this->get($url);
95 | if ($this->checkResponse('get_contacts',$res))
96 | $this->updateDebugBuffer('get_contacts',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET');
97 | else
98 | {
99 | $this->updateDebugBuffer('get_contacts',"http://www.evite.com/loginRegForm?redirect=/pages/addrbook/contactList.jsp",'GET',false);
100 | $this->debugRequest();
101 | $this->stopPlugin();
102 | return false;
103 | }
104 |
105 | $contacts=array();
106 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
107 | $xpath=new DOMXPath($doc);$query="//td[@class='abCheck']";$data=$xpath->query($query);$name="";
108 | foreach ($data as $node)
109 | {
110 | if ($node->getAttribute('style')=='padding-left:0px;width:149px;') $name.=" ".trim($node->nodeValue);
111 | if ($node->getAttribute('style')=='width:219px;') {$email=trim((string)$node->nodeValue);$contacts[$email]=array('first_name'=>$name,'email_1'=>$email);$name="";}
112 | }
113 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
114 | return $this->returnContacts($contacts);
115 | }
116 |
117 | /**
118 | * Terminate session
119 | *
120 | * Terminates the current user's session,
121 | * debugs the request and reset's the internal
122 | * debudder.
123 | *
124 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
125 | */
126 | public function logout()
127 | {
128 | if (!$this->checkSession()) return false;
129 | $logout_url="http://www.evite.com/logout?linkTagger=header";
130 | $res = $this->get($logout_url,true);
131 | $this->debugRequest();
132 | $this->resetDebugger();
133 | $this->stopPlugin();
134 | return true;
135 | }
136 | }
137 | ?>
--------------------------------------------------------------------------------
/plugins/faces.plg.php:
--------------------------------------------------------------------------------
1 | 'Faces',
7 | 'version'=>'1.0.6',
8 | 'description'=>"Get the contacts from a Faces account",
9 | 'base_version'=>'1.8.0',
10 | 'type'=>'social',
11 | 'check_url'=>'http://www.faces.com/',
12 | 'requirement'=>'user',
13 | 'allowed_domains'=>false,
14 | );
15 | /**
16 | * Faces Plugin
17 | *
18 | * Import Friends from Faces
19 | * You can Write Private Messages using Faces system
20 | *
21 | * @author OpenInviter
22 | * @version 1.0.0
23 | */
24 | class faces extends openinviter_base
25 | {
26 | private $login_ok=false;
27 | public $showContacts=true;
28 | public $internalError=false;
29 | protected $timeout=30;
30 |
31 | public $debug_array=array(
32 | 'initial_get'=>'loginName',
33 | 'login_post'=>'logout',
34 | 'get_friends'=>'name',
35 | 'send_message'=>'Inbox'
36 | );
37 |
38 | /**
39 | * Login function
40 | *
41 | * Makes all the necessary requests to authenticate
42 | * the current user to the server.
43 | *
44 | * @param string $user The current user.
45 | * @param string $pass The password for the current user.
46 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
47 | */
48 | public function login($user,$pass)
49 | {
50 | $this->resetDebugger();
51 | $this->service='faces';
52 | $this->service_user=$user;
53 | $this->service_password=$pass;
54 | if (!$this->init()) return false;
55 |
56 | $res=$this->get("http://www.faces.com/",true);
57 | if ($this->checkResponse("initial_get",$res))
58 | $this->updateDebugBuffer('initial_get',"http://www.faces.com/",'GET');
59 | else
60 | {
61 | $this->updateDebugBuffer('initial_get',"http://www.faces.com/",'GET',false);
62 | $this->debugRequest();
63 | $this->stopPlugin();
64 | return false;
65 | }
66 |
67 | $form_action="http://www.faces.com/login";
68 | $post_elements=array('loginName'=>$user,
69 | 'password'=>$pass,
70 | 'action'=>'log in'
71 | );
72 | $res=$this->post($form_action,$post_elements,true);
73 | if ($this->checkResponse("login_post",$res))
74 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
75 | else
76 | {
77 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
78 | $this->debugRequest();
79 | $this->stopPlugin();
80 | return false;
81 | }
82 | $url_friends='http://www.faces.com/friends';
83 | $this->login_ok=$url_friends;
84 | return true;
85 | }
86 |
87 | /**
88 | * Get the current user's contacts
89 | *
90 | * Makes all the necesarry requests to import
91 | * the current user's contacts
92 | *
93 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
94 | */
95 | public function getMyContacts()
96 | {
97 | if (!$this->login_ok)
98 | {
99 | $this->debugRequest();
100 | $this->stopPlugin();
101 | return false;
102 | }
103 | else $url=$this->login_ok;
104 | $res=$this->get($url);
105 | if ($this->checkResponse("get_friends",$res))
106 | $this->updateDebugBuffer('get_friends',$url,'GET');
107 | else
108 | {
109 | $this->updateDebugBuffer('get_friends',$url,'GET',false);
110 | $this->debugRequest();
111 | $this->stopPlugin();
112 | return false;
113 | }
114 |
115 | $contacts=array();
116 | $names_array=$this->getElementDOM($res,"//a[@class='name']");
117 | if (!empty($names_array))
118 | foreach($names_array as $key=>$value) $contacts[$value]=$value;
119 | return $contacts;
120 | }
121 |
122 | /**
123 | * Send message to contacts
124 | *
125 | * Sends a message to the contacts using
126 | * the service's inernal messaging system
127 | *
128 | * @param string $cookie_file The location of the cookies file for the current session
129 | * @param string $message The message being sent to your contacts
130 | * @param array $contacts An array of the contacts that will receive the message
131 | * @return mixed FALSE on failure.
132 | */
133 | public function sendMessage($session_id,$message,$contacts)
134 | {
135 | $form_action="http://www.faces.com/mailbox/compose";
136 | $post_elements=array('scoop'=>'scoop',
137 | 'subject'=>$message['subject'],
138 | 'message'=>$message['body'],
139 | 'send'=>'Send'
140 | );
141 | $res=$this->post($form_action,$post_elements,true);
142 | if ($this->checkResponse("send_message",$res))
143 | $this->updateDebugBuffer('send_message',"{$form_action}",'POST',true,$post_elements);
144 | else
145 | {
146 | $this->updateDebugBuffer('send_message',"{$form_action}",'POST',false,$post_elements);
147 | $this->debugRequest();
148 | $this->stopPlugin();
149 | return false;
150 | }
151 | }
152 |
153 | /**
154 | * Terminate session
155 | *
156 | * Terminates the current user's session,
157 | * debugs the request and reset's the internal
158 | * debudder.
159 | *
160 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
161 | */
162 | public function logout()
163 | {
164 | if (!$this->checkSession()) return false;
165 | $res=$this->get("http://www.faces.com/logout");
166 | $this->debugRequest();
167 | $this->resetDebugger();
168 | $this->stopPlugin();
169 | return true;
170 | }
171 | }
172 |
173 | ?>
--------------------------------------------------------------------------------
/plugins/famiva.plg.php:
--------------------------------------------------------------------------------
1 | 'Famiva',
7 | 'version'=>'1.0.3',
8 | 'description'=>"Get the contacts from a Famiva account",
9 | 'base_version'=>'1.8.0',
10 | 'type'=>'social',
11 | 'check_url'=>'http://www.famiva.com/',
12 | 'requirement'=>'email',
13 | 'allowed_domains'=>false,
14 | );
15 | /**
16 | * Famiva Plugin
17 | *
18 | * Import Friends from Famiva
19 | * You can Write Private Messages using Famiva system
20 | *
21 | * @author OpenInviter
22 | * @version 1.0.0
23 | */
24 | class famiva extends openinviter_base
25 | {
26 | private $login_ok=false;
27 | public $showContacts=true;
28 | public $internalError=false;
29 | protected $timeout=30;
30 |
31 | public $debug_array=array(
32 | 'initial_get'=>'member[email]',
33 | 'login_post'=>'logout',
34 | 'get_friends'=>'data',
35 | );
36 |
37 | /**
38 | * Login function
39 | *
40 | * Makes all the necessary requests to authenticate
41 | * the current user to the server.
42 | *
43 | * @param string $user The current user.
44 | * @param string $pass The password for the current user.
45 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
46 | */
47 | public function login($user,$pass)
48 | {
49 | $this->resetDebugger();
50 | $this->service='famiva';
51 | $this->service_user=$user;
52 | $this->service_password=$pass;
53 | if (!$this->init()) return false;
54 |
55 | $res=$this->get("http://www.famiva.com/",true);
56 | if ($this->checkResponse("initial_get",$res))
57 | $this->updateDebugBuffer('initial_get',"http://www.famiva.com/",'GET');
58 | else
59 | {
60 | $this->updateDebugBuffer('initial_get',"http://www.famiva.com/",'GET',false);
61 | $this->debugRequest();
62 | $this->stopPlugin();
63 | return false;
64 | }
65 |
66 | $form_action="http://famiva.com/login/login";
67 | $post_elements=array('member[email]'=>$user,
68 | 'member[password]'=>$pass,
69 | 'remember_me'=>true,
70 | 'commit'=>'Login'
71 | );
72 | $res=$this->post($form_action,$post_elements,true);
73 | if ($this->checkResponse("login_post",$res))
74 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
75 | else
76 | {
77 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
78 | $this->debugRequest();
79 | $this->stopPlugin();
80 | return false;
81 | }
82 | $url_friends='http://famiva.com/members/explore';
83 | $this->login_ok=$url_friends;
84 | return true;
85 | }
86 |
87 | /**
88 | * Get the current user's contacts
89 | *
90 | * Makes all the necesarry requests to import
91 | * the current user's contacts
92 | *
93 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
94 | */
95 | public function getMyContacts()
96 | {
97 | if (!$this->login_ok)
98 | {
99 | $this->debugRequest();
100 | $this->stopPlugin();
101 | return false;
102 | }
103 | else $url=$this->login_ok;
104 | $res=$this->get($url);
105 | if ($this->checkResponse("get_friends",$res))
106 | $this->updateDebugBuffer('get_friends',$url,'GET');
107 | else
108 | {
109 | $this->updateDebugBuffer('get_friends',$url,'GET',false);
110 | $this->debugRequest();
111 | $this->stopPlugin();
112 | return false;
113 | }
114 |
115 | $contacts=array();
116 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
117 | $xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
118 | foreach($data as $node)
119 | if (strpos($node->getAttribute('href'),'profiles/view')!=false)
120 | {
121 | $name=$node->nodeValue;
122 | $email=$node->parentNode->nextSibling->nextSibling->nodeValue;
123 | if (!empty($email)) $contacts[$email]=!empty($name)?$name:false;
124 | }
125 | if (isset($contacts[$this->service_user])) unset($contacts[$this->service_user]);
126 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
127 | return $contacts;
128 | }
129 |
130 | /**
131 | * Terminate session
132 | *
133 | * Terminates the current user's session,
134 | * debugs the request and reset's the internal
135 | * debudder.
136 | *
137 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
138 | */
139 | public function logout()
140 | {
141 | if (!$this->checkSession()) return false;
142 | $res=$this->get("http://www.famiva.com/login/logout");
143 | $this->debugRequest();
144 | $this->resetDebugger();
145 | $this->stopPlugin();
146 | return true;
147 | }
148 | }
149 |
150 | ?>
--------------------------------------------------------------------------------
/plugins/freemail.plg.php:
--------------------------------------------------------------------------------
1 | 'Freemail',
4 | 'version'=>'1.0.5',
5 | 'description'=>"Get the contacts from a freemail.hu account",
6 | 'base_version'=>'1.8.0',
7 | 'type'=>'email',
8 | 'check_url'=>'http://freemail.hu/',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>array('/(freemail.hu)/i'),
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Freemail.hu Plugin
15 | *
16 | * Imports user's contacts from Freemail.hu AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class freemail extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array(
29 | 'initial_get'=>'userwithoutdomain',
30 | 'login_post'=>'auth=ok',
31 | 'url_adressbook'=>'first',
32 | );
33 |
34 | /**
35 | * Login function
36 | * fr
37 | * Makes all the necessary requests to authenticate
38 | * the current user to the server.
39 | *
40 | * @param string $user The current user.
41 | * @param string $pass The password for the current user.
42 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
43 | */
44 | public function login($user,$pass)
45 | {
46 | $this->resetDebugger();
47 | $this->service='freemail';
48 | $this->service_user=$user;
49 | $this->service_password=$pass;
50 | if (!$this->init()) return false;
51 |
52 | $res=$this->get("http://freemail.hu/levelezes/login.fm");
53 | if ($this->checkResponse("initial_get",$res))
54 | $this->updateDebugBuffer('initial_get',"http://freemail.hu/levelezes/login.fm",'GET');
55 | else
56 | {
57 | $this->updateDebugBuffer('initial_get',"http://freemail.hu/levelezes/login.fm",'GET',false);
58 | $this->debugRequest();
59 | $this->stopPlugin();
60 | return false;
61 | }
62 |
63 | $userStriped=str_replace("@freemail.hu","",$user);
64 | $form_action="http://belepes.t-online.hu/auth.html";
65 | $post_elements=array('.formId'=>'commands.PlusAuth',
66 | 'backurl'=>'http://freemail.hu/levelezes/auth.fm?cmd=checkuser&page=levelezes',
67 | 'cmd'=>'plusauth',
68 | 'remoteform'=>1,
69 | 'user'=>$user,
70 | 'userwithoutdomain'=>$userStriped,
71 | 'pass'=>$pass,
72 | );
73 | $res=$this->post($form_action,$post_elements,true);
74 | if ($this->checkResponse('login_post',$res))
75 | $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
76 | else
77 | {
78 | $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
79 | $this->debugRequest();
80 | $this->stopPlugin();
81 | return false;
82 | }
83 | $url_redirect=$this->getElementString($res,'url=','"');$url_adressbook=str_replace(array('levelezes/auth.fm?cmd=checkuser&page=levelezes&status=ok&auth=ok&','tid','email','freul_Id.hu'),array('cc/fsAddressBook.do?','ul_Tid','ul_Id','freemail.hu'),$url_redirect);
84 | $this->login_ok=$url_adressbook;
85 | return true;
86 | }
87 |
88 | /**
89 | * Get the current user's contacts
90 | *
91 | * Makes all the necesarry requests to import
92 | * the current user's contacts
93 | *
94 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
95 | */
96 | public function getMyContacts()
97 | {
98 | if (!$this->login_ok)
99 | {
100 | $this->debugRequest();
101 | $this->stopPlugin();
102 | return false;
103 | }
104 | else $url=$this->login_ok;
105 | $res=$this->get($url,true);
106 | if ($this->checkResponse("url_adressbook",$res))
107 | $this->updateDebugBuffer('url_adressbook',$url,'GET');
108 | else
109 | {
110 | $this->updateDebugBuffer('url_adressbook',$url,'GET',false);
111 | $this->debugRequest();
112 | $this->stopPlugin();
113 | return false;
114 | }
115 | $contacts=array();
116 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
117 | $xpath=new DOMXPath($doc);$query="//tr[@class='data']";$data=$xpath->query($query);
118 | foreach($data as $node)
119 | {
120 | $names=trim(preg_replace('/[^(\x20-\x7F)]*/','',utf8_decode((string)$node->childNodes->item(2)->nodeValue)));
121 | $emails=trim(preg_replace('/[^(\x20-\x7F)]*/','',(utf8_decode((string)$node->childNodes->item(4)->nodeValue))));
122 | if (!empty($emails)) $contacts[$emails]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$emails);
123 | }
124 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
125 | return $this->returnContacts($contacts);
126 | }
127 |
128 | /**
129 | * Terminate session
130 | *
131 | * Terminates the current user's session,
132 | * debugs the request and reset's the internal
133 | * debudder.
134 | *
135 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
136 | */
137 | public function logout()
138 | {
139 | if (!$this->checkSession()) return false;
140 | $res=$this->get('http://freemail.hu/levelezes/main.fm?page=logout',true);
141 | $this->debugRequest();
142 | $this->resetDebugger();
143 | $this->stopPlugin();
144 | return true;
145 | }
146 |
147 | }
148 |
149 | ?>
--------------------------------------------------------------------------------
/plugins/graffiti.plg.php:
--------------------------------------------------------------------------------
1 | 'Grafitti',
4 | 'version'=>'1.0.2',
5 | 'description'=>"Get the contacts from a Graffiti account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://www.graffiti.net/scripts/common/index.main?signin=1&lang=us',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Bordermail Plugin
15 | *
16 | * Imports user's contacts from Bordermail AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class graffiti extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array(
29 | 'initial_get'=>'login',
30 | 'login_post'=>'frontpage',
31 | 'url_contacts'=>'input'
32 |
33 | );
34 |
35 | /**
36 | * Login function
37 | *
38 | * Makes all the necessary requests to authenticate
39 | * the current user to the server.
40 | *
41 | * @param string $user The current user.
42 | * @param string $pass The password for the current user.
43 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
44 | */
45 | public function login($user,$pass)
46 | {
47 | $this->resetDebugger();
48 | $this->service='graffiti';
49 | $this->service_user=$user;
50 | $this->service_password=$pass;
51 | if (!$this->init()) return false;
52 |
53 | $res=$this->get("http://www.graffiti.net/scripts/common/index.main?signin=1&lang=us");
54 | if ($this->checkResponse("initial_get",$res))
55 | $this->updateDebugBuffer('initial_get',"http://www.graffiti.net/scripts/common/index.main?signin=1&lang=us",'GET');
56 | else
57 | {
58 | $this->updateDebugBuffer('initial_get',"http://www.graffiti.net/scripts/common/index.main?signin=1&lang=us",'GET',false);
59 | $this->debugRequest();
60 | $this->stopPlugin();
61 | return false;
62 | }
63 |
64 | $form_action="http://www.graffiti.net/scripts/common/proxy.main";
65 | $post_elements=array('domain'=>'graffiti.net','show_frame'=>'Enter','login'=>$user,'password'=>$pass,'v'=>$this->getElementString($res,'name="v" value="','"'),'u'=>$this->getElementString($res,'name="u" value="','"'));
66 | $res=$this->post($form_action,$post_elements,true);
67 | if ($this->checkResponse('login_post',$res))
68 | $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
69 | else
70 | {
71 | $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
72 | $this->debugRequest();
73 | $this->stopPlugin();
74 | return false;
75 | }
76 |
77 | $this->login_ok="http://mymail.graffiti.net/scripts/addr/addressbook.cgi?showaddressbook=1";
78 | return true;
79 | }
80 |
81 | /**
82 | * Get the current user's contacts
83 | *
84 | * Makes all the necesarry requests to import
85 | * the current user's contacts
86 | *
87 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
88 | */
89 | public function getMyContacts()
90 | {
91 | if (!$this->login_ok)
92 | {
93 | $this->debugRequest();
94 | $this->stopPlugin();
95 | return false;
96 | }
97 | else $url=$this->login_ok;
98 | $res=$this->get($url,true);
99 | if ($this->checkResponse("url_contacts",$res))
100 | $this->updateDebugBuffer('url_contacts',$url,'GET');
101 | else
102 | {
103 | $this->updateDebugBuffer('url_contacts',$url,'GET',false);
104 | $this->debugRequest();
105 | $this->stopPlugin();
106 | return false;
107 | }
108 |
109 | $contacts=array();
110 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
111 | $xpath=new DOMXPath($doc);$query="//input";$data=$xpath->query($query);
112 | foreach ($data as $node)
113 | {
114 | $nodeValue=$node->getAttribute('value');$email=$this->getElementString($nodeValue,'<','>');$name=$this->getElementString($nodeValue,'to_"','"');
115 | if (!empty($email)) $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
116 | }
117 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
118 | return $this->returnContacts($contacts);
119 | }
120 |
121 | /**
122 | * Terminate session
123 | *
124 | * Terminates the current user's session,
125 | * debugs the request and reset's the internal
126 | * debudder.
127 | *
128 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
129 | */
130 | public function logout()
131 | {
132 | if (!$this->checkSession()) return false;
133 | $res=$this->get("http://mymail.graffiti.net/scripts/mail/Outblaze.mail?logout=1&.noframe=1&a=1&",true);
134 | $this->debugRequest();
135 | $this->resetDebugger();
136 | $this->stopPlugin();
137 | return true;
138 | }
139 |
140 | }
141 |
142 | ?>
--------------------------------------------------------------------------------
/plugins/hotmail.plg.php:
--------------------------------------------------------------------------------
1 | 'Live/Hotmail',
4 | 'version'=>'1.6.8',
5 | 'description'=>"Get the contacts from a Windows Live/Hotmail account",
6 | 'base_version'=>'1.8.4',
7 | 'type'=>'email',
8 | 'check_url'=>'http://login.live.com/login.srf?id=2',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>array('/(hotmail)/i','/(live)/i','/(msn)/i','/(chaishop)/i'),
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Live/Hotmail Plugin
15 | *
16 | * Imports user's contacts from Windows Live's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.6.8
20 | */
21 | class hotmail extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 | protected $userAgent='Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 3650;424) Opera 6.10 [en]';
28 |
29 | public $debug_array=array(
30 | 'initial_get'=>'srf_uPost',
31 | 'login_post'=>'cid',
32 | 'get_contacts'=>'compose',
33 | );
34 |
35 | /**
36 | * Login function
37 | *
38 | * Makes all the necessary requests to authenticate
39 | * the current user to the server.
40 | *
41 | * @param string $user The current user.
42 | * @param string $pass The password for the current user.
43 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
44 | */
45 | public function login($user,$pass)
46 | {
47 | $this->resetDebugger();
48 | $this->service='hotmail';
49 | $this->service_user=$user;
50 | $this->service_password=$pass;
51 | if (!$this->init()) return false;
52 | $url='https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1308560124&rver=6.1.6206.0&wp=MBI&wreply=http:%2F%2Fcid-5305094c4e322785.profile.live.com%2Fcontacts%3Fwa%3Dwsignin1.0%26lc%3D1033&lc=1033&id=73625&pcexp=false&mkt=en-US';
53 | $res=$this->get($url,true);
54 | if ($this->checkResponse('initial_get',$res)) $this->updateDebugBuffer('initial_get',$url,'GET');
55 | else{
56 | $this->updateDebugBuffer('initial_get',$url,'GET',false);
57 | $this->debugRequest();
58 | $this->stopPlugin();
59 | return false;
60 | }
61 | $form_action=$this->getElementString($res,"srf_uPost='","'");
62 | preg_match('#name\=\"PPFT\" id\=\"(.+)\" value\=\"(.+)\"#U',$res,$matches);
63 | $post_elements=array('PPFT'=>$matches[2],
64 | 'LoginOptions'=>1,
65 | 'NewUser'=>1,
66 | 'MobilePost'=>1,
67 | 'PPSX'=>'P',
68 | 'PwdPad'=>'',
69 | 'type'=>11,
70 | 'i3'=>25228,
71 | 'm1'=>1280,
72 | 'm2'=>1024,
73 | 'm3'=>0,
74 | 'i12'=>1,
75 | 'login'=>$user,
76 | 'passwd'=>$pass
77 | );
78 | $res=$this->post($form_action,$post_elements);
79 | if ($this->checkResponse('login_post',$res)) $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
80 | else{
81 | $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
82 | $this->debugRequest();
83 | $this->stopPlugin();
84 | return false;
85 | }
86 | $this->login_ok='http://mprofile.live.com/';
87 | return true;
88 | }
89 |
90 | /**
91 | * Get the current user's contacts
92 | *
93 | * Makes all the necesarry requests to import
94 | * the current user's contacts
95 | *
96 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
97 | */
98 | public function getMyContacts()
99 | {
100 | if (!$this->login_ok)
101 | {
102 | $this->debugRequest();
103 | $this->stopPlugin();
104 | return false;
105 | }
106 | else $url=$this->login_ok;
107 | $res=$this->get($url);
108 | if ($this->checkResponse('get_contacts',$res)) $this->updateDebugBuffer('get_contacts',$url,'GET');
109 | else{
110 | $this->updateDebugBuffer('get_contacts',$url,'GET',false);
111 | $this->debugRequest();
112 | $this->stopPlugin();
113 | return false;
114 | }
115 | $page=0;
116 | $pagesString=$this->getElementString($res,'indexText" class="SecondaryText">(',')');
117 | if (!empty($pagesString)) $pagesArray=explode(" ",$pagesString);
118 | if (empty($pagesArray[3])) $pagesArray[3]=0;
119 | while($page<=$pagesArray[3])
120 | {
121 | preg_match_all("#compose\&to\=(.+)\&\;ru\=#U",$res,$emails);
122 | preg_match_all("#class=\"BoldText\" href\=\"\/contactinfo\.aspx\?contactid\=(.+)\"\>(.+)\<#U",$res,$names);
123 | if (!empty($emails[1]))
124 | foreach($emails[1] as $id=>$email)
125 | if (!empty($names[2][$id])) $contacts[str_replace('%2540','@',$email)]=array('email_1'=>str_replace('%2540','@',$email),'first_name'=>$names[2][$id]);
126 | $page++;
127 | $res=$this->get($url."?pg={$page}");
128 | if (empty($res)) break;
129 | }
130 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
131 | return $this->returnContacts($contacts);
132 | }
133 |
134 | /**
135 | * Terminate session
136 | *
137 | * Terminates the current user's session,
138 | * debugs the request and reset's the internal
139 | * debudder.
140 | *
141 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
142 | */
143 | public function logout()
144 | {
145 | if (!$this->checkSession()) return false;
146 | $res=$this->get("https://mid.live.com/si/logout.aspx",true);
147 | $this->debugRequest();
148 | $this->resetDebugger();
149 | $this->stopPlugin();
150 | return true;
151 | }
152 |
153 | }
154 | ?>
--------------------------------------------------------------------------------
/plugins/hushmail.plg.php:
--------------------------------------------------------------------------------
1 | 'Hushmail',
4 | 'version'=>'1.0.5',
5 | 'description'=>"Get the contacts from an Hushmail account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'https://m.hush.com/',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Hushmail Plugin
15 | *
16 | * Imports user's contacts from Hushmail's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class hushmail extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | protected $timeout=30;
26 | public $debug_array=array(
27 | 'initial_get'=>'passphrase',
28 | 'login_post'=>'3Dmobile',
29 | 'get_contacts'=>'compose_from',
30 | 'url_contacts'=>'listItem'
31 | );
32 |
33 | /**
34 | * Login function
35 | *
36 | * Makes all the necessary requests to authenticate
37 | * the current user to the server.
38 | *
39 | * @param string $user The current user.
40 | * @param string $pass The password for the current user.
41 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
42 | */
43 | public function login($user,$pass)
44 | {
45 | $this->resetDebugger();
46 | $this->service='hushmail';
47 | $this->service_user=$user;
48 | $this->service_password=$pass;
49 | if (!$this->init()) return false;
50 | $res=$this->get("https://m.hush.com/",true);
51 | if ($this->checkResponse('initial_get',$res))
52 | $this->updateDebugBuffer('initial_get',"https://m.hush.com/",'GET');
53 | else
54 | {
55 | $this->updateDebugBuffer('initial_get',"https://m.hush.com/",'GET',false);
56 | $this->debugRequest();
57 | $this->stopPlugin();
58 | return false;
59 | }
60 |
61 | $form_action='https://m.hush.com'.$this->getElementString($res,'action="','"');
62 | $post_elements=$this->getHiddenElements($res);$post_elements['user']=$user;$post_elements['passphrase']=$pass;
63 | $res=$this->post($form_action,$post_elements,true);
64 | if ($this->checkResponse("login_post",$res))
65 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
66 | else
67 | {
68 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
69 | $this->debugRequest();
70 | $this->stopPlugin();
71 | return false;
72 | }
73 | $url_compose="https://m.hush.com/m/{$user}@hushmail.com/compose?next=%3Fskin%3Dmobile%26save_skin%3D1";
74 | $this->login_ok=$url_compose;
75 | return true;
76 | }
77 |
78 | /**
79 | * Get the current user's contacts
80 | *
81 | * Makes all the necesarry requests to import
82 | * the current user's contacts
83 | *
84 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
85 | */
86 | public function getMyContacts()
87 | {
88 | if (!$this->login_ok)
89 | {
90 | $this->debugRequest();
91 | $this->stopPlugin();
92 | return false;
93 | }
94 | else $url = $this->login_ok;
95 | $res=$this->get($url);
96 | if ($this->checkResponse('get_contacts',$res))
97 | $this->updateDebugBuffer('get_contacts',$url,'GET');
98 | else
99 | {
100 | $this->updateDebugBuffer('get_contacts',$url,'GET',false);
101 | $this->debugRequest();
102 | $this->stopPlugin();
103 | return false;
104 | }
105 |
106 | $form_action="https://m.hush.com".$this->getElementString($res,'action="','"');
107 | $post_elements=$this->getHiddenElements($res);$post_elements['compose_from']="{$this->service_user}@hushmail.com";$post_elements['compose_encrypt']='on';$post_elements['compose_sign']='on';$post_elements['compose_save']='on';$post_elements['action']='Add contact (to)';
108 | $res=$this->post($form_action,$post_elements,true);
109 | if ($this->checkResponse("url_contacts",$res))
110 | $this->updateDebugBuffer('url_contacts',"{$form_action}",'POST',true,$post_elements);
111 | else
112 | {
113 | $this->updateDebugBuffer('url_contacts',"{$form_action}",'POST',false,$post_elements);
114 | $this->debugRequest();
115 | $this->stopPlugin();
116 | return false;
117 | }
118 |
119 |
120 | $contacts=array();
121 | $contacts_string_array=$this->getElementDOM($res,"//input[@type='checkbox']",'value');
122 | foreach($contacts_string_array as $temp)
123 | {
124 | $temp=str_replace('>','',str_replace('<','',str_replace('"','',urldecode($temp))));
125 | $contacts_array_temp=explode(' ',$temp);
126 | if (isset($contacts_array_temp[1])) $contacts[$contacts_array_temp[1]]=array('first_name'=>(isset($contacts_array_temp[0])?$contacts_array_temp[0]:false),'email_1'=>$contacts_array_temp[1]);
127 | }
128 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
129 | return $this->returnContacts($contacts);
130 | }
131 |
132 |
133 | /**
134 | * Terminate session
135 | *
136 | * Terminates the current user's session,
137 | * debugs the request and reset's the internal
138 | * debudder.
139 | *
140 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
141 | */
142 | public function logout()
143 | {
144 | if (!$this->checkSession()) return false;
145 | $logout_url="https://m.hush.com/authentication/caracuraa@hushmail.com/logout?skin=mobile&next_webapp_name=contacts_webapp&next_webapp_url_name=contacts";
146 | $res = $this->get($logout_url,true);
147 | $this->debugRequest();
148 | $this->resetDebugger();
149 | $this->stopPlugin();
150 | return true;
151 | }
152 | }
153 | ?>
--------------------------------------------------------------------------------
/plugins/india.plg.php:
--------------------------------------------------------------------------------
1 | 'India',
4 | 'version'=>'1.0.4',
5 | 'description'=>"Get the contacts from an India account",
6 | 'base_version'=>'1.8.4',
7 | 'type'=>'email',
8 | 'check_url'=>'http://mail.india.com/',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('email_1'),
12 | );
13 | /**
14 | * India plugin
15 | *
16 | * Imports user's contacts from India AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.1
20 | */
21 | class india extends OpenInviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array('initial_get'=>'authenticity_token',
29 | 'login_post'=>'mails/new',
30 | 'get_contacts'=>'mail'
31 | );
32 |
33 | /**
34 | * Login function
35 | *
36 | * Makes all the necessary requests to authenticate
37 | * the current user to the server.
38 | *
39 | * @param string $user The current user.
40 | * @param string $pass The password for the current user.
41 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
42 | */
43 | public function login($user, $pass)
44 | {
45 | $this->resetDebugger();
46 | $this->service='india';
47 | $this->service_user=$user;
48 | $this->service_password=$pass;
49 | if (!$this->init()) return false;
50 |
51 | $res=$this->get("http://mail.india.com/login");
52 | if ($this->checkResponse("initial_get",$res))
53 | $this->updateDebugBuffer('initial_get',"http://mail.india.com/login",'GET');
54 | else
55 | {
56 | $this->updateDebugBuffer('initial_get',"http://mail.india.com/login",'GET',false);
57 | $this->debugRequest();
58 | $this->stopPlugin();
59 | return false;
60 | }
61 |
62 | $form_action="http://mail.india.com/authenticate";
63 | $post_elements=array('utf8'=>$this->getElementString($res,'name="utf8" type="hidden" value="','"'),
64 | 'authenticity_token'=>$this->getElementString($res,'name="authenticity_token" type="hidden" value="','"'),
65 | 'user[email]'=>$user,
66 | 'user[password]'=>$pass,
67 | 'Submit'=>false
68 | );
69 | $res=$this->post($form_action,$post_elements,true);
70 | if ($this->checkResponse("login_post",$res))
71 | $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
72 | else
73 | {
74 | $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
75 | $this->debugRequest();
76 | $this->stopPlugin();
77 | return false;
78 | }
79 |
80 | $this->login_ok="http://mail.india.com/mails/new";
81 | return true;
82 | }
83 |
84 | /**
85 | * Get the current user's contacts
86 | *
87 | * Makes all the necesarry requests to import
88 | * the current user's contacts
89 | *
90 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
91 | */
92 | public function getMyContacts()
93 | {
94 | if (!$this->login_ok)
95 | {
96 | $this->debugRequest();
97 | $this->stopPlugin();
98 | return false;
99 | }
100 | else $url=$this->login_ok;
101 | $res=$this->get($url,true);
102 | if ($this->checkResponse("initial_get",$res))
103 | $this->updateDebugBuffer('get_contacts',"{$url}",'GET');
104 | else
105 | {
106 | $this->updateDebugBuffer('get_contacts',"{$url}",'GET',false);
107 | $this->debugRequest();
108 | $this->stopPlugin();
109 | return false;
110 | }
111 |
112 | $contacts=array();if (preg_match_all("#class\=\"mail\"\>(.+)\<\/span\>#U",$res,$matches)) if (!empty($matches[1])) foreach($matches[1] as $d=>$email) $contacts[$email]=array('email_1'=>$email);
113 |
114 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
115 | return $this->returnContacts($contacts);
116 | }
117 |
118 | /**
119 | * Terminate session
120 | *
121 | * Terminates the current user's session,
122 | * debugs the request and reset's the internal
123 | * debudder.
124 | *
125 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
126 | */
127 | public function logout()
128 | {
129 | if (!$this->checkSession()) return false;
130 | $res=$this->get("http://mail.india.com/logout",true);
131 | $this->debugRequest();
132 | $this->resetDebugger();
133 | $this->stopPlugin();
134 | }
135 | }
136 | ?>
--------------------------------------------------------------------------------
/plugins/interia.plg.php:
--------------------------------------------------------------------------------
1 | 'Interia',
4 | 'version'=>'1.0.7',
5 | 'description'=>"Get the contacts from an Interia.pl account, Plugin developed by Bartosz Zarczynski",
6 | 'base_version'=>'1.8.0',
7 | 'type'=>'email',
8 | 'check_url'=>'http://poczta.interia.pl/',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>array('/(interia.pl)/i', '/(poczta.fm)/i', '/(interia.eu)/i', '/(1gb.pl)/i', '/(2gb.pl)/i', '/(vip.interia.pl)/i', '/(serwus.pl)/i', '/(akcja.pl)/i', '/(czateria.pl)/i', '/(znajomi.pl)/i'),
11 | 'imported_details'=>array('first_name','last_name','email_1'),
12 | );
13 | /**
14 | * Interia.pl Plugin
15 | *
16 | * Imports user's contacts from Interia.pl account
17 | *
18 | * @author Bartosz Zarczynski
19 | * @version 1.0.0
20 | */
21 | class interia extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 |
29 | public $debug_array=array('initial_get'=>'pocztaLoginForm',
30 | 'login_post'=>'side-folders',
31 | 'url_contact'=>'while(1)'
32 | );
33 | private $sid;
34 |
35 | /**
36 | * Login function
37 | *
38 | * Makes all the necessary requests to authenticate
39 | * the current user to the server.
40 | *
41 | * @param string $user The current user.
42 | * @param string $pass The password for the current user.
43 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
44 | */
45 | public function login($user, $pass)
46 | {
47 | $this->resetDebugger();
48 | $this->service='interia';
49 | $this->service_user=$user;
50 | $this->service_password=$pass;
51 | if (!$this->init()) return false;
52 | $res = $this->get("http://poczta.interia.pl/",true);
53 |
54 | if ($this->checkResponse("initial_get",$res))
55 | $this->updateDebugBuffer('initial_get',"http://poczta.interia.pl/",'GET');
56 | else
57 | {
58 | $this->updateDebugBuffer('initial_get',"http://poczta.interia.pl/",'GET',false);
59 | $this->debugRequest();
60 | $this->stopPlugin();
61 | return false;
62 | }
63 |
64 | $at = strpos($user, '@');
65 | $domain = substr($user, $at+1, strlen($user)-$at);
66 |
67 | $form_action="http://ssl.interia.pl/login.html?classicMail=1";
68 | $post_elements=array('login'=>$user,
69 | 'pass'=>$pass,
70 | 'domain' => $domain,
71 | 'htmlMail' => 'checked',
72 | 'referer' => 'http://poczta.interia.pl/poczta/'
73 | );
74 |
75 | $res=$this->post($form_action,$post_elements, true, true, false);
76 |
77 | if ($this->checkResponse("login_post",$res))
78 | $this->updateDebugBuffer('login_post',"http://ssl.interia.pl/login.html?classicMail=1",'GET');
79 | else
80 | {
81 | $this->updateDebugBuffer('login_post',"http://ssl.interia.pl/login.html?classicMail=1",'GET',false);
82 | $this->debugRequest();
83 | $this->stopPlugin();
84 | return false;
85 | }
86 |
87 | $pos = strpos($res, "logout,uid,");
88 | $this->sid = substr($res, $pos+11, 16);
89 |
90 | $this->login_ok = "http://poczta.interia.pl/html/getcontacts,all,1,uid,$this->sid?inpl_network_request=true";
91 |
92 | return true;
93 | }
94 |
95 | /**
96 | * Get the current user's contacts
97 | *
98 | * Makes all the necesarry requests to import
99 | * the current user's contacts
100 | *
101 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
102 | */
103 | public function getMyContacts()
104 | {
105 | if (!$this->login_ok)
106 | {
107 | $this->debugRequest();
108 | $this->stopPlugin();
109 | return false;
110 | }
111 | else $url=$this->login_ok;
112 | $res=$this->get($url,true);
113 |
114 | if ($this->checkResponse("url_contact",$res))
115 | $this->updateDebugBuffer('url_contact',$this->login_ok,'GET');
116 | else
117 | {
118 | $this->updateDebugBuffer('url_contact',$this->login_ok,'GET',false);
119 | $this->debugRequest();
120 | $this->stopPlugin();
121 | return false;
122 | }
123 |
124 | $noheader = substr($res, strpos($res, "while(1);[{") + 11, strlen($res) - 2);
125 | $lines = explode("},{", $noheader);
126 | $i = 0;
127 | foreach ($lines as $line)
128 | {
129 | $data[$i] = explode(",", $line);
130 | $i++;
131 | }
132 |
133 | $contacts = array();
134 | foreach ($data as $line=>$param)
135 | {
136 | foreach ($param as $x)
137 | {
138 | $pos_mail = strpos($x, "email");
139 | $email = substr($x, 9, strlen($x)-10);
140 | $pos_firstname = strpos($x, "firstName");
141 | if ($pos_firstname != false) $firstname = substr($x, 13, strlen($x)-14);
142 | $pos_lastname = strpos($x, "lastName");
143 | if ($pos_lastname != false) $lastname = substr($x, 12, strlen($x)-13);
144 | if ($pos_mail != false) $contacts[$email] =array('first_name'=>$firstname,'last_name'=>$lastname,'email_1'=>$email);
145 | }
146 | }
147 |
148 | return $this->returnContacts($contacts);
149 | }
150 |
151 | /**
152 | * Terminate session
153 | *
154 | * Terminates the current user's session,
155 | * debugs the request and reset's the internal
156 | * debudder.
157 | *
158 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
159 | */
160 | public function logout()
161 | {
162 | if (!$this->checkSession()) return false;
163 | $res = $this->get("http://poczta.interia.pl/html/logout,uid,$this->sid", true);
164 | $this->debugRequest();
165 | $this->resetDebugger();
166 | $this->stopPlugin();
167 | return true;
168 | }
169 | }
170 | ?>
--------------------------------------------------------------------------------
/plugins/kids.plg.php:
--------------------------------------------------------------------------------
1 | 'Kids',
4 | 'version'=>'1.0.2',
5 | 'description'=>"Get the contacts from a Kids account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://www.kids.co.uk/email/index.php',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Kids Plugin
15 | *
16 | * Import user's contacts from Kids account
17 | *
18 | *
19 | * @author OpenInviter
20 | * @version 1.0.0
21 | */
22 | class kids extends openinviter_base
23 | {
24 | private $login_ok=false;
25 | public $showContacts=true;
26 | public $internalError=false;
27 | protected $timeout=30;
28 |
29 | public $debug_array=array(
30 | 'initial_get'=>'login_id',
31 | 'login_post'=>'frame',
32 | 'url_contacts'=>'doaddresses.php?_MATRIXaction=',
33 | );
34 |
35 | /**
36 | * Login function
37 | *
38 | * Makes all the necessary requests to authenticate
39 | * the current user to the server.
40 | *
41 | * @param string $user The current user.
42 | * @param string $pass The password for the current user.
43 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
44 | */
45 | public function login($user,$pass)
46 | {
47 | $this->resetDebugger();
48 | $this->service='kids';
49 | $this->service_user=$user;
50 | $this->service_password=$pass;
51 | if (!$this->init()) return false;
52 |
53 | $res=$this->get("http://www.kids.co.uk/email/index.php",true);
54 | if ($this->checkResponse("initial_get",$res))
55 | $this->updateDebugBuffer('initial_get',"http://www.kids.co.uk/email/index.php",'GET');
56 | else
57 | {
58 | $this->updateDebugBuffer('initial_get',"http://www.kids.co.uk/email/index.php",'GET',false);
59 | $this->debugRequest();
60 | $this->stopPlugin();
61 | return false;
62 | }
63 |
64 | $form_action="http://www.kids.co.uk/email/home/dologin.php";
65 | $post_elements=array('did'=>2,
66 | 'login_id'=>$user,
67 | 'did'=>2,
68 | 'login_pwd'=>$pass,
69 | );
70 |
71 | $res=$this->post($form_action,$post_elements,true);
72 | if ($this->checkResponse("login_post",$res))
73 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
74 | else
75 | {
76 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
77 | $this->debugRequest();
78 | $this->stopPlugin();
79 | return false;
80 | }
81 |
82 | $url_addressbook='http://www.kids.co.uk/email/home/addressbook.php';
83 | $this->login_ok=$url_addressbook;
84 | return true;
85 | }
86 |
87 | /**
88 | * Get the current user's contacts
89 | *
90 | * Makes all the necesarry requests to import
91 | * the current user's contacts
92 | *
93 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
94 | */
95 | public function getMyContacts()
96 | {
97 | if (!$this->login_ok)
98 | {
99 | $this->debugRequest();
100 | $this->stopPlugin();
101 | return false;
102 | }
103 | else $url=$this->login_ok;
104 | $res=$this->get($url);
105 | if ($this->checkResponse("url_contacts",$res))
106 | $this->updateDebugBuffer('url_contacts',$url,'GET');
107 | else
108 | {
109 | $this->updateDebugBuffer('url_contacts',$url,'GET',false);
110 | $this->debugRequest();
111 | $this->stopPlugin();
112 | return false;
113 | }
114 |
115 | $contacts=array();
116 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
117 | $xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);$odd=true;
118 | foreach($data as $node)
119 | {
120 | if (strpos($node->getAttribute('href'),'doaddresses.php?_MATRIXaction=Modify')!==false)
121 | {
122 | if ($odd) $names[]=$node->nodeValue;else $emails[]=$node->nodeValue;
123 | $odd=!$odd;
124 | }
125 | }
126 | if (!empty($names)) foreach($names as $key=>$value) if(!empty($emails[$key])) $contacts[$emails[$key]]=array('first_name'=>$value,'email_1'=>$emails[$key]);
127 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
128 | return $this->returnContacts($contacts);
129 | }
130 |
131 | /**
132 | * Terminate session
133 | *
134 | * Terminates the current user's session,
135 | * debugs the request and reset's the internal
136 | * debudder.
137 | *
138 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
139 | */
140 | public function logout()
141 | {
142 | if (!$this->checkSession()) return false;
143 | $res=$this->get("http://kids.co.uk/email/dologout.php",true);
144 | $this->debugRequest();
145 | $this->resetDebugger();
146 | $this->stopPlugin();
147 | return true;
148 | }
149 | }
150 |
151 | ?>
--------------------------------------------------------------------------------
/plugins/kincafe.plg.php:
--------------------------------------------------------------------------------
1 | 'Kincafe',
8 | 'version'=>'1.0.3',
9 | 'description'=>"Get the contacts from a kincafe.com account",
10 | 'base_version'=>'1.6.7',
11 | 'type'=>'social',
12 | 'check_url'=>'http://www.kincafe.com/',
13 | 'requirement'=>'email',
14 | 'allowed_domains'=>false,
15 | 'imported_details'=>array('first_name','email_1'),
16 | );
17 |
18 | /**
19 | * kincafe Plugin
20 | *
21 | * Import user's contacts from kincafe
22 | *
23 | * @author OpenInviter
24 | * @version 1.0.1
25 | */
26 | class kincafe extends openinviter_base
27 | {
28 | private $login_ok=false;
29 | public $showContacts=true;
30 | public $internalError=false;
31 | protected $timeout=30;
32 |
33 | public $debug_array=array(
34 | 'login_post'=>'logout.fam',
35 | );
36 |
37 | /**
38 | * Login function
39 | *
40 | * Makes all the necessary requests to authenticate
41 | * the current user to the server.
42 | *
43 | * @param string $user The current user.
44 | * @param string $pass The password for the current user.
45 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
46 | */
47 | public function login($user,$pass)
48 | {
49 | $this->resetDebugger();
50 | $this->service='kincafe';
51 | $this->service_user=$user;
52 | $this->service_password=$pass;
53 |
54 | if (!$this->init()) return false;
55 |
56 | $res = $this->get('http://www.kincafe.com/signin.fam',true);
57 | $post_elements = $this->getHiddenElements($res);
58 | $post_elements['loginForm:username']=$user;
59 | $post_elements['loginForm:pwd']=$pass;
60 | $post_elements['loginForm:bottomSignInBtn']='+Sign+In+';
61 | $res = $this->post("http://www.kincafe.com/signin.fam",$post_elements,true);
62 | if ($this->checkResponse("login_post",$res))
63 | $this->updateDebugBuffer('login_post',"http://www.kincafe.com/signin.fam",'POST');
64 | else
65 | {
66 | $this->updateDebugBuffer('login_post',"http://www.kincafe.com/signin.fam",'POST',false);
67 | $this->debugRequest();
68 | $this->stopPlugin();
69 | return false;
70 | }
71 | $this->login_ok = "http://www.kincafe.com/fammemlist.fam";
72 | return true;
73 | }
74 |
75 | /**
76 | * Get the current user's contacts
77 | *
78 | * Makes all the necesarry requests to import
79 | * the current user's contacts
80 | *
81 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
82 | */
83 | public function getMyContacts()
84 | {
85 | if (!$this->login_ok)
86 | {
87 | $this->debugRequest();
88 | $this->stopPlugin();
89 | return false;
90 | }
91 | else $url=$this->login_ok;
92 | $res = $this->get($url,true);
93 | //echo $res;
94 | $contacts=array();
95 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
96 | $xpath=new DOMXPath($doc);$query="//tr[@style='background-color:#fbfbfb']";$data=$xpath->query($query);
97 | foreach($data as $node)
98 | {
99 | $td=$node->childNodes;
100 | $name = $td->item(2)->nodeValue;
101 | $email = $td->item(6)->nodeValue;
102 | $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
103 | }
104 | return $this->returnContacts($contacts);
105 | }
106 |
107 | /**
108 | * Terminate session
109 | *
110 | * Terminates the current user's session,
111 | * debugs the request and reset's the internal
112 | * debudder.
113 | *
114 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
115 | */
116 | public function logout()
117 | {
118 | if (!$this->checkSession()) return false;
119 | $res=$this->get("http://www.kincafe.com/logout.fam");
120 | $this->debugRequest();
121 | $this->resetDebugger();
122 | $this->stopPlugin();
123 | return true;
124 | }
125 | }
126 | ?>
127 |
--------------------------------------------------------------------------------
/plugins/lastfm.plg.php:
--------------------------------------------------------------------------------
1 | 'Last.fm',
4 | 'version'=>'1.0.5',
5 | 'description'=>"Get the contacts from a Last.fm account",
6 | 'base_version'=>'1.8.0',
7 | 'type'=>'social',
8 | 'check_url'=>'http://www.last.fm',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | );
12 | /**
13 | * LastFm Plugin
14 | *
15 | * Import user's contacts from Last.fm AddressBook
16 | *
17 | * @author OpenInviter
18 | * @version 1.0.0
19 | */
20 | class lastfm extends openinviter_base
21 | {
22 | private $login_ok=false;
23 | public $showContacts=true;
24 | private $sess_id, $username, $siteAddr;
25 |
26 | public $debug_array=array(
27 | 'login_post'=>'logout',
28 | 'friends_url'=>'username'
29 | );
30 |
31 | /**
32 | * Login function
33 | *
34 | * Makes all the necessary requests to authenticate
35 | * the current user to the server.
36 | *
37 | * @param string $user The current user.
38 | * @param string $pass The password for the current user.
39 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
40 | */
41 | public function login($user,$pass)
42 | {
43 | $this->resetDebugger();
44 | $this->service='lastfm';
45 | $this->service_user=$user;
46 | $this->service_password=$pass;
47 | if (!$this->init()) return false;
48 | $post_elements=array("username"=>"{$user}",
49 | "password"=>"{$pass}",
50 | "backto"=>urldecode("http%3A%2F%2Fwww.last.fm%2Flogin%2FsuccessCallback"));
51 | $res=$this->post("https://www.last.fm/login?lang=&withsid",$post_elements,true);
52 | if ($this->checkResponse("login_post",$res))
53 | $this->updateDebugBuffer('login_post',"https://www.last.fm/login?lang=&withsid",'POST');
54 | else
55 | {
56 | $this->updateDebugBuffer('login_post',"https://www.last.fm/login?lang=&withsid",'POST',false);
57 | $this->debugRequest();
58 | $this->stopPlugin();
59 | return false;
60 | }
61 | $this->login_ok = "http://www.last.fm/inbox/compose";
62 | return true;
63 | }
64 |
65 | /**
66 | * Get the current user's contacts
67 | *
68 | * Makes all the necesarry requests to import
69 | * the current user's contacts
70 | *
71 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
72 | */
73 | public function getMyContacts()
74 | {
75 | if (!$this->login_ok)
76 | {
77 | $this->debugRequest();
78 | $this->stopPlugin();
79 | return false;
80 | }
81 | else $url=$this->login_ok;
82 | $res=$this->get($url,true);
83 | $contacts=array();
84 | if (preg_match_all("#\"r4\_(.+)\"\:\{\"username\"\:\"(.+)\"#U",$res,$matches))
85 | {
86 | if (!empty($matches[1]))
87 | foreach($matches[1] as $key=>$id)
88 | if (!empty($matches[2][$key])) $contacts["r4_{$id}"]=$matches[2][$key];
89 | }
90 | return $contacts;
91 | }
92 |
93 | /**
94 | * Send message to contacts
95 | *
96 | * Sends a message to the contacts using
97 | * the service's inernal messaging system
98 | *
99 | * @param string $cookie_file The location of the cookies file for the current session
100 | * @param string $message The message being sent to your contacts
101 | * @param array $contacts An array of the contacts that will receive the message
102 | * @return mixed FALSE on failure.
103 | */
104 | public function sendMessage($session_id,$message,$contacts)
105 | {
106 | $res = $this->get("http://www.last.fm/inbox/compose");
107 | $postelem = $this->getHiddenElements($res);
108 | $postelem['to']="";
109 | $postelem['subject']=$message['subject'];
110 | $postelem['body']=$message['body'];
111 | $countMessages=0;
112 | foreach ($contacts as $id => $username)
113 | {
114 | $countMessages++;
115 | $postelem['to_ids%5B%5D'] = $id;
116 | $res = $this->post('http://www.last.fm/inbox/compose',$postelem, true, true);
117 | sleep($this->messageDelay);
118 | if ($countMessages>$this->maxMessages) {$this->debugRequest();$this->resetDebugger();$this->stopPlugin();break;}
119 | }
120 | }
121 |
122 | /**
123 | * Terminate session
124 | *
125 | * Terminates the current user's session,
126 | * debugs the request and reset's the internal
127 | * debudder.
128 | *
129 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
130 | */
131 | public function logout()
132 | {
133 | if (!$this->checkSession()) return false;
134 | $logout_url = "http://www.last.fm/login/logout";
135 | $res = $this->get($logout_url);
136 | $this->debugRequest();
137 | $this->resetDebugger();
138 | $this->stopPlugin();
139 | return true;
140 | }
141 | }
142 | ?>
--------------------------------------------------------------------------------
/plugins/libero.plg.php:
--------------------------------------------------------------------------------
1 | 'Libero',
4 | 'version'=>'1.0.6',
5 | 'description'=>"Get the contacts from a Libero account",
6 | 'base_version'=>'1.8.0',
7 | 'type'=>'email',
8 | 'check_url'=>'http://m.libero.it/mail',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>array('/(libero.it)/i','/(inwind.it)/i','/(iol.it)/i','/(blu.it)/i'),
11 | 'imported_details'=>array('email_1'),
12 | );
13 | /**
14 | * Libero Plugin
15 | *
16 | * Imports user's contacts from Libero's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.5
20 | */
21 | class libero extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 | public $debug_array=array('initial_get'=>'password',
28 | 'post_login'=>'Postaarrivata',
29 | 'get_contacts'=>'NEW',
30 | );
31 |
32 | /**
33 | * Login function
34 | *
35 | * Makes all the necessary requests to authenticate
36 | * the current user to the server.
37 | *
38 | * @param string $user The current user.
39 | * @param string $pass The password for the current user.
40 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
41 | */
42 | public function login($user, $pass)
43 | {
44 | $this->resetDebugger();
45 | $this->service='libero';
46 | $this->service_user=$user;
47 | $this->service_password=$pass;
48 | if (!$this->init()) return false;
49 |
50 | $res=$this->get("http://m.libero.it/mail",true);
51 | if ($this->checkResponse('initial_get',$res))
52 | $this->updateDebugBuffer('initial_get',"http://m.libero.it/mail",'GET');
53 | else
54 | {
55 | $this->updateDebugBuffer('initial_get',"http://m.libero.it/mail",'GET',false);
56 | $this->debugRequest();
57 | $this->stopPlugin();
58 | return false;
59 | }
60 | $form_action="https://login.libero.it/logincheck.php";
61 | $post_elements=array("SERVICE_ID"=>"m_mail",
62 | "RET_URL"=>"http://m.mailbeta.libero.it/m/wmm/auth/check",
63 | "LAYOUT"=>"m",
64 | "LOGINID"=>$user,
65 | "PASSWORD"=>$pass,
66 | "REMEMBERME"=>"S",
67 | "CAPTCHA_ID"=>"",
68 | "CAPTCHA_INP"=>"",
69 | "login"=>"+Accedi+",
70 | );
71 |
72 | $res=$this->post($form_action,$post_elements,true);
73 | if ($this->checkResponse('post_login',$res))
74 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
75 | else
76 | {
77 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
78 | $this->debugRequest();
79 | $this->stopPlugin();
80 | return false;
81 | }
82 | $this->login_ok="http://m.mailbeta.libero.it/m/wmm/contacts";
83 | return true;
84 | }
85 |
86 | /**
87 | * Get the current user's contacts
88 | *
89 | * Makes all the necesarry requests to import
90 | * the current user's contacts
91 | *
92 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
93 | */
94 | public function getMyContacts()
95 | {
96 | if (!$this->login_ok)
97 | {
98 | $this->debugRequest();
99 | $this->stopPlugin();
100 | return false;
101 | }
102 | else $url=$this->login_ok;
103 |
104 | $contacts=array();
105 | $res=$this->get($url,true);
106 | if ($this->checkResponse('get_contacts',$res))
107 | $this->updateDebugBuffer('get_contacts',"{$url}",'GET');
108 | else
109 | {
110 | $this->updateDebugBuffer('get_contacts',"{$url}",'GET',false);
111 | $this->debugRequest();
112 | $this->stopPlugin();
113 | return false;
114 | }
115 | if (preg_match_all("#send\/NEW\/(.+)\"#siU",$res,$matches))
116 | foreach($matches[1] as $key=>$email) $contacts[$email]=array('email_1'=>$email);
117 |
118 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
119 | return $this->returnContacts($contacts);
120 | }
121 |
122 | /**
123 | * Terminate session
124 | *
125 | * Terminates the current user's session,
126 | * debugs the request and reset's the internal
127 | * debudder.
128 | *
129 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
130 | */
131 | public function logout()
132 | {
133 | if (!$this->checkSession()) return false;
134 | $res=$this->get("http://m.mailbeta.libero.it/doLogout",true);
135 | $this->debugRequest();
136 | $this->resetDebugger();
137 | $this->stopPlugin();
138 | }
139 | }
140 | ?>
141 |
--------------------------------------------------------------------------------
/plugins/linkedin.plg.php:
--------------------------------------------------------------------------------
1 | 'LinkedIn',
4 | 'version'=>'1.1.4',
5 | 'description'=>"Get the contacts from a LinkedIn account",
6 | 'base_version'=>'1.8.0',
7 | 'type'=>'email',
8 | 'check_url'=>'http://m.linkedin.com/session/new',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>false,
11 | );
12 | /**
13 | * LinkedIn
14 | *
15 | * Imports user's email contacts from LinkedIn
16 | *
17 | * @author OpenInviter
18 | * @version 1.1.1
19 | */
20 | class linkedin extends openinviter_base
21 | {
22 | private $login_ok=false;
23 | public $showContacts=true;
24 | public $internalError=false;
25 | protected $timeout=30;
26 |
27 | public $debug_array=array(
28 | 'initial_get'=>'login',
29 | 'login_post'=>'contacts',
30 | 'get_friends'=>'mailto',
31 | );
32 |
33 | /**
34 | * Login function
35 | *
36 | * Makes all the necessary requests to authenticate
37 | * the current user to the server.
38 | *
39 | * @param string $user The current user.
40 | * @param string $pass The password for the current user.
41 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
42 | */
43 | public function login($user,$pass)
44 | {
45 | $this->resetDebugger();
46 | $this->service='linkedin';
47 | $this->service_user=$user;
48 | $this->service_password=$pass;
49 | if (!$this->init()) return false;
50 |
51 | $res=$this->get("http://m.linkedin.com/session/new");
52 | if ($this->checkResponse("initial_get",$res))
53 | $this->updateDebugBuffer('initial_get',"http://m.linkedin.com/session/new",'GET');
54 | else
55 | {
56 | $this->updateDebugBuffer('initial_get',"http://m.linkedin.com/session/new",'GET',false);
57 | $this->debugRequest();
58 | $this->stopPlugin();
59 | return false;
60 | }
61 | $form_action="https://m.linkedin.com/session";
62 | $post_elements=array('login'=>$user,
63 | 'authenticity_token'=>$this->getElementString($res,'name="authenticity_token" type="hidden" value="','"'),
64 | 'password'=>$pass,
65 | );
66 | $res=$this->post($form_action,$post_elements,true);
67 | if ($this->checkResponse("login_post",$res))
68 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
69 | else
70 | {
71 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
72 | $this->debugRequest();
73 | $this->stopPlugin();
74 | return false;
75 | }
76 | $this->login_ok="https://m.linkedin.com/contacts";
77 | return true;
78 | }
79 |
80 | /**
81 | * Get the current user's contacts
82 | *
83 | * Makes all the necesarry requests to import
84 | * the current user's contacts
85 | *
86 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
87 | */
88 | public function getMyContacts()
89 | {
90 | if (!$this->login_ok)
91 | {
92 | $this->debugRequest();
93 | $this->stopPlugin();
94 | return false;
95 | }
96 | else $url=$this->login_ok;
97 | $res=$this->get($url,true);
98 | if ($this->checkResponse("get_friends",$res))
99 | $this->updateDebugBuffer('get_friends',"{$url}",'GET');
100 | else
101 | {
102 | $this->updateDebugBuffer('get_friends',"{$url}",'GET',false);
103 | $this->debugRequest();
104 | $this->stopPlugin();
105 | return false;
106 | }
107 |
108 | $res=str_replace(PHP_EOL,"",$res);
109 | preg_match_all("#mailto\:(.+)\"#U",$res,$emails);
110 | preg_match_all("#252Fcontacts\"\>(.+)\<\/#U",$res,$names);
111 | $contacts=array();
112 | if (!empty($emails[1])) foreach($emails[1] as $key=>$email) if (!empty($names[1][$key])) $contacts[$email]=$names[1][$key];
113 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
114 | return $contacts;
115 | }
116 |
117 | /**
118 | * Terminate session
119 | *
120 | * Terminates the current user's session,
121 | * debugs the request and reset's the internal
122 | * debudder.
123 | *
124 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
125 | */
126 | public function logout()
127 | {
128 | if (!$this->checkSession()) return false;
129 | $res=$this->get("http://m.linkedin.com/session/logout",true);
130 | $this->debugRequest();
131 | $this->resetDebugger();
132 | $this->stopPlugin();
133 | return true;
134 | }
135 | }
136 |
137 | ?>
--------------------------------------------------------------------------------
/plugins/mail_in.plg.php:
--------------------------------------------------------------------------------
1 | 'Mail.in',
4 | 'version'=>'1.0.3',
5 | 'description'=>"Get the contacts from a Mail.in account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://mail.in.com/',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>array('/(in.com)/i'),
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Mail_in Plugin
15 | *
16 | * Imports user's contacts from Mail.in's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class mail_in extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array('initial_get'=>'frmloginverify',
29 | 'post_login'=>'inboxmailshide',
30 | 'contacts_page'=>'displaycontacts',
31 | );
32 |
33 | /**
34 | * Login function
35 | *
36 | * Makes all the necessary requests to authenticate
37 | * the current user to the server.
38 | *
39 | * @param string $user The current user.
40 | * @param string $pass The password for the current user.
41 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
42 | */
43 | public function login($user, $pass)
44 | {
45 | $this->resetDebugger();
46 | $this->service='mail_in';
47 | $this->service_user=$user;
48 | $this->service_password=$pass;
49 | if (!$this->init()) return false;
50 |
51 | $res=$this->get("http://mail.in.com/");
52 | if ($this->checkResponse('initial_get',$res))
53 | $this->updateDebugBuffer('initial_get',"http://mail.in.com/",'GET');
54 | else
55 | {
56 | $this->updateDebugBuffer('initial_get',"http://mail.in.com/",'GET',false);
57 | $this->debugRequest();
58 | $this->stopPlugin();
59 | return false;
60 | }
61 | $form_action='http://mail.in.com'.$this->getElementString($res,'name="frmloginverify" method="POST" action="','"');
62 | $post_elements=array('f_sourceret'=>'http://mail.in.com/mails/mailstartup','f_id'=>$user,'f_pwd'=>$pass);
63 | $res=$this->post($form_action,$post_elements,true);
64 | if ($this->checkResponse('post_login',$res))
65 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
66 | else
67 | {
68 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
69 | $this->debugRequest();
70 | $this->stopPlugin();
71 | return false;
72 | }
73 |
74 | $url_contacts='http://mail.in.com/mails/getcontacts.php';
75 | $this->login_ok=$url_contacts;
76 | return true;
77 | }
78 |
79 | /**
80 | * Get the current user's contacts
81 | *
82 | * Makes all the necesarry requests to import
83 | * the current user's contacts
84 | *
85 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
86 | */
87 | public function getMyContacts()
88 | {
89 | if (!$this->login_ok)
90 | {
91 | $this->debugRequest();
92 | $this->stopPlugin();
93 | return false;
94 | }
95 | else $url=$this->login_ok;
96 | $res=$this->get($url);
97 | if ($this->checkResponse('contacts_page',$res))
98 | $this->updateDebugBuffer('contacts_page',$url,'GET');
99 | else
100 | {
101 | $this->updateDebugBuffer('contacts_page',$url,'GET',false);
102 | $this->debugRequest();
103 | $this->stopPlugin();
104 | return false;
105 | }
106 |
107 | $contacts=array();
108 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
109 | $xpath=new DOMXPath($doc);$query="//td";$data=$xpath->query($query);
110 | foreach($data as $node)
111 | {
112 | if (strpos($node->getAttribute('onclick'),'displaycontacts')!==false)
113 | {
114 | $name=$node->nodeValue;
115 | $email_array=explode("'",(string)$node->getAttribute('onclick'));
116 | if (!empty($email_array[1])) $contacts[$email_array[1]]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email_array[1]);
117 | }
118 | }
119 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
120 | return $this->returnContacts($contacts);
121 | }
122 |
123 | /**
124 | * Terminate session
125 | *
126 | * Terminates the current user's session,
127 | * debugs the request and reset's the internal
128 | * debudder.
129 | *
130 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
131 | */
132 | public function logout()
133 | {
134 | if (!$this->checkSession()) return false;
135 | $res=$this->get('http://mail.in.com/logout',true);
136 | $this->debugRequest();
137 | $this->resetDebugger();
138 | $this->stopPlugin();
139 | }
140 | }
141 | ?>
142 |
--------------------------------------------------------------------------------
/plugins/ning.plg.php:
--------------------------------------------------------------------------------
1 | 'Ning',
7 | 'version'=>'1.0.1',
8 | 'description'=>"Get the contacts from a ning account",
9 | 'base_version'=>'1.8.0',
10 | 'type'=>'social',
11 | 'check_url'=>'http://www.ning.com/',
12 | 'requirement'=>'email',
13 | 'allowed_domains'=>false,
14 | );
15 | /**
16 | * Ning Plugin
17 | *
18 | * Import Friends from Ning
19 | * You can Write Private Messages using Brazencareerist system
20 | *
21 | * @author OpenInviter
22 | * @version 1.0.0
23 | */
24 | class ning extends openinviter_base
25 | {
26 | private $login_ok=false;
27 | public $showContacts=true;
28 | public $internalError=false;
29 | protected $timeout=30;
30 |
31 | public $debug_array=array(
32 | 'initial_get'=>'signin_password',
33 | 'login_post'=>'xn_signout',
34 | 'get_friends'=>'tb',
35 | 'send_message'=>'200 '
36 | );
37 |
38 | /**
39 | * Login function
40 | *
41 | * Makes all the necessary requests to authenticate
42 | * the current user to the server.
43 | *
44 | * @param string $user The current user.
45 | * @param string $pass The password for the current user.
46 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
47 | */
48 | public function login($user,$pass)
49 | {
50 | $this->resetDebugger();
51 | $this->service='ning';
52 | $this->service_user=$user;
53 | $this->service_password=$pass;
54 |
55 | if (!$this->init()) return false;
56 |
57 | $res=$this->get("http://www.ning.com/main/signin",true);
58 | if ($this->checkResponse("initial_get",$res))
59 | $this->updateDebugBuffer('initial_get',"http://www.brazencareerist.com/",'GET');
60 | else
61 | {
62 | $this->updateDebugBuffer('initial_get',"http://www.brazencareerist.com/",'GET',false);
63 | $this->debugRequest();
64 | $this->stopPlugin();
65 | return false;
66 | }
67 |
68 | $form_action="https://www.ning.com/main/signin?area=System_SignIn";
69 | $post_elements=array('target'=>'http://www.ning.com/',
70 | 'emailAddress'=>$user,
71 | 'password'=>$pass,
72 | );
73 | $res=$this->post($form_action,$post_elements,true);
74 | if ($this->checkResponse("login_post",$res))
75 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
76 | else
77 | {
78 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
79 | $this->debugRequest();
80 | $this->stopPlugin();
81 | return false;
82 | }
83 | $url_friends='http://www.ning.com/'.$this->getElementString($res,'id="xn_username">','<')."/friends";
84 | $this->login_ok=$url_friends;
85 | return true;
86 | }
87 |
88 | /**
89 | * Get the current user's contacts
90 | *
91 | * Makes all the necesarry requests to import
92 | * the current user's contacts
93 | *
94 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
95 | */
96 | public function getMyContacts()
97 | {
98 | if (!$this->login_ok)
99 | {
100 | $this->debugRequest();
101 | $this->stopPlugin();
102 | return false;
103 | }
104 | else $url=$this->login_ok;
105 | $res=$this->get($url,true);
106 | if ($this->checkResponse("get_friends",$res))
107 | $this->updateDebugBuffer('get_friends',$url,'GET');
108 | else
109 | {
110 | $this->updateDebugBuffer('get_friends',$url,'GET',false);
111 | $this->debugRequest();
112 | $this->stopPlugin();
113 | return false;
114 | }
115 |
116 | $contacts=array();
117 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
118 | $xpath=new DOMXPath($doc);$query="//div[@class='tb']";$data=$xpath->query($query);
119 | foreach($data as $node)
120 | {
121 | $name=$node->childNodes->item(1)->nodeValue;
122 | if (!empty($name)) $contacts[$name]=$name;
123 | }
124 | return $contacts;
125 | }
126 |
127 | /**
128 | * Send message to contacts
129 | *
130 | * Sends a message to the contacts using
131 | * the service's inernal messaging system
132 | *
133 | * @param string $cookie_file The location of the cookies file for the current session
134 | * @param string $message The message being sent to your contacts
135 | * @param array $contacts An array of the contacts that will receive the message
136 | * @return mixed FALSE on failure.
137 | */
138 | public function sendMessage($session_id,$message,$contacts)
139 | {
140 | $res=$this->get("http://www.ning.com");
141 | $form_action="http://www.ning.com/main/ajax?area=Status";
142 | $post_elements=array("status"=>$message['body'],'xp_token'=>$this->getElementString($res,'"xp_token" value="','"'));
143 | $res=$this->post($form_action,$post_elements,true);
144 | }
145 |
146 | /**
147 | * Terminate session
148 | *
149 | * Terminates the current user's session,
150 | * debugs the request and reset's the internal
151 | * debudder.
152 | *
153 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
154 | */
155 | public function logout()
156 | {
157 | if (!$this->checkSession()) return false;
158 | $res=$this->get("http://www.ning.com/main/signout");
159 | $this->debugRequest();
160 | $this->resetDebugger();
161 | $this->stopPlugin();
162 | return true;
163 | }
164 | }
165 |
166 | ?>
--------------------------------------------------------------------------------
/plugins/nz11.plg.php:
--------------------------------------------------------------------------------
1 | 'Nz11',
4 | 'version'=>'1.0.4',
5 | 'description'=>"Get the contacts from a Nz11 account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://nz11.com/',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Netadress Plugin
15 | *
16 | * Imports user's contacts from Netaddress's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class nz11 extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array('initial_get'=>'loginName',
29 | 'post_login'=>'oi_sda_firstname',
30 | 'contacts_page'=>'entriesPerPage2',
31 | 'all_contacts'=>'entriesPerPage2',
32 | );
33 |
34 | /**
35 | * Login function
36 | *
37 | * Makes all the necessary requests to authenticate
38 | * the current user to the server.
39 | *
40 | * @param string $user The current user.
41 | * @param string $pass The password for the current user.
42 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
43 | */
44 | public function login($user, $pass)
45 | {
46 | $this->resetDebugger();
47 | $this->service='nz11';
48 | $this->service_user=$user;
49 | $this->service_password=$pass;
50 | if (!$this->init()) return false;
51 |
52 | $res=$this->get("http://nz11.mail.everyone.net/email/scripts/loginuser.pl");
53 | if ($this->checkResponse('initial_get',$res))
54 | $this->updateDebugBuffer('initial_get',"http://nz11.mail.everyone.net/email/scripts/loginuser.pl",'GET');
55 | else
56 | {
57 | $this->updateDebugBuffer('initial_get',"http://nz11.mail.everyone.net/email/scripts/loginuser.pl",'GET',false);
58 | $this->debugRequest();
59 | $this->stopPlugin();
60 | return false;
61 | }
62 | $form_action='http://nz11.mail.everyone.net/email/scripts/loginuser.pl?'.$this->getElementString($res,' name="myForm" method="post" action="loginuser.pl?','"');
63 | $post_elements=array('loginName'=>$user,'user_pwd'=>$pass,'login'=>'Login');
64 | $res=$this->post($form_action,$post_elements,true);
65 | if ($this->checkResponse('post_login',$res))
66 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
67 | else
68 | {
69 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
70 | $this->debugRequest();
71 | $this->stopPlugin();
72 | return false;
73 | }
74 | $this->login_ok='http://nz11.mail.everyone.net/email/scripts/contacts.pl';
75 | return true;
76 | }
77 |
78 | /**
79 | * Get the current user's contacts
80 | *
81 | * Makes all the necesarry requests to import
82 | * the current user's contacts
83 | *
84 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
85 | */
86 | public function getMyContacts()
87 | {
88 | if (!$this->login_ok)
89 | {
90 | $this->debugRequest();
91 | $this->stopPlugin();
92 | return false;
93 | }
94 | else $url=$this->login_ok;
95 | $res=$this->get($url);
96 | if ($this->checkResponse('contacts_page',$res))
97 | $this->updateDebugBuffer('contacts_page',$url,'GET');
98 | else
99 | {
100 | $this->updateDebugBuffer('contacts_page',$url,'GET',false);
101 | $this->debugRequest();
102 | $this->stopPlugin();
103 | return false;
104 | }
105 | $form_action='http://nz11.mail.everyone.net/email/scripts/contacts.pl';
106 | $post_elements=$this->getHiddenElements($res);$post_elements['entriesPerPage2']='All';
107 | $res=$this->post($form_action,$post_elements);
108 | if ($this->checkResponse('all_contacts',$res))
109 | $this->updateDebugBuffer('all_contacts',"{$form_action}",'POST',true,$post_elements);
110 | else
111 | {
112 | $this->updateDebugBuffer('all_contacts',"{$form_action}",'POST',false,$post_elements);
113 | $this->debugRequest();
114 | $this->stopPlugin();
115 | return false;
116 | }
117 |
118 | $contacts=array();$contacts_bulk="";
119 | $contacts_array=$this->getElementDOM($res,"//a",'href');
120 | foreach ($contacts_array as $contacts_string)
121 | if (strpos($contacts_string,'javascript:composeMe')!==false)
122 | {
123 | $contacts_bulk=$this->getElementString($contacts_string,"'",'>');
124 | $contacts_bulk=str_replace('"','',$contacts_bulk);
125 | $contacts_explode=explode('<',$contacts_bulk);
126 | if (isset($contacts_explode[1]))
127 | $contacts[$contacts_explode[1]]=array('first_name'=>(isset($contacts_explode[0])?$contacts_explode[0]:false),'email_1'=>$contacts_explode[1]);
128 | }
129 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
130 | return $this->returnContacts($contacts);
131 | }
132 |
133 | /**
134 | * Terminate session
135 | *
136 | * Terminates the current user's session,
137 | * debugs the request and reset's the internal
138 | * debudder.
139 | *
140 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
141 | */
142 | public function logout()
143 | {
144 | if (!$this->checkSession()) return false;
145 | $res=$this->get('http://nz11.mail.everyone.net/email/scripts/logout.pl');
146 | $this->debugRequest();
147 | $this->resetDebugger();
148 | $this->stopPlugin();
149 | }
150 | }
151 | ?>
--------------------------------------------------------------------------------
/plugins/rambler.plg.php:
--------------------------------------------------------------------------------
1 | 'Rambler',
4 | 'version'=>'1.1.7',
5 | 'description'=>"Get the contacts from a Rambler account",
6 | 'base_version'=>'1.8.3',
7 | 'type'=>'email',
8 | 'check_url'=>'http://www.rambler.ru',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>array('/(rambler.ru)/i'),
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Rambler Plugin
15 | *
16 | * Import user's contacts from Rambler AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.9
20 | */
21 | class rambler extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array(
29 | 'initial_get'=>'login',
30 | 'login_post'=>'ramac_add_handler',
31 | 'url_contacts'=>'email'
32 | );
33 |
34 | /**
35 | * Login function
36 | *
37 | * Makes all the necessary requests to authenticate
38 | * the current user to the server.
39 | *
40 | * @param string $user The current user.
41 | * @param string $pass The password for the current user.
42 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
43 | */
44 | public function login($user,$pass)
45 | {
46 | $this->resetDebugger();
47 | $this->service='rambler';
48 | $this->service_user=$user;
49 | $this->service_password=$pass;
50 | if (!$this->init()) return false;
51 |
52 | $res=$this->get("http://www.rambler.ru/",true);
53 |
54 | if ($this->checkResponse("initial_get",$res))
55 | $this->updateDebugBuffer('initial_get',"http://www.rambler.ru/",'GET');
56 | else
57 | {
58 | $this->updateDebugBuffer('initial_get',"http://www.rambler.ru/",'GET',false);
59 | $this->debugRequest();
60 | $this->stopPlugin();
61 | return false;
62 | }
63 | $post_elements=$this->getHiddenElements($res);$post_elements['login']=$user;$post_elements['passw']=$pass;
64 | unset($post_elements[0]);
65 | $res=$this->post("http://id.rambler.ru/script/auth.cgi",$post_elements,true);
66 | if ($this->checkResponse("login_post",$res))
67 | $this->updateDebugBuffer('login_post',"http://id.rambler.ru/script/auth.cgi",'POST',true,$post_elements);
68 | else
69 | {
70 | $this->updateDebugBuffer('login_post',"http://id.rambler.ru/script/auth.cgi",'POST',false,$post_elements);
71 | $this->debugRequest();
72 | $this->stopPlugin();
73 | return false;
74 | }
75 |
76 | $url_contact_array=$this->getElementDOM($res,"//a[@id='addressbook-link']",'href');
77 | $value=substr($url_contact_array[0],strpos($url_contact_array[0],"r=")+2,strlen($url_contact_array[0])-strpos($url_contact_array[0],"r=")-2);
78 | $url_contact="http://mail.rambler.ru/mail/contacts.cgi?r={$value}";
79 | $this->login_ok=$url_contact;
80 | file_put_contents($this->getLogoutPath(),$value);
81 | return true;
82 | }
83 |
84 | /**
85 | * Get the current user's contacts
86 | *
87 | * Makes all the necesarry requests to import
88 | * the current user's contacts
89 | *
90 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
91 | */
92 | public function getMyContacts()
93 | {
94 | if (!$this->login_ok)
95 | {
96 | $this->debugRequest();
97 | $this->stopPlugin();
98 | return false;
99 | }
100 | else $url=$this->login_ok;
101 | $res=$this->get($url,true);
102 | if ($this->checkResponse("url_contacts",$res))
103 | $this->updateDebugBuffer('url_contacts',$url,'GET');
104 | else
105 | {
106 | $this->updateDebugBuffer('url_contacts',$url,'GET',false);
107 | $this->debugRequest();
108 | $this->stopPlugin();
109 | return false;
110 | }
111 | $contacts=array();
112 | $emailsArray=$this->getElementDOM($res,"//td[@class='mtbox-cell mtbox-email quiet']");
113 | $namesArray=$this->getElementDOM($res,"//a[@class='mtbox-action mtbox-view']");
114 | if (!empty($emailsArray))
115 | foreach($emailsArray as $key=>$emailValue) $contacts[trim($emailValue)]=array('first_name'=>(isset($namesArray[$key])?trim($namesArray[$key]):false),'email_1'=>trim($emailValue));
116 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
117 | return $this->returnContacts($contacts);
118 | }
119 |
120 | /**
121 | * Terminate session
122 | *
123 | * Terminates the current user's session,
124 | * debugs the request and reset's the internal
125 | * debudder.
126 | *
127 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
128 | */
129 | public function logout()
130 | {
131 | if (!$this->checkSession()) return false;
132 | if (file_exists($this->getLogoutPath()))
133 | {
134 | $url_logout="http://id.rambler.ru/script/auth.cgi?back=;mode=logout;r=".file_get_contents($this->getLogoutPath());
135 | $res=$this->get($url_logout,true);
136 | }
137 | $this->debugRequest();
138 | $this->resetDebugger();
139 | $this->stopPlugin();
140 | return true;
141 | }
142 | }
143 | ?>
--------------------------------------------------------------------------------
/plugins/rediff.plg.php:
--------------------------------------------------------------------------------
1 | 'Rediff',
4 | 'version'=>'1.2.2',
5 | 'description'=>"Get the contacts from a Rediff account",
6 | 'base_version'=>'1.8.1',
7 | 'type'=>'email',
8 | 'check_url'=>'http://mail.rediff.com',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Rediff Plugin
15 | *
16 | * Import user's contacts from Rediff's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.1.6
20 | */
21 | class rediff extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | private $sess_id, $username, $siteAddr;
26 | public $debug_array=array(
27 | 'login_post'=>'href="',
28 | 'url_contacts'=>'var session_id',
29 | 'url_contacts_form'=>'els',
30 | 'file_contacts'=>'Name',
31 | );
32 |
33 | /**
34 | * Login function
35 | *
36 | * Makes all the necessary requests to authenticate
37 | * the current user to the server.
38 | *
39 | * @param string $user The current user.
40 | * @param string $pass The password for the current user.
41 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
42 | */
43 | public function login($user,$pass)
44 | {
45 | $this->resetDebugger();
46 | $this->service='rediff';
47 | $this->service_user=$user;
48 | $this->service_password=$pass;
49 | if (!$this->init()) return false;
50 | $post_elements=array("id"=>"{$user}",
51 | "num"=>"{$pass}",
52 | "remember"=>0,
53 | "r_controller"=>0,
54 | "r_action"=>0,
55 | "login"=>$user,
56 | "passwd"=>$pass,
57 | "FormName"=>"existing");
58 | $res=$this->post("http://mail.rediff.com/cgi-bin/login.cgi",$post_elements,true);
59 | if ($this->checkResponse("login_post",$res))
60 | $this->updateDebugBuffer('login_post',"http://mail.rediff.com/cgi-bin/login.cgi",'POST',true,$post_elements);
61 | else
62 | {
63 | $this->updateDebugBuffer('login_post',"http://mail.rediff.com/cgi-bin/login.cgi",'POST',false,$post_elements);
64 | $this->debugRequest();
65 | $this->stopPlugin();
66 | return false;
67 | }
68 | $url_redirect=$this->getElementString($res,'href="','"');
69 | $res=$this->get($url_redirect);
70 | $this->login_ok="http://f1mail.rediff.com/ajaxprism/exportaddrbook?service=outlook";
71 | $logout_url="http://login.rediff.com/bn/logout.cgi?formname=general&login={$this->username}&session_id={$this->sess_id}&function_name=logout";
72 | file_put_contents($this->getLogoutPath(),$logout_url);
73 | return true;
74 | }
75 |
76 | /**
77 | * Get the current user's contacts
78 | *
79 | * Makes all the necesarry requests to import
80 | * the current user's contacts
81 | *
82 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
83 | */
84 | public function getMyContacts()
85 | {
86 | if (!$this->login_ok)
87 | {
88 | $this->debugRequest();
89 | $this->stopPlugin();
90 | return false;
91 | }
92 | else $url=$this->login_ok;
93 |
94 | $post_elements=array("exporttype"=>"outlook");
95 | $form_action="http://f1mail.rediff.com/ajaxprism/exportaddrbook?service=outlook";
96 | $res=$this->post($form_action,$post_elements);
97 | if ($this->checkResponse("file_contacts",$res))
98 | $this->updateDebugBuffer('file_contacts',"{$form_action}",'POST',true,$post_elements);
99 | else
100 | {
101 | $this->updateDebugBuffer('file_contacts',"{$form_action}",'POST',false,$post_elements);
102 | $this->debugRequest();
103 | $this->stopPlugin();
104 | return false;
105 | }
106 | $temp=$this->parseCSV($res);
107 | $contacts=array();
108 | foreach ($temp as $values)
109 | {
110 | $name=$values['0'].(empty($values['1'])?'':(empty($values['0'])?'':'-')."{$values['1']}").(empty($values['3'])?'':" \"{$values['3']}\"").(empty($values['2'])?'':' '.$values['2']);
111 | if (!empty($values['5']))
112 | $contacts[$values['5']]=array('first_name'=>$name,'email_1'=>$values['5']);
113 | }
114 |
115 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
116 | return $this->returnContacts($contacts);
117 | }
118 |
119 | /**
120 | * Terminate session
121 | *
122 | * Terminates the current user's session,
123 | * debugs the request and reset's the internal
124 | * debudder.
125 | *
126 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
127 | */
128 | public function logout()
129 | {
130 | if (!$this->checkSession()) return false;
131 | if (file_exists($this->getLogoutPath()))
132 | {
133 | $url_logout=file_get_contents($this->getLogoutPath());
134 | if (!empty($url_logout)) $res=$this->get($url_logout);
135 | }
136 | $this->debugRequest();
137 | $this->resetDebugger();
138 | $this->stopPlugin();
139 | }
140 | }
141 | ?>
--------------------------------------------------------------------------------
/plugins/sapo.plg.php:
--------------------------------------------------------------------------------
1 | 'Sapo.pt',
7 | 'version'=>'1.0.4',
8 | 'description'=>"Get the contacts from a Sapo.pt account",
9 | 'base_version'=>'1.6.7',
10 | 'type'=>'email',
11 | 'check_url'=>'http://services.mail.sapo.pt/codebits/',
12 | 'requirement'=>'email',
13 | 'allowed_domains'=>array('/(sapo.pt)/i'),
14 | 'imported_details'=>array('first_name','email_1','nickname'),
15 | );
16 | /**
17 | * Sapo Plugin
18 | *
19 | * Imports user's contacts from Sapo.pt's AddressBook
20 | *
21 | * @author OpenInviter
22 | * @version 1.0.0
23 | */
24 | class sapo extends openinviter_base
25 | {
26 | private $login_ok=false;
27 | public $showContacts=true;
28 | public $internalError=false;
29 | protected $timeout=30;
30 |
31 | public $debug_array=array(
32 | 'initial_get'=>'username',
33 | 'get_contacts'=>'email',
34 | );
35 |
36 | /**
37 | * Login function
38 | *
39 | * Makes all the necessary requests to authenticate
40 | * the current user to the server.
41 | *
42 | * @param string $user The current user.
43 | * @param string $pass The password for the current user.
44 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
45 | */
46 | public function login($user,$pass)
47 | {
48 | $this->resetDebugger();
49 | $this->service='sapo';
50 | $this->service_user=$user;
51 | $this->service_password=$pass;
52 | if (!$this->init()) return false;
53 |
54 | $res=$this->get("http://services.mail.sapo.pt/codebits/");
55 | if ($this->checkResponse("initial_get",$res))
56 | $this->updateDebugBuffer('initial_get',"http://services.mail.sapo.pt/codebits/",'GET');
57 | else
58 | {
59 | $this->updateDebugBuffer('initial_get',"http://services.mail.sapo.pt/codebits/",'GET',false);
60 | $this->debugRequest();
61 | $this->stopPlugin();
62 | return false;
63 | }
64 |
65 | $this->login_ok=array('user'=>$user,'pass'=>$pass);
66 | return true;
67 | }
68 |
69 | /**
70 | * Get the current user's contacts
71 | *
72 | * Makes all the necesarry requests to import
73 | * the current user's contacts
74 | *
75 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
76 | */
77 | public function getMyContacts()
78 | {
79 | if (!$this->login_ok)
80 | {
81 | $this->debugRequest();
82 | $this->stopPlugin();
83 | return false;
84 | }
85 | else $data=$this->login_ok;
86 |
87 | $form_action="http://services.mail.sapo.pt/codebits/index.php";
88 | $post_elements=array('username'=>$data['user'],'password'=>$data['pass'],'what'=>'contactos');
89 |
90 | $res=$this->post($form_action,$post_elements);
91 | if ($this->checkResponse("get_contacts",$res))
92 | $this->updateDebugBuffer('get_contacts',$form_action,'POST',true,$post_elements);
93 | else
94 | {
95 | $this->updateDebugBuffer('get_contacts',$form_action,'POST',false,$post_elements);
96 | $this->debugRequest();
97 | $this->stopPlugin();
98 | return false;
99 | }
100 |
101 | $name_array=$this->getElementDOM($res,"//span[@class='n fn']");
102 | $niks_array=$this->getElementDOM($res,"//span[@class='nickname']");
103 | $email_array=$this->getElementDOM($res,"//span[@class='email']");
104 | foreach($name_array as $key=>$value)
105 | $contacts[$email_array[$key]]=array('first_name'=>$value,'nickname'=>(isset($niks_array[$key])?$niks_array[$key]:false),'email_1'=>$email_array[$key]);
106 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
107 | return $this->returnContacts($contacts);
108 | }
109 |
110 | /**
111 | * Terminate session
112 | *
113 | * Terminates the current user's session,
114 | * debugs the request and reset's the internal
115 | * debudder.
116 | *
117 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
118 | */
119 | public function logout()
120 | {
121 | if (!$this->checkSession()) return false;
122 | $this->debugRequest();
123 | $this->resetDebugger();
124 | $this->stopPlugin();
125 | return true;
126 | }
127 |
128 | }
129 |
130 | ?>
--------------------------------------------------------------------------------
/plugins/techemail.plg.php:
--------------------------------------------------------------------------------
1 | 'Techemail',
4 | 'version'=>'1.0.3',
5 | 'description'=>"Get the contacts from an Techemail account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://techemail.mail.everyone.net/email/scripts/loginuser.pl',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Techemail Plugin
15 | *
16 | * Imports user's contacts from Techemail's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class techemail extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | protected $timeout=30;
25 | public $showContacts=true;
26 | public $debug_array=array(
27 | 'initial_get'=>'loginName',
28 | 'login_post'=>'oi_sda_firstname',
29 | 'get_contacts'=>'composeMe',
30 | );
31 |
32 | /**
33 | * Login function
34 | *
35 | * Makes all the necessary requests to authenticate
36 | * the current user to the server.
37 | *
38 | * @param string $user The current user.
39 | * @param string $pass The password for the current user.
40 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
41 | */
42 | public function login($user,$pass)
43 | {
44 | $this->resetDebugger();
45 | $this->service='techemail';
46 | $this->service_user=$user;
47 | $this->service_password=$pass;
48 | if (!$this->init()) return false;
49 | $res=$this->get("http://techemail.mail.everyone.net/email/scripts/loginuser.pl",true);
50 | if ($this->checkResponse('initial_get',$res))
51 | $this->updateDebugBuffer('initial_get',"http://super.popstarmail.org/",'GET');
52 | else
53 | {
54 | $this->updateDebugBuffer('initial_get',"http://super.popstarmail.org/",'GET',false);
55 | $this->debugRequest();
56 | $this->stopPlugin();
57 | return false;
58 | }
59 |
60 | $form_action="http://techemail.mail.everyone.net/email/scripts/loginuser.pl?EV1=".$this->getElementString($res,"loginuser.pl?EV1=",'"');
61 | $post_elements=array('loginName'=>$user,'user_pwd'=>$pass,'login'=>'Login');
62 | $res=$this->post($form_action,$post_elements,true);
63 | if ($this->checkResponse("login_post",$res))
64 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
65 | else
66 | {
67 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
68 | $this->debugRequest();
69 | $this->stopPlugin();
70 | return false;
71 | }
72 |
73 | $url_contacts="http://techemail.mail.everyone.net/email/scripts/contacts.pl?EV1=";
74 | $this->login_ok=$url_contacts;
75 | return true;
76 | }
77 |
78 | /**
79 | * Get the current user's contacts
80 | *
81 | * Makes all the necesarry requests to import
82 | * the current user's contacts
83 | *
84 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
85 | */
86 | public function getMyContacts()
87 | {
88 | if (!$this->login_ok)
89 | {
90 | $this->debugRequest();
91 | $this->stopPlugin();
92 | return false;
93 | }
94 | else $url = $this->login_ok;
95 | $res=$this->get($url,true);
96 | if ($this->checkResponse('get_contacts',$res))
97 | $this->updateDebugBuffer('get_contacts',$url,'GET');
98 | else
99 | {
100 | $this->updateDebugBuffer('get_contacts',$url,'GET',false);
101 | $this->debugRequest();
102 | $this->stopPlugin();
103 | return false;
104 | }
105 |
106 | $contacts=array();
107 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
108 | $xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
109 | foreach($data as $node)
110 | {
111 | $nameBulk=$node->getAttribute('href');
112 | if (strpos($nameBulk,'javascript:composeMe')!==false)
113 | {
114 | $name=$this->getElementString($nameBulk,'"','"');$email=$node->nodeValue;
115 | if (!empty($email)) $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
116 | }
117 | }
118 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
119 | return $this->returnContacts($contacts);
120 | }
121 |
122 |
123 | /**
124 | * Terminate session
125 | *
126 | * Terminates the current user's session,
127 | * debugs the request and reset's the internal
128 | * debudder.
129 | *
130 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
131 | */
132 | public function logout()
133 | {
134 | if (!$this->checkSession()) return false;
135 | $logout_url="http://techemail.mail.everyone.net/email/scripts/logout.pl";
136 | $res = $this->get($logout_url,true);
137 | $this->debugRequest();
138 | $this->resetDebugger();
139 | $this->stopPlugin();
140 | return true;
141 | }
142 | }
143 | ?>
--------------------------------------------------------------------------------
/plugins/terra.plg.php:
--------------------------------------------------------------------------------
1 | 'Terra',
4 | 'version'=>'1.0.8',
5 | 'description'=>"Get the contacts from an Terra account",
6 | 'base_version'=>'1.6.7',
7 | 'type'=>'email',
8 | 'check_url'=>'http://correo.terra.com/',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Terra Plugin
15 | *
16 | * Imports user's contacts from Terra.com
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class terra extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array('initial_get'=>'username',
29 | 'post_login'=>'location.href',
30 | 'url_post_redirect'=>'td',
31 | 'file_contacts'=>'Users["'
32 | );
33 |
34 | /**
35 | * Login function
36 | *
37 | * Makes all the necessary requests to authenticate
38 | * the current user to the server.
39 | *
40 | * @param string $user The current user.
41 | * @param string $pass The password for the current user.
42 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
43 | */
44 | public function login($user, $pass)
45 | {
46 | $this->resetDebugger();
47 | $this->service='terra';
48 | $this->service_user=$user;
49 | $this->service_password=$pass;
50 | if (!$this->init()) return false;
51 |
52 | $res=$this->get("http://correo.terra.com/");
53 | if ($this->checkResponse('initial_get',$res))
54 | $this->updateDebugBuffer('initial_get',"http://correo.terra.com/",'GET');
55 | else
56 | {
57 | $this->updateDebugBuffer('initial_get',"http://correo.terra.com/",'GET',false);
58 | $this->debugRequest();
59 | $this->stopPlugin();
60 | return false;
61 | }
62 |
63 | $form_action="http://correo.terra.com/atmail.php";
64 | $post_elements=array('username'=>$user,'password'=>$pass);
65 | $res=$this->post($form_action,$post_elements,true);
66 | if ($this->checkResponse('post_login',$res))
67 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
68 | else
69 | {
70 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
71 | $this->debugRequest();
72 | $this->stopPlugin();
73 | return false;
74 | }
75 | $url_redirect=$this->getElementString($res,"href='","'");
76 | $domain=$this->getElementString($res,'http://correo.terra.com/','/showmail');
77 | $res=$this->get($url_redirect,true);
78 | if ($this->checkResponse('url_post_redirect',$res))
79 | $this->updateDebugBuffer('url_post_redirect',"{$url_redirect}",'GET');
80 | else
81 | {
82 | $this->updateDebugBuffer('url_post_redirect',"{$url_redirect}",'GET',false);
83 | $this->debugRequest();
84 | $this->stopPlugin();
85 | return false;
86 | }
87 |
88 | $url_file_contacts="http://correo.terra.com/{$domain}/abook.php?func=composebook&emailto=&emailcc=&emailbcc=";
89 | $this->login_ok=$url_file_contacts;
90 | file_put_contents($this->getLogoutPath(),$domain);
91 | return true;
92 | }
93 |
94 | /**
95 | * Get the current user's contacts
96 | *
97 | * Makes all the necesarry requests to import
98 | * the current user's contacts
99 | *
100 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
101 | */
102 | public function getMyContacts()
103 | {
104 | if (!$this->login_ok)
105 | {
106 | $this->debugRequest();
107 | $this->stopPlugin();
108 | return false;
109 | }
110 | else $url=$this->login_ok;
111 | $res=$this->get($url,true);
112 | if ($this->checkResponse('file_contacts',$res))
113 | $this->updateDebugBuffer('file_contacts',$url,'GET');
114 | else
115 | {
116 | $this->updateDebugBuffer('file_contacts',$url,'GET',false);
117 | $this->debugRequest();
118 | $this->stopPlugin();
119 | return false;
120 | }
121 | $contacts=array();
122 | if (preg_match_all("#Users\[\"(.+)\"\] \= \'(.+) \<\;#U", $res, $matches))
123 | if (!empty($matches[1]))
124 | foreach($matches[1] as $key=>$email)
125 | $contacts[$email]=array('first_name'=>(!empty($matches[2][$key])?$matches[2][$key]:false),'email_1'=>$email);
126 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
127 | return $this->returnContacts($contacts);
128 | }
129 |
130 | /**
131 | * Terminate session
132 | *
133 | * Terminates the current user's session,
134 | * debugs the request and reset's the internal
135 | * debudder.
136 | *
137 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
138 | */
139 | public function logout()
140 | {
141 | if (!$this->checkSession()) return false;
142 | if (file_exists($this->getLogoutPath()))
143 | { $domain=file_get_contents($this->getLogoutPath());$res=$this->get("http://correo.terra.com{$domain}/index.php?func=logout",true); }
144 | $this->debugRequest();
145 | $this->resetDebugger();
146 | $this->stopPlugin();
147 | }
148 | }
149 | ?>
--------------------------------------------------------------------------------
/plugins/virgilio.plg.php:
--------------------------------------------------------------------------------
1 | 'Virgilio',
4 | 'version'=>'1.0.3',
5 | 'description'=>"Get the contacts from an virgilio.it account",
6 | 'base_version'=>'1.0.0',
7 | 'type'=>'email',
8 | 'check_url'=>'http://mobimail.virgilio.it/cp/ps/Main/login/LoginVirgilio?d=virgilio.it',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Virgilio.it Plugin
15 | *
16 | * Imports user's contacts from Virgilio.it account
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class virgilio extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 | private $sessionVer;
28 | public $debug_array=array('initial_get'=>'login_type',
29 | 'login_post'=>'&t=',
30 | 'url_contact'=>'contatti'
31 | );
32 |
33 | /**
34 | * Login function
35 | *
36 | * Makes all the necessary requests to authenticate
37 | * the current user to the server.
38 | *
39 | * @param string $user The current user.
40 | * @param string $pass The password for the current user.
41 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
42 | */
43 | public function login($user, $pass)
44 | {
45 | $this->resetDebugger();
46 | $this->service='virgilio';
47 | $this->service_user=$user;
48 | $this->service_password=$pass;
49 | if (!$this->init()) return false;
50 | $res = $this->get("http://mobimail.virgilio.it/cp/ps/Main/login/LoginVirgilio?d=virgilio.it",true);
51 | if ($this->checkResponse("initial_get",$res))
52 | $this->updateDebugBuffer('initial_get',"http://mobimail.virgilio.it/cp/ps/Main/login/LoginVirgilio?d=virgilio.it",'GET');
53 | else
54 | {
55 | $this->updateDebugBuffer('initial_get',"http://mobimail.virgilio.it/cp/ps/Main/login/LoginVirgilio?d=virgilio.it",'GET',false);
56 | $this->debugRequest();
57 | $this->stopPlugin();
58 | return false;
59 | }
60 | $form_action="http://mobimail.virgilio.it/cp/ps/Main/login/WrapLogin";
61 | $post_elements=array('p'=>false,'login_type'=>'virgilio','NGUserID'=>'null','u'=>$user,'password'=>$pass,'d'=>'virgilio.it');
62 | $res=$this->post($form_action,$post_elements,true);
63 | if ($this->checkResponse('login_post',$res))
64 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',true,$post_elements);
65 | else
66 | {
67 | $this->updateDebugBuffer('login_post',"{$form_action}",'POST',false,$post_elements);
68 | $this->debugRequest();
69 | $this->stopPlugin();
70 | return false;
71 | }
72 | $vergilioT=$this->getElementString($res,'&t=','&');$this->sessionVer=$vergilioT;
73 | $url_contacts="http://mobimail.virgilio.it/cp/ps/PSPab/Contacts?d=virgilio.it&u={$user}&t={$vergilioT}&reset=true&startAt=1&l=it";
74 | $this->login_ok=$url_contacts;
75 | file_put_contents($this->getLogoutPath(),$vergilioT);
76 | return true;
77 | }
78 |
79 | /**
80 | * Get the current user's contacts
81 | *
82 | * Makes all the necesarry requests to import
83 | * the current user's contacts
84 | *
85 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
86 | */
87 | public function getMyContacts()
88 | {
89 | if (!$this->login_ok)
90 | {
91 | $this->debugRequest();
92 | $this->stopPlugin();
93 | return false;
94 | }
95 | else $url=$this->login_ok;
96 | $res=$this->get($url,true);
97 | if ($this->checkResponse("url_contact",$res))
98 | $this->updateDebugBuffer('url_contact',$this->login_ok,'GET');
99 | else
100 | {
101 | $this->updateDebugBuffer('url_contact',$this->login_ok,'GET',false);
102 | $this->debugRequest();
103 | $this->stopPlugin();
104 | return false;
105 | }
106 | $contacts=array();
107 | $nrFriends=(int)$this->getElementString($res,"Hai "," contatti");$exit=0;$page=1;
108 | while($nrFriends>count($contacts))
109 | {
110 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
111 | $xpath=new DOMXPath($doc);$query="//a";$data=$xpath->query($query);
112 | foreach($data as $node)
113 | if (strpos($node->getAttribute('href'),'PABreturnURL=Contacts')!==false)
114 | { $name=$node->childNodes->item(0)->nodeValue;$email=$node->childNodes->item(2)->nodeValue;if (!empty($email)) $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email); }
115 | $page++;$res=$this->get("http://mobimail.virgilio.it/cp/ps/PSPab/Contacts?d=virgilio.it&u={$this->service_user}&t={$this->sessionVer}&reset=true&startAt={$page}&l=it",true);
116 | }
117 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
118 | return $this->returnContacts($contacts);
119 | }
120 |
121 | /**
122 | * Terminate session
123 | *
124 | * Terminates the current user's session,
125 | * debugs the request and reset's the internal
126 | * debudder.
127 | *
128 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
129 | */
130 | public function logout()
131 | {
132 | if (!$this->checkSession()) return false;
133 | if (file_exists($this->getLogoutPath()))
134 | {$vergilioT=file_get_contents($this->getLogoutPath());$res=$this->get("http://mobimail.virgilio.it/cp/ps/Main/login/Logout?d=virgilio.it&u={$this->service_user}&t={$vergilioT}&l=it",true);}
135 | $this->debugRequest();
136 | $this->resetDebugger();
137 | $this->stopPlugin();
138 | return true;
139 | }
140 | }
141 | ?>
--------------------------------------------------------------------------------
/plugins/walla.plg.php:
--------------------------------------------------------------------------------
1 | 'Walla',
9 | 'version'=>'1.0.5',
10 | 'description'=>"Get the contacts from a Walla mail account",
11 | 'base_version'=>'1.6.5',
12 | 'type'=>'email',
13 | 'check_url'=>'http://friends.walla.co.il/?tsscript=login&theme=&ReturnURL=http://newaddress.walla.co.il/ts.cgi',
14 | 'requirement'=>'email',
15 | 'allowed_domains'=>false,
16 | 'detected_domains'=>array('/(walla.com)/i','/(walla.co.il)/i'),
17 | 'imported_details'=>array('first_name','email_1'),
18 | );
19 | /**
20 | * Walla Plugin
21 | *
22 | * Imports user's contacts from Walla's AddressBook
23 | *
24 | * @author OpenInviter
25 | * @version 1.0.0
26 | */
27 | class walla extends openinviter_base
28 | {
29 | private $login_ok=false;
30 | public $showContacts=true;
31 | public $internalError=false;
32 | protected $timeout=30;
33 |
34 | public $debug_array=array(
35 | 'initial_get'=>'@login',
36 | 'post_login'=>'newaddress',
37 | 'url_contacts'=>'@compose',
38 | );
39 |
40 | /**
41 | * Login function
42 | *
43 | * Makes all the necessary requests to authenticate
44 | * the current user to the server.
45 | *
46 | * @param string $user The current user.
47 | * @param string $pass The password for the current user.
48 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
49 | */
50 | public function login($user,$pass)
51 | {
52 | $this->resetDebugger();
53 | $this->service='walla';
54 | $this->service_user=$user;
55 | $this->service_password=$pass;
56 | if (!$this->init()) return false;
57 |
58 | $res=$this->get("http://friends.walla.co.il/?tsscript=login&theme=&ReturnURL=http://newaddress.walla.co.il/ts.cgi",true);
59 | if ($this->checkResponse('initial_get',$res))
60 | $this->updateDebugBuffer('initial_get',"http://www.gawab.com/default.php",'GET');
61 | else
62 | {
63 | $this->updateDebugBuffer('initial_get',"http://www.gawab.com/default.php",'GET',false);
64 | $this->debugRequest();
65 | $this->stopPlugin();
66 | return false;
67 | }
68 |
69 | $form_action="http://friends.walla.co.il/";
70 | $post_elements=array('w'=>'/@login.commit',
71 | 'ReturnURL'=>'http://newaddress.walla.co.il/ts.cgi',
72 | 'username'=>$user,
73 | 'password'=>$pass
74 | );
75 | $res=$this->post($form_action,$post_elements,true);
76 | if ($this->checkResponse('post_login',$res))
77 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',true,$post_elements);
78 | else
79 | {
80 | $this->updateDebugBuffer('post_login',"{$form_action}",'POST',false,$post_elements);
81 | $this->debugRequest();
82 | $this->stopPlugin();
83 | return false;
84 | }
85 | $url_contacts="http://newaddress.walla.co.il";
86 | $this->login_ok=$url_contacts;
87 | return true;
88 | }
89 |
90 | /**
91 | * Get the current user's contacts
92 | *
93 | * Makes all the necesarry requests to import
94 | * the current user's contacts
95 | *
96 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
97 | */
98 | public function getMyContacts()
99 | {
100 | if (!$this->login_ok)
101 | {
102 | $this->debugRequest();
103 | $this->stopPlugin();
104 | return false;
105 | }
106 | else $url=$this->login_ok;
107 | $res=$this->get($url);
108 | if ($this->checkResponse('url_contacts',$res))
109 | $this->updateDebugBuffer('url_contacts',$url,'GET');
110 | else
111 | {
112 | $this->updateDebugBuffer('url_contacts',$url,'GET',false);
113 | $this->debugRequest();
114 | $this->stopPlugin();
115 | return false;
116 | }
117 |
118 | $contacts=array();
119 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
120 | $xpath=new DOMXPath($doc);$query="//tr[@class='wList1']";$data=$xpath->query($query);
121 | foreach($data as $node)
122 | {
123 | $name = '';
124 | $email = '';
125 | $name = $node->childNodes->item(2)->nodeValue;
126 | $email = $node->childNodes->item(3)->nodeValue;
127 |
128 | if (!empty($email))
129 | $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
130 | }
131 |
132 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
133 | return $this->returnContacts($contacts);
134 |
135 | }
136 |
137 | /**
138 | * Terminate session
139 | *
140 | * Terminates the current user's session,
141 | * debugs the request and reset's the internal
142 | * debudder.
143 | *
144 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
145 | */
146 | public function logout()
147 | {
148 | if (!$this->checkSession()) return false;
149 | $res=$this->get("http://friends.walla.co.il/?w=/@logout",true);
150 | $this->debugRequest();
151 | $this->resetDebugger();
152 | $this->stopPlugin();
153 | return true;
154 | }
155 |
156 | }
157 | ?>
--------------------------------------------------------------------------------
/plugins/wpl.plg.php:
--------------------------------------------------------------------------------
1 | 'Wp.pt',
4 | 'version'=>'1.0.4',
5 | 'description'=>"Get the contacts from an Wp.pt account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://wap.poczta.wp.pl/',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Wp.pt Plugin
15 | *
16 | * Imports user's contacts from Wp.pt account
17 | *
18 | * @author OpenInviter
19 | * @version 1.0.0
20 | */
21 | class wpl extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | public $internalError=false;
26 | protected $timeout=30;
27 |
28 | public $debug_array=array('initial_get'=>'zaloguj',
29 | 'login_post'=>'addresses.html',
30 | 'url_adress'=>'addraction',
31 | 'url_contact'=>'info'
32 | );
33 |
34 | /**
35 | * Login function
36 | *
37 | * Makes all the necessary requests to authenticate
38 | * the current user to the server.
39 | *
40 | * @param string $user The current user.
41 | * @param string $pass The password for the current user.
42 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
43 | */
44 | public function login($user, $pass)
45 | {
46 | $this->resetDebugger();
47 | $this->service='wp';
48 | $this->service_user=$user;
49 | $this->service_password=$pass;
50 | if (!$this->init()) return false;
51 |
52 | $res = $this->get("http://wap.poczta.wp.pl/",true);
53 |
54 |
55 | if ($this->checkResponse("initial_get",$res))
56 | $this->updateDebugBuffer('initial_get',"http://wap.poczta.wp.pl/",'GET');
57 | else
58 | {
59 | $this->updateDebugBuffer('initial_get',"http://wap.poczta.wp.pl/",'GET',false);
60 | $this->debugRequest();
61 | $this->stopPlugin();
62 | return false;
63 | }
64 |
65 | $form_action="http://wap.poczta.wp.pl/index.html";
66 | $post_elements=array('login'=>$user,
67 | 'password'=>$pass,
68 | 'zaloguj'=>'Zaloguj'
69 | );
70 |
71 | $res=$this->post($form_action,$post_elements);
72 | if ($this->checkResponse("login_post",$res))
73 | $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements);
74 | else
75 | {
76 | $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements);
77 | $this->debugRequest();
78 | $this->stopPlugin();
79 | return false;
80 | }
81 | $url_adress='http://wap.poczta.wp.pl/addresses.html?'.$this->getElementString($res,'addresses.html?','"');
82 | $this->login_ok=$url_adress;
83 | return true;
84 | }
85 |
86 | /**
87 | * Get the current user's contacts
88 | *
89 | * Makes all the necesarry requests to import
90 | * the current user's contacts
91 | *
92 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
93 | */
94 | public function getMyContacts()
95 | {
96 | if (!$this->login_ok)
97 | {
98 | $this->debugRequest();
99 | $this->stopPlugin();
100 | return false;
101 | }
102 | else $url=$this->login_ok;
103 | $res=$this->get($url);
104 | if ($this->checkResponse("url_adress",$res))
105 | $this->updateDebugBuffer('url_adress',$url,'GET');
106 | else
107 | {
108 | $this->updateDebugBuffer('url_adress',$url,'GET',false);
109 | $this->debugRequest();
110 | $this->stopPlugin();
111 | return false;
112 | }
113 | $contacts=array();
114 | $href_array=$this->getElementDOM($res,"//a[@href]",'href');
115 | foreach ($href_array as $value)
116 | if (strpos($value,'addresses.html?action=addraction&aid=')!==false)
117 | {
118 |
119 | $res=$this->get("http://wap.poczta.wp.pl/{$value}");
120 | if ($this->checkResponse("url_contact",$res))
121 | $this->updateDebugBuffer('url_contact',"http://wap.poczta.wp.pl/{$value}",'GET');
122 | else
123 | {
124 | $this->updateDebugBuffer('url_contact',"http://wap.poczta.wp.pl/{$value}",'GET',false);
125 | $this->debugRequest();
126 | $this->stopPlugin();
127 | return false;
128 | }
129 | $contacts_array=$this->getElementDOM($res,"//p[@class='info']");
130 | $contacts_exploded=explode(' <',$contacts_array[0]);$email=str_replace('>','',$contacts_exploded[1]);$name=trim(preg_replace('/[^(\x20-\x7F)]*/','',$contacts_exploded[0]));
131 | $contacts[$email]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$email);
132 | }
133 |
134 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
135 | return $this->returnContacts($contacts);
136 | }
137 |
138 | /**
139 | * Terminate session
140 | *
141 | * Terminates the current user's session,
142 | * debugs the request and reset's the internal
143 | * debudder.
144 | *
145 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
146 | */
147 | public function logout()
148 | {
149 | if (!$this->checkSession()) return false;
150 | $res=$this->get('http://wap.poczta.wp.pl/');
151 | $url_logout='http://wap.poczta.wp.pl/index.html?logout=1&ticaid='.$this->getElementString($res,'index.html?logout=1&ticaid=','"');
152 | $res=$this->get($url_logout);
153 | $this->debugRequest();
154 | $this->resetDebugger();
155 | $this->stopPlugin();
156 | }
157 | }
158 | ?>
--------------------------------------------------------------------------------
/plugins/xing.plg.php:
--------------------------------------------------------------------------------
1 | 'Xing',
4 | 'version'=>'1.0.7',
5 | 'description'=>"Get the contacts from a Xing account",
6 | 'base_version'=>'1.8.0',
7 | 'type'=>'email',
8 | 'check_url'=>'https://mobile.xing.com/',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Xing Plugin
15 | *
16 | * Import user's contacts from Xing and send
17 | * messages using the internal messaging system
18 | *
19 | * @author OpenInviter
20 | * @version 1.0.0
21 | */
22 | class xing extends openinviter_base
23 | {
24 | private $login_ok=false;
25 | public $showContacts=true;
26 | public $internalError=false;
27 | protected $timeout=30;
28 |
29 | public $debug_array=array(
30 | 'initial_get'=>'login_user_name',
31 | 'post_login'=>'contact',
32 | 'get_friends'=>'user-name',
33 | );
34 |
35 | /**
36 | * Login function
37 | *
38 | * Makes all the necessary requests to authenticate
39 | * the current user to the server.
40 | *
41 | * @param string $user The current user.
42 | * @param string $pass The password for the current user.
43 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
44 | */
45 | public function login($user,$pass)
46 | {
47 | $this->resetDebugger();
48 | $this->service='xing';
49 | $this->service_user=$user;
50 | $this->service_password=$pass;
51 | if (!$this->init()) return false;
52 |
53 | $res=$this->get("https://www.xing.com/");
54 | if ($this->checkResponse("initial_get",$res))
55 | $this->updateDebugBuffer('initial_get',"https://mobile.xing.com/",'GET');
56 | else
57 | {
58 | $this->updateDebugBuffer('initial_get',"https://mobile.xing.com/",'GET',false);
59 | $this->debugRequest();
60 | $this->stopPlugin();
61 | return false;
62 | }
63 | $form_action="https://www.xing.com/app/user";
64 | $post_elements=array('op'=>'login',
65 | 'dest'=>'https://www.xing.com/',
66 | 'login_user_name'=>$user,
67 | 'login_password'=>$pass,
68 | 'sv-remove-name'=>'Log in'
69 | );
70 | $res=$this->post($form_action,$post_elements,true);
71 | if ($this->checkResponse("post_login",$res))
72 | $this->updateDebugBuffer('post_login',$form_action,'POST',true,$post_elements);
73 | else
74 | {
75 | $this->updateDebugBuffer('post_login',$form_action,'POST',false,$post_elements);
76 | $this->debugRequest();
77 | $this->stopPlugin();
78 | return false;
79 | }
80 |
81 | $url_adressbook='https://www.xing.com/app/contact';
82 | $this->login_ok=$url_adressbook;
83 | return true;
84 | }
85 |
86 | /**
87 | * Get the current user's contacts
88 | *
89 | * Makes all the necesarry requests to import
90 | * the current user's contacts
91 | *
92 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
93 | */
94 | public function getMyContacts()
95 | {
96 | if (!$this->login_ok)
97 | {
98 | $this->debugRequest();
99 | $this->stopPlugin();
100 | return false;
101 | }
102 | else $url=$this->login_ok;
103 | $res=$this->get($url,true);
104 | $contacts=array();
105 | if ($this->checkResponse("get_friends",$res))
106 | $this->updateDebugBuffer('get_friends',$url,'GET');
107 | else
108 | {
109 | $this->updateDebugBuffer('get_friends',$url,'GET',false);
110 | $this->debugRequest();
111 | $this->stopPlugin();
112 | return false;
113 | }
114 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
115 | $xpath=new DOMXPath($doc);
116 | $query="//a[@class='user-name']";$data=$xpath->query($query);
117 | foreach ($data as $node) $users[$node->getAttribute('href')]=$node->nodeValue;
118 | if (!empty($users))
119 | foreach($users as $profileLink=>$name)
120 | {
121 | $res=$this->get('https://www.xing.com'.$profileLink,true);
122 | $mails=$this->getElementDOM($res,"//a[@class='url']");
123 | if (!empty($mails[0])) $contacts[$mails[0]]=array('email_1'=>$mails[0],'first_name'=>$name);
124 | }
125 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
126 | return $this->returnContacts($contacts);
127 | }
128 |
129 | /**
130 | * Terminate session
131 | *
132 | * Terminates the current user's session,
133 | * debugs the request and reset's the internal
134 | * debudder.
135 | *
136 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
137 | */
138 | public function logout()
139 | {
140 | if (!$this->checkSession()) return false;
141 | $res=$this->get("https://www.xing.com/app/user?op=logout",true);
142 | $this->debugRequest();
143 | $this->resetDebugger();
144 | $this->stopPlugin();
145 | return true;
146 | }
147 | }
148 |
149 | ?>
--------------------------------------------------------------------------------
/plugins/yahoo.plg.php:
--------------------------------------------------------------------------------
1 | 'Yahoo!',
4 | 'version'=>'1.5.5',
5 | 'description'=>"Get the contacts from a Yahoo! account",
6 | 'base_version'=>'1.8.0',
7 | 'type'=>'email',
8 | 'check_url'=>'http://mail.yahoo.com',
9 | 'requirement'=>'email',
10 | 'allowed_domains'=>array('/(yahoo)/i','/(ymail)/i','/(rocketmail)/i'),
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Yahoo! Plugin
15 | *
16 | * Imports user's contacts from Yahoo!'s AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.3.8
20 | */
21 | class yahoo extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | protected $timeout=30;
26 | public $debug_array=array(
27 | 'initial_get'=>'util.Event.addListener',
28 | 'login_post'=>'window.location.replace',
29 | 'print_page'=>'field[allc]',
30 | 'contacts_file'=>'"'
31 | );
32 |
33 | /**
34 | * Login function
35 | *
36 | * Makes all the necessary requests to authenticate
37 | * the current user to the server.
38 | *
39 | * @param string $user The current user.
40 | * @param string $pass The password for the current user.
41 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
42 | */
43 | public function login($user,$pass)
44 | {
45 | $this->resetDebugger();
46 | $this->service='yahoo';
47 | $this->service_user=$user;
48 | $this->service_password=$pass;
49 | if (!$this->init()) return false;
50 |
51 | $res=$this->get("https://login.yahoo.com/config/mail?.intl=us&rl=1");
52 | if ($this->checkResponse('initial_get',$res))
53 | $this->updateDebugBuffer('initial_get',"https://login.yahoo.com/config/mail?.intl=us&rl=1",'GET');
54 | else
55 | {
56 | $this->updateDebugBuffer('initial_get',"https://login.yahoo.com/config/mail?.intl=us&rl=1",'GET',false);
57 | $this->debugRequest();
58 | $this->stopPlugin();
59 | return false;
60 | }
61 |
62 | $post_elements=$this->getHiddenElements($res);$post_elements["save"]="Sign+In";$post_elements['login']=$user;$post_elements['passwd']=$pass;
63 | $res=$this->post("https://login.yahoo.com/config/login?",$post_elements,true);
64 | if ($this->checkResponse('login_post',$res))
65 | $this->updateDebugBuffer('login_post',"https://login.yahoo.com/config/login?",'POST',true,$post_elements);
66 | else
67 | {
68 | $this->updateDebugBuffer('login_post',"https://login.yahoo.com/config/login?",'POST',false,$post_elements);
69 | $this->debugRequest();
70 | $this->stopPlugin();
71 | return false;
72 | }
73 | $this->login_ok=$this->login_ok="http://address.mail.yahoo.com/?_src=&VPC=print";
74 | return true;
75 | }
76 |
77 | /**
78 | * Get the current user's contacts
79 | *
80 | * Makes all the necesarry requests to import
81 | * the current user's contacts
82 | *
83 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
84 | */
85 | public function getMyContacts()
86 | {
87 | if (!$this->login_ok)
88 | {
89 | $this->debugRequest();
90 | $this->stopPlugin();
91 | return false;
92 | }
93 | else
94 | $url=$this->login_ok;
95 | $contacts=array();
96 | $res=$this->get($url,true);
97 | if ($this->checkResponse("print_page",$res))
98 | $this->updateDebugBuffer('print_page',"{$url}",'GET');
99 | else
100 | {
101 | $this->updateDebugBuffer('print_page',"{$url}",'GET',false);
102 | $this->debugRequest();
103 | $this->stopPlugin();
104 | return false;
105 | }
106 |
107 | $post_elements=array('VPC'=>'print',
108 | 'field[allc]'=>1,
109 | 'field[catid]'=>0,
110 | 'field[style]'=>'detailed',
111 | 'submit[action_display]'=>'Display for Printing'
112 | );
113 | $res=$this->post("http://address.mail.yahoo.com/?_src=&VPC=print",$post_elements);
114 | $emailA=array();$bulk=array();
115 | $res=str_replace(array(' ',' ',PHP_EOL,"\n","\r\n"),array('','','','',''),$res);
116 | preg_match_all("#\\(.+)\<\/tr\>(.+)\\<\/div\>\ \<\/div\>(.+)\<\/div\>#U",$res,$bulk);
117 | if (!empty($bulk))
118 | {
119 | foreach($bulk[1] as $key=>$bulkName)
120 | {
121 | $nameFormated=trim(strip_tags($bulkName));
122 | if (preg_match('/\ \;\-\ \;/',$nameFormated))
123 | {
124 | $emailA=explode(' - ',$nameFormated);
125 | if (!empty($emailA[1])) $contacts[$emailA[1].'@yahoo.com']=array('first_name'=>$emailA[0],'email_1'=>$emailA[1].'@yahoo.com');
126 | }
127 | elseif (!empty($bulk[3][$key])) { $email=strip_tags(trim($bulk[3][$key])); $contacts[$email]=array('first_name'=>$nameFormated,'email_1'=>$email); }
128 | }
129 | }
130 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
131 | return $this->returnContacts($contacts);
132 | }
133 |
134 | /**
135 | * Terminate session
136 | *
137 | * Terminates the current user's session,
138 | * debugs the request and reset's the internal
139 | * debudder.
140 | *
141 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
142 | */
143 | public function logout()
144 | {
145 | if (!$this->checkSession()) return false;
146 | $res=$this->get("http://login.yahoo.com/config/login?logout=1&.done=http://address.yahoo.com&.src=ab&.intl=us");
147 | $this->debugRequest();
148 | $this->resetDebugger();
149 | $this->stopPlugin();
150 | return true;
151 | }
152 |
153 | }
154 | ?>
--------------------------------------------------------------------------------
/plugins/zapak.plg.php:
--------------------------------------------------------------------------------
1 | 'Zapakmail',
4 | 'version'=>'1.0.3',
5 | 'description'=>"Get the contacts from an Zapakmail account",
6 | 'base_version'=>'1.6.5',
7 | 'type'=>'email',
8 | 'check_url'=>'http://www.zapak.com/zapakmail.zpk',
9 | 'requirement'=>'user',
10 | 'allowed_domains'=>false,
11 | 'imported_details'=>array('first_name','email_1'),
12 | );
13 | /**
14 | * Zapakmail Plugin
15 | *
16 | * Imports user's contacts from Zapakmail's AddressBook
17 | *
18 | * @author OpenInviter
19 | * @version 1.6.5
20 | */
21 | class zapak extends openinviter_base
22 | {
23 | private $login_ok=false;
24 | public $showContacts=true;
25 | protected $timeout=30;
26 | public $debug_array=array(
27 | 'initial_get'=>'uid',
28 | 'login_post'=>'msgid',
29 | 'url_adress'=>'onclick'
30 | );
31 |
32 | /**
33 | * Login function
34 | *
35 | * Makes all the necessary requests to authenticate
36 | * the current user to the server.
37 | *
38 | * @param string $user The current user.
39 | * @param string $pass The password for the current user.
40 | * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise.
41 | */
42 | public function login($user,$pass)
43 | {
44 | $this->resetDebugger();
45 | $this->service='zapakmail';
46 | $this->service_user=$user;
47 | $this->service_password=$pass;
48 | if (!$this->init()) return false;
49 |
50 | $res=$this->get("http://www.zapak.com/zapakmail.zpk",true);
51 | if ($this->checkResponse('initial_get',$res))
52 | $this->updateDebugBuffer('initial_get',"http://www.zapak.com/zapakmail.zpk",'GET');
53 | else
54 | {
55 | $this->updateDebugBuffer('initial_get',"http://www.zapak.com/zapakmail.zpk",'GET',false);
56 | $this->debugRequest();
57 | $this->stopPlugin();
58 | return false;
59 | }
60 |
61 | $form_action="http://www.zapak.com/authenticateuser.zpk?redirect=/emailr.zpk? ";
62 | $post_elements=array('uid'=>$user,
63 | 'password'=>$pass,
64 | 'Submit32.x'=>rand(10,50),
65 | 'Submit32.y'=>rand(10,50),
66 | 'isemail'=>'y',
67 | 'regflag'=>1
68 | );
69 | $res=$this->post($form_action,$post_elements,true);
70 | if ($this->checkResponse('login_post',$res))
71 | $this->updateDebugBuffer('login_post',"$form_action",'POST',true,$post_elements);
72 | else
73 | {
74 | $this->updateDebugBuffer('login_post',"$form_action",'POST',false,$post_elements);
75 | $this->debugRequest();
76 | $this->stopPlugin();
77 | return false;
78 | }
79 |
80 | $url_address='http://www.zapak.com/mc.zpk';
81 | $this->login_ok=$url_address;
82 | return true;
83 | }
84 |
85 | /**
86 | * Get the current user's contacts
87 | *
88 | * Makes all the necesarry requests to import
89 | * the current user's contacts
90 | *
91 | * @return mixed The array if contacts if importing was successful, FALSE otherwise.
92 | */
93 | public function getMyContacts()
94 | {
95 | if (!$this->login_ok)
96 | {
97 | $this->debugRequest();
98 | $this->stopPlugin();
99 | return false;
100 | }
101 | else
102 | $url=$this->login_ok;
103 | //go to url inbox
104 | $res=$this->get($url,true);
105 | if ($this->checkResponse("url_adress",$res))
106 | $this->updateDebugBuffer('url_adress',"{$url}",'GET');
107 | else
108 | {
109 | $this->updateDebugBuffer('url_adress',"{$url}",'GET',false);
110 | $this->debugRequest();
111 | $this->stopPlugin();
112 | return false;
113 | }
114 |
115 | $contacts=array();
116 | $doc=new DOMDocument();libxml_use_internal_errors(true);if (!empty($res)) $doc->loadHTML($res);libxml_use_internal_errors(false);
117 | $xpath=new DOMXPath($doc);$query="//a[@onclick]";$data=$xpath->query($query);
118 | foreach($data as $node)
119 | {
120 | if ($node->nodeValue=='Edit')
121 | {
122 | $emails=str_replace('firstname=',"",str_replace("lastname=","",str_replace("email=","",$this->getElementString((string)$node->getAttribute('onclick'),'?','&id'))));
123 | $emails_array=explode("&",$emails);
124 | $name=(isset($emails_array[0])?$emails_array[0]:false)." ".(isset($emails_array[1])?$emails_array[1]:false);
125 | if ($emails_array[2])
126 | $contacts[$emails_array[2]]=array('first_name'=>(!empty($name)?$name:false),'email_1'=>$emails_array[2]);
127 | }
128 | }
129 | foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);
130 | return $this->returnContacts($contacts);
131 | }
132 |
133 | /**
134 | * Terminate session
135 | *
136 | * Terminates the current user's session,
137 | * debugs the request and reset's the internal
138 | * debudder.
139 | *
140 | * @return bool TRUE if the session was terminated successfully, FALSE otherwise.
141 | */
142 | public function logout()
143 | {
144 | if (!$this->checkSession()) return false;
145 | echo $res=$this->get("http://www.zapak.com/mlor.z?zmail=y",true);
146 | $this->debugRequest();
147 | $this->resetDebugger();
148 | $this->stopPlugin();
149 | return true;
150 | }
151 |
152 | }
153 | ?>
--------------------------------------------------------------------------------
|