Connecting to WHM through API - php

Excuse me for my bad English :)
I'm trying to connect to WHM through API and Hash. I just used so many pre-coded scripts which i found on the Net. here are some of them:
http://www.zubrag.com/scripts/create-cpanel-whm-account.php
http://www.phpclasses.org/package/4150-PHP-Manipulate-Cpanel-WHM-accounts-using-its-XML-API.html
& ...
But no luck, because I couldn't get the result which I expect. I just want to get the response of WHM about my command. for example if i send an account creation request, I want to get this response: "Account Created Successfully" or "Account has not been created" (This responses will be sent by whm)
one of pre-coded scripts I've tested was returning the entire page of WHM in result and another one returns nothing at all :-S
You can review WHM SDK documentation in this address: (I've changed the URL to avoid posting links because of my reputation in StackOverflow):
docs[dot]cpanel[dot]net/twiki/bin/view/SoftwareDevelopmentKit/XmlApi
your helps are appreciated.
Thanks so much :)

I would use the PHP WHM class from Cpanel Inc. It's available at github here https://github.com/CpanelInc/publicapi-php

Related

Not able to connect Php application with SharePoint

I am a php developer have no experience with Share Point. I have follow these two links to get Data from Share Point into my Php application.
stackoverflow question here.
A Library for Share Point here.
Share Point team give me 2 IP address. What they said is, I have to login at Forti Client with first IP then second IP is used to access application in browser which is also prompted for Credentials. If I not login in Forti Client with first IP, Web Application will not work at all. One more thing is, this process is working well in windows system but not working on ubuntu (Linux).
So, My Php applications are running on AWS linux ( ec-tier ). I have to get data from Share Point.
I just want to know is it possible to get data from Share Point into my application.
If it is possible then what is the process that I should follow in order to get data.
Kindly help me with your suggestions/answers. Thank you.
Hope these links help you out.
Forti Client CLI for Linux click here.
Shell Script To Use CLI click here.
Is it a SharePoint List or Document library?
If it's a list, use web API to call for the required info.
Refer to my answer in this post:
how to add a connection to a sharepoint list to a word addin

QuickBooks PHP DevKit failure to connect

I have a application set up and have changed my config file to contain the development token and keys from that application. When I run the oauth script, I get to the page where it says I am not connected, and has the button to connect. Upon clicking that button, I get a pop up window that is directed to https://appcenter.intuit.com/NotFound, and it says "Sorry, we can't find the page you are looking for". I am unsure what I am doing wrong at this point.
I would like to connect to my existing Quickbooks Online account so that I can use the Sandbox accounts I have already set up so I can test some new functionality that I am trying to incorporate into my existing application. Any help would be greatly appreciated.
Thank you.
Check the URLs in your config file
Check the URLs in your application configuration on Intuit's site
Check the URLs in your Javascript
If you still can't figure out what's wrong, actually post your code so that someone might be able to actually help you.

How do I add a webhook to my local magento website in mailchimp without exposing the URL publicly (for SEO reasons)?

I am using the magemonkey extension from Ebizmart and when i save my config in the admin i get the following error:
Could not add Webhook "http://example.com/monkey/webhook/index/wkey//" for list "Test Mailing List", error code 508, We couldn't connect to the specified the URL. Please double check and try again.
I did some digging and arrived at the conclusion (duh) that mailchimp cannot see my local environment so it's unable to add the webhook. Is it possible for me to configure this locally for testing purposes or do I have to wait until the site is live (sounds pretty strange to me)?
UPDATE: I reached out to Mailchimp and got the following response. Seems like they won't add a host entry to recognize my test environment. The only way to accomplish this would be to use a handshake key.
Thanks for reaching out to MailChimp support. I can certainly understand the concern here and will be happy to help.
Unfortunately, any webhooks being used must be publically available and there would not be a way to add a host entry in MailChimp so that the URL can be used.
If your testing environement allows for HandShake keys, one options might be to add that on to the url: (can't add more than 2 links)
At MailChimp we definitely appreciate testing and encourage it with our users and I will be sure to pass this feedback along to our developers so that testing in closed environments might be a bit easier. I also wanted to provide a link to our feedback form in case you wanted to leave some feedback for our developers directly: (can't add more than 2 links)
If you have any additional questions or concerns, feel free to reach back out and we will be happy to help.
Thank you,
Mikey
Use https://ngrok.com/, available for all platforms.
It allows you to tunnel requests to your local dev machine. It's very easy to use, just download and run:
ngrok http 80
Then it'll show you the forwarding URL (where xxx is randomly generated):
Forwarding https://xxxxxxxx.ngrok.io -> localhost:80
Use https://xxxxxxxx.ngrok.io as the begining of your webhook callback URL.
Once it's running, a web interface is available at http://127.0.0.1:4040 that shows metrics and let's you replay requests.

Create an email account with PhP - With some things I need to work around

I need to create an email account in PhP. I found a ton of code samples online that do this, however I have a few problems:
I'm on a shared server host with the default php.ini, and my host won't change it
I need to create it via a URL, not with forms (something like: mywebsite.com/email.php?username=user)
The password and quota created needs to be the same every time, so the only thing after the ? I need is the username
I have 0 experience with PhP so I can't just edit one I find online, so sorry if this is easy. If someone could point me in the direction of a script someone made or something that'd be great! Thanks.
From your reply, it turns out that you are using cPanel. This is quite helpful, as cPanel provides its own XML API for some administrative tasks, including creating email accounts.
You can find a ready made script that uses the cPanel XML API and does what you require in this forum post:
http://forums.glowhost.com/programming-talk/using-cpanel-api-creating-email-account-forwarders-your-own-php-scripts-2798.html
This SO question contains information on how to use the cPanel XML API yourself.
If for some reason you can't get the XML API to work, there's another script that makes regular HTTP calls to cPanel itself over here:
http://www.zubrag.com/scripts/cpanel-create-email-account.php

Anyone that had the aol oauth api working?

i'm developing an application with multiple login and information export options like yahoo, google contacts, live contacts etc. I tried to do the oauth wrapper for aol, followed the examples in the http://dev.aol.com/api/openauth page but it doesnt works.
I just only wanted to know if there is anyone that chad succeeded with its specs and got some sample code working, i tried and got the token in response but when i try to do an api request i get the response : Key Used From unauthenticated site
does it have to run in a online server? do i have to get some rsa signed file on my server?
any hint is welcome, thank you very much!
I haven't tried it before but I think you have to tell them your the IP you will sent requests from..
I was making project over enom API and I had to send them my IP to authorize my API requests
sorry for my late response, have being little busy here. The code in the example finally worked right last time i tried, maybe their servers had some issues or i misconfigured the example, not sure, but in my project it didnt worked, finally i managed the solution by using the CURLOPT_REFERER parameter i found in the example. I am sure that it was the issue in my code, because i was testing in a devel environment with a .loc top level domain.
Finally i want to give a hint to all the people trying to develop 3rd party apps that check the validity of the urls asking for permissions, you could use a testing environment by using the CURLOPT_REFERER paramater by setting the production url you want in the testing environment.
file in the testing environment http://www.mycoolsite.loc.
curl_setopt( CURLOPT_REFERER 'http://www.mycoolsite.com' );
The site that will receive the answer will check the referer and assume the .com one instead the .loc
Thanks to everybody that tried to help me.

Categories