How to connect google and allow my user to invite their contacts - php
I have a site, where users sign up. After that they get a great product offer, and I would like to allow them to use from my site "Google connect button" and invite their friends and contacts via Google network.
How can I do that?
Follow up
Sample i found
ex: http://www.dumpsquestions.com/testing/wp-content/themes/ModulaBlueGiant/open/example.php
According to your advise i found that, it allowes a lot ?
Free import contacts (addressbook) script from email providers like
Libero, Interia, Azet, Lycos, AOL, Bordermail, Doramail, Freemail, Kids, Rambler, Mail.ru, Care2, Grafitti, Walla, LinkedIn,
Inbox.com, Mail2World, Meta, IndiaTimes, Sapo.pt, Live/Hotmail, 5Fm, Netaddress, Rediff,
Yahoo!, Aussiemail, KataMail, Gawab, GMX.net, Terra, Uk2, Apropo, Popstarmail, Mynet.com,
YouTube, Bigstring, OperaMail, Mail.com, Mail.in, Nz11, Inet, Pochta, Web.de, Canoe, India, Clevergo, Wp.pt, Evite, Yandex,
GMail, Atlas, Hushmail, O2, Techemail, FastMail, Zapakmail, Virgilio, Abv or social portals like Ning, Hyves, Meinvz, Plurk, Xanga, Tagged, Mydogspace, Konnects, Bebo, Friendfeed, Plazes, Flickr, Cyworld, Last.fm, Mevio, Vkontakte, Skyrock, MySpace, Xuqa, Lovento, Faces, Plaxo, NetLog,
Facebook, Perfspot, Mycatspace, Livejournal, Famiva, Flixster, Xing, Multiply, Brazencareerist, Orkut, Bookcrossing,
Twitter, Koolro, Eons, Hi5, Fdcareer, Motortopia, Vimeo, Kincafe, Flingr, Friendster, Badoo. This contacts importer script is integrating with content management systems (aka CMS) like myBB, Dating Pro, JamRoom, Joomla, PHPMELODY, Boonex Dolphin, Vwebmail, Atmail5, PhpBB, phpFoX, SimpleMachines Forum (SMF), phpizabi, joovili, Joomla1.0, vBulletin, Drupal, jamit job, symfony, Buddy Zone, Wordpress, nowFire, Social Engine, PunBB, RoundCube.
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.
Installation it says:
Openinviter installation Guide.
Thank you for downloading The OpenInviter General Package. This document will guide you through the installation process.
A: Requirements:
Your server will need to have PHP5 installed with DOMDocument support and either cURL or WGET.
B: Install:
1. Extract the contents of the openinviter.tar.gz file you have just downloaded.
Note: tar -xzvf openinviter.tar.gz
2. Upload the extracted files to your webserver (subfolder is highly advised).
3. Run postinstall.php (http://yourdomain/openinviter_dir/postinstall.php)
You may encounter the following errors:
i) The cookie storing folder if not writable. (Change the cookie folder or modify it's permisions.)
ii) Php DOM extension is not installed. (Install dom extension for php)
iii) You don't have curl or wget installed. (Install curl or wget)
You may encounter the following warnings:
i) A plugin does not work properly. (Your server has either a firewall or there is a connectivity error)
Note: You have to fix all the errors or openinviter will probably not work.
Note*: You can't run postinstall.php again for 2 minutes.
4. Edit config.php to suit your needs.
5. Delete postinstall.php
6. Run example.php (http://yourdomain/openinviter_dir/example.php) and try to fetch your contacts.
Note: example.php is modifiable but keep in mind the structure of the file.
Also, its providing a PDF how to do it with PHP, excellent work has been done to respect KISS (keep it simple stupid!!).
Do you want users to be able to login/use your website using their google id? In that case, you can use OpenId, a standardized way to login (you'll be able to use other providers too). For more information about the implementation, look here (http://openid.net/developers/libraries/). This normally done on the server, so probably not with javascript.
Related
Empty directory when generating Cloud Endpoints PHP client with Google APIs Client Generator
I'm trying to generate a PHP client for my Google Cloud Endpoints API using the Google APIs Client Generator but it just creates an empty directory instead. The command I'm using looks like: generate_library --language=php --language_variant=stable --output_dir=/path/php-client --input=/path/myApi-v1.json It seems to work when I change the language to csharp and java. I turned on the verbose flag and don't see any errors, only tracing messages like: DEBUG:codegen:Create: myMethod, parent=update DEBUG:codegen:Schema.Create: updateRequestContent => MyMessage DEBUG:codegen:DataTypeFromJson: add MyMessage to cache Searching around I see someone at the AppEngine sub Reddit posted a similar issue with no response.
I used another approach: downloaded the zip from https://github.com/google/apis-client-generator Extracted the zip file in a directory (i named it client-generator) Executed the generate.sh script available in the extracted files. /path/client-generator/generate.sh --input=/path/rest.json --language=php --output_dir=/path/output The APICLassName.php file is generated
I tried again and changed the --language_variant argument from stable to 1.1.4 and it now works fine.
How to use PHP to retrieve Wowza HTTP Providers
Wowza Streaming Server provides HTTP Providers for providing information about current connections and server status. They use basic HTTP authentication in the model of http://username:password#url.com:8086/connectioncounts. This will output an xml view of what's happening on the server and how many streaming connections there are. I'm admittedly a PHP newb but I've searched through a fair amount of Stackoverflow and Google. I've tried many of the examples and so far all that is returned is nothing when trying to programmatically access the data. I've attempted to use cURL as well use the simplexml tools. phpinfo() tells me I have all of the necessary packages to remotes work with and process urls and remote xml files. I have tested the same code with other pages like my website and it works just fine albeit my homepage doesn't use basic authentication. Similar questions I've tried: PHP Get XML from Remote URL with HTTP Authentication How can I read a remote XML file that uses digest authentication? Typical output looks like this: This XML file does not appear to have any style information associated with it. The document tree is shown below. <WowzaMediaServer> <ConnectionsCurrent>1</ConnectionsCurrent> <ConnectionsTotal>2</ConnectionsTotal> <ConnectionsTotalAccepted>2</ConnectionsTotalAccepted> <ConnectionsTotalRejected>0</ConnectionsTotalRejected> <MessagesInBytesRate>1324.0</MessagesInBytesRate> <MessagesOutBytesRate>0.0</MessagesOutBytesRate> <VHost> <Name>_defaultVHost_</Name> <TimeRunning>5883.723</TimeRunning> <ConnectionsLimit>0</ConnectionsLimit> <ConnectionsCurrent>1</ConnectionsCurrent> <ConnectionsTotal>2</ConnectionsTotal> <ConnectionsTotalAccepted>2</ConnectionsTotalAccepted> <ConnectionsTotalRejected>0</ConnectionsTotalRejected> <MessagesInBytesRate>1324.0</MessagesInBytesRate> <MessagesOutBytesRate>0.0</MessagesOutBytesRate> <Application> <Name>live</Name> <Status>loaded</Status> <TimeRunning>5877.738</TimeRunning> <ConnectionsCurrent>1</ConnectionsCurrent> <ConnectionsTotal>2</ConnectionsTotal> <ConnectionsTotalAccepted>2</ConnectionsTotalAccepted> <ConnectionsTotalRejected>0</ConnectionsTotalRejected> <MessagesInBytesRate>1324.0</MessagesInBytesRate> <MessagesOutBytesRate>0.0</MessagesOutBytesRate> <ApplicationInstance> <Name>_definst_</Name> <TimeRunning>5877.622</TimeRunning> <ConnectionsCurrent>1</ConnectionsCurrent> <ConnectionsTotal>2</ConnectionsTotal> <ConnectionsTotalAccepted>2</ConnectionsTotalAccepted> <ConnectionsTotalRejected>0</ConnectionsTotalRejected> <MessagesInBytesRate>1324.0</MessagesInBytesRate> <MessagesOutBytesRate>0.0</MessagesOutBytesRate> <Stream> <Name>mystream.mp4</Name> <SessionsFlash>0</SessionsFlash> <SessionsCupertino>0</SessionsCupertino> <SessionsSanJose>0</SessionsSanJose> <SessionsSmooth>0</SessionsSmooth> <SessionsRTSP>0</SessionsRTSP> <SessionsMPEGDash>0</SessionsMPEGDash> <SessionsTotal>0</SessionsTotal> </Stream> </ApplicationInstance> </Application> </VHost> </WowzaMediaServer>
The default HTTP Authentication for wowza media server is digest. But you can change it to basic in VHost.xml in conf folder. Just change admin-digest to be admin-basic
Selenium 2 & Firefox profiles do not get applied
So i'm stuck, I'm running my script through a proxy which requires HTTP Authentication, however I can't authenticate with #:.. So I decided to create a profile that has the authentication plugin added for FireFox and make it auto input. I've made the zip base64 file, as I'm running on OSX I used the following commands, zip -r profile 3rkomsuo.selenium openssl base64 -in "profile.zip" -out "profile.zip.b64" The file is 24MBs tho(edit, disabled firebug and now it's only about 4MB, still no luck)? I only added 2 plugins, firebug and Auth plugin, that's tiny! Now I've put the file into my web directory, I'm running MAMP, and I send the profile as described. $session = $web_driver->session('firefox', array("firefox_profile" => file_get_contents("profile.zip.b64"))); I've checked the POST, send a correct array, i've increased PHP POST size in php.ini to 64MBs just in case, however nothing works, still loads the basic(nothing set up) profile? If anyone could help you would be my hero as I've spent several hours debugging this without any luck!
Managed to set up the profile, make sure you rename prefs.js to user.js and zip the folder contents for the profile, not the profile folder itself!
If making profile is not working in your case then you can handle Authentication dialog by using Autoit. Write a few line script in autoit. Compile it to convert it in exe. Call that exe before the line which causes the authentication dialog to appear.
GWT with -noserver
I'm making a GWT project that uses PHP to connect to a DB2 database. When I compile the project and deploy it to the server (copy the contents of the WAR directory over), it works fine, obviously in hosted mode I run into the SOP issue since GWT is on port 8888 while the php script is running on port 80. I'm trying to get the -noserver option to work but I must be missing something.. I went back and created the basic sample app from the command line (webApplicationCreator -out /home/mike/gwt/sample1) I edited the build.xml to include the -noserver and -port 80 arguements for devmode. I want my app to be hosted at localhost/sample1 so I edited the -startupUrl to the whole URL I want to use: http://localhost/sample1/sample1.html I compiled (ant), copied over the sample1.html, sample1.css from war to the webserver sample1 directory, and the (md5).gwt.rpc, clear.cache.gif, sample1.nocache.js and hosted.html files from the war/sample1 to sample1/sample1 directory as described in the GWT documentation (no history.html file was created). I then run ant devmode from the project directory (/home/mike/gwt/sample1) I can get to the sample1.html page, but when I click the button to send the name to the server it returns with Remote Procedure Call - Failure Server replies: An error occurred while attempting to contact the server. Please check your network connection and try again. I turned on firebug and it's returning a 404 for http://localhost/sample1/sample1/greet. This is where I'm stuck.. this file obviously doesn't exist on my webserver.. but why? Isn't this something that is supposed to be getting compiled by GWT? Can anyone give me a hand? Thanks!
So, basically you've copied over the client-side of a client/server application. When your GWT client application attempts to make a Remote Procedure Call (RPC) to the server to a greeting service that is part of the initial sample, it can't find that service. If you wanted to copy that service over, you'd need to have a Java application server, copy over the GreetingService, the web.xml that references it and possibly a few other things (I'd have to check in more detail). That doesn't sound like what you actually want, so either you'll want to build a GWT-RPC service in PHP that responds to that URL, or remove the reference in the GWT code to RPC call to the greeting service. With a PHP back-end, you're probably not going to use GWT-RPC, I'm guessing that you're more likely to use JSON or XML, and if that's the case, then I'd go with removing the RPC call altogether for now. Does this all make sense? Feel free to ask for further clarification.
To solve the SOP issue, I used the HttpProxyServlet to proxy the HTTP requests to my webserver through the development server. Download httpProxyPackage.jar, copy it into WEB-INF/lib/, and configure it like so in WEB-INF/web.xml (this is for the StockWatcher tutorial, assuming your web root is the folder that contains the StockWatcher directory): <servlet> <servlet-name>jsonStockData</servlet-name> <servlet-class>com.jsos.httpproxy.HttpProxyServlet</servlet-class> <init-param> <param-name>host</param-name> <param-value>http://localhost/StockWatcher/war/stockPrices.php</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>jsonStockData</servlet-name> <!-- http://127.0.0.1:8888/stockPrices.php in dev mode http://gwt/StockWatcher/war/stockPrices.php in prod mode --> <url-pattern>/stockPrices.php</url-pattern> </servlet-mapping> Then redefine your JSON URL as: GWT.getHostPageBaseURL() + "stockPrices.php?q="; instead of: GWT.getModuleBaseURL() + "stockPrices.php?q="; It’s maybe not the best way, but if it can get someone else started… There was another way using php-cgi, but I didn’t have it installed.
create ftp account in plesk using php
i will create ftp account in plesk using php that ever user register in site can have an ftp account with his username and password . i found many php api for cpanel but in plesk i can't find any thing ? can you help me ? thank you so a lot before !
FTP user creation in Plesk Via SSH http://ryanjbonnell.com/journal/ftp-account
I only run Plesk on CentOS, but there should be a similar directory on the Windows side. That being said, here's where I'd look - /usr/local/psa/admin/sbin. The filename I use is "ftpmng". Maybe search in the PSA directory for that. Here's what I get for help docs on that: Usage: ftpmng [OPTIONS]... --reconfigure-all create configuration files for all domains --reconfigure --vhost-name=<domain_name> --set-disk-quota --vhost-name=<domain_name> --quota=<quota> --get-disk-usage --vhost-name=<domain_name> --update-user --user-name=<user_name> --remove-user --user-name=<user_name> --kill-proftpd-process --user-name=<user_name> --pid=<pid> --features returns PHP code which reflects state of several features support in ftpmng. -h, --help display this help and exit
please confirm what plesk version you used. Normally, plesk provides the xml-rpc API for Developer, easily can create ftp and many others with php,java, c#. http://download1.parallels.com/Plesk/PP10/10.4/Doc/en-US/online/plesk-api-rpc-guide/ http://download1.parallels.com/Plesk/PP10/10.4/Doc/en-US/online/plesk-api-rpc/