Category: PHP Frameworks
Chargify | Single php function for all Chargify API calls
Following single function can be used for all Chargify API calls whether API calls belong to test site (site for test transactions) or live site (live transactions): <?php function sendRequest($uri, $method, $data = ”) { $apiKey = ‘XOTUsyy7pJ6yLgmMa233AtJ’; $subdomain =
Salesforce | [message:protected] => INVALID_LOGIN: Invalid username, password, security token; or user locked out
While upserting records using SFDC php API we were facing following exception : [message:protected] => INVALID_LOGIN: Invalid username, password, security token; or user locked out. This exception was showing up frequently when we were upserting records using PHP API. The
Salesforce Integration | Upsert multiple records with single connection in PHP
When we create connection with “SforceEnterpriseClient”, we can upsert one record and then we need to recreate connection for next upsert, which eventually can result in the exception: “UnexpectedErrorFault: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.” The solution is to use “SforcePartnerClient” instead
PHP | How to call SOAP based web services from php
We were working on codeigniter website project. We had wsdl web services available to access our backend functionality. We had configured a WSDL Client in our php code but it was not working. Sample Code: try { $testSoapClient = new
Google Maps | Display routes to different locations from common starting point
Suppose in Google Maps you want to display routes to different locations from common starting point. For this we need accurate lat/long of the origin and destination addresses (only 1 origin and multiple destinations). We will use following statement to
Sendgrid | How to send bulk emails in one batch using sendgrid in php
Recently we were working on a project in which the requirement was to send emails to 500 users at a time. Earlier, emails were being sent to 500 users in a loop 1 by 1 in which sendgrid-API was being
Mysql | Maximum execution time of 360 seconds exceeded at data import time
In one of the project we had to import some .csv files into Mysql database. Files were of size 80mb and more. When we tried to upload the files through phpmyadmin it was resulting in timeout error – Maximum execution
Salesforce | How to access php code in salesforce apex class
We can access the php code in salesforce using @future(callout=true/false). The function we make for accessing the php code in apex class is of static type and does not return any value. Syntax: @future(callout=true) public static void function_Name() { //variable
Joomla- Database Error: Unable to connect to the database
While working with Joomla if you get an error – “Database Error: Unable to connect to the database:Could not connect to database”, check following properties in Joomla’s configuration.php file : //given values are sample data only. var $dbtype = ‘mysql’;