Friday, May 19, 2017
Monday, May 15, 2017
OAuth Token as Salesforce SessionId in SOAP API PHP
OAuth Token as Salesforce SessionId in SOAP API PHP
Most of the time developers who write applications in php/java or any other language, using salesforce soap APIs (partner wsdl or enterprise wsdl), they hard-code the username/password and security token in their code or in a property file. But there is one issue in this approach, anytime, if your org password or security token get change, your application may down. You have to update the credentials in your code or property file on server to get your application work.
One alternate solution for this issue is to use OAuth token in your code and write one automated code which will refresh your oauth token whenever it gets expired. The approach which i am going to tell in few moments has a benefit that you dont have to modify your code much. The place where you setting your sessionid, you just need to change that place, instead of getting sessionid from login method, you simply need to change with oauth token way.
Here is a complete process to achieve this:
1) Go to your org, Setup->Remote Access, make New remote access entry there for your application. Give return url for the file which will get oauth code returned. In my example, i used this url
http://localhost/oauthsample/tokenprint.php

You will notice that you will get Consumer key and Consumer secret.
2) Make one php file at this location oauthsample/tokenprint.php with below code. The purpose of this code is simply print the oauth code.
<?php
var_dump($_REQUEST);
?>
3) Now use your browser, prepare this url and invoke from address bar of browser
https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=<your_consumer_key>&redirect_uri=http://localhost/oauthsample/tokenprint.php
As soon you invoke this url, you will see the generated oauth code on screen, copy the "GENERATED CODE" from the browser window.
4) Now use following html code, run it in your browser, by simply double click, fill the values in each field.
<form method="post" action="https://login.salesforce.com/services/oauth2/token">
<input type="hidden" name="grant_type" value="authorization_code"/>
<table>
<tr>
<td>
GENERATED CODE
</td>
<td>
<input type="text" name="code" />
</td>
</tr>
<tr>
<td>
CONSUMER KEY
</td>
<td>
<input type="text" name="client_id" value=""/>
</td>
</tr>
<td>
CONSUMER SECRET
</Td>
<td>
<input type="text" name="client_secret" value=""/>
</td>
</tr>
<tr>
<td>
REDIRECT URL
</td>
<td>
<input type="text" name="redirect_uri" value="http://localhost/oauthsample/tokenprint.php"/>
</td>
</tr>
</table>
<input type="submit" />
</form>

5) After you execute this, you will get xml output on screen something like this:

Here you will get two important things, one Refresh Token and second "access token".
6) Now, in your PHP/Java code you need to replace your session id with this access token. There is another thing in your code "server url", this you need to hard code something like below (make sure to use instance url of your org) :
$mySoapClient = $sfConnection->createConnection(partner.wsdl);
$serverUrl = "https://ap1.salesforce.com/services/Soap/u/25.0/00D90000000Abcd";
$sessionId = "<<ACCESS TOKEN>>";
$mylogin = $sfConnection->attach($serverUrl, $sessionId);
7) Now, how to deal with expired token? For that you need to either make a separate method for it, or simply you need enclosed you code in try, catch block and look for INVALID SESSION exception. That exception will come whenever you try to access server contents and your token is expired. So the idea is, whenever that happen , simply catch that exception and use below code to get new access token. In below code, simply replace the different fields with your org info like consumer key, secret and important "REFRESH TOKEN" which we got in step #5.
<?php
function getNewToken(){
try{
$url = https://login.salesforce.com/services/oauth2/token;
$fields = array(
grant_type => "refresh_token",
client_id => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
client_secret => "xxxxxxxxxxx",
refresh_token => "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
);
foreach($fields as $key=>$value) { $fields_string .= $key.=.$value.&; }
$ch = curl_init($url);
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
$json_a=json_decode($result,true);
return $json_a;
}catch(Exception $e){
var_dump($e);
}
}
?>
You are now all set, now you dont have to worry about user credentials updation or revealing it.
Let me know if you face issue in any step.
Thanks
Aslam Bari
Available link for download
Sunday, May 7, 2017
Obama says goodbye in last presidential speech
Obama says goodbye in last presidential speech

WASHINGTON, Jan. 10 : (AFP) - Barack Obama closes the book on his presidency Tuesday, with a farewell speech in Chicago that will try to lift supporters felled by Donald Trumps shock victory.
Obamas last trip on Air Force One will be a pilgrimage to his adoptive hometown, where he will address a sell-out crowd not far from where he accepted the presidency eight years ago. Diehard fans -- many African Americans -- have braved Chicagos frigid winter to collect free tickets, which now sell for upwards of $1,000 a piece on Craigslist. The First Lady Michelle Obama, Vice President Joe Biden and his wife Jill Biden will come along on for the ride. Obamas cross-country trek would be a sentimental trip down memory lane, were it not slap-bang in the middle of a
tumultuous presidential handover. Trump has smashed conventions, vowed to efface Obamas legacy and hurled personal insults left and right.
The 2016 election campaign has raised serious questions about the resilience of US democracy.In a virtually unprecedented move, US intelligence has accused the Kremlin of tipping the electoral scales in Trumps favor. Democrats, cast into the political wilderness with the loss of the White House, the Senate and the House of Representatives plus a majority of statehouses, are struggling to regroup.
With an approval rating hovering around 55 percent, Obama will hope to steel them for new battles ahead. Lead speechwriter Cody Keenan said the address will be about Obamas vision for where the country should still go. "Its not going to be like an anti-Trump speech, its not going to be a red meat, rabble rousing thing, it will be statesman-like but it will also be true to him," Keenan told AFP. "It will tell a story."
- Life after White House -
Trumps unorthodox politics has thrown 55-year-old Obamas transition and post-presidency plans into flux.
Obama, having vowed a smooth handover of power, finds himself being increasingly critical of Trump as he prepares to leave office on January 20. After that there will still be a holiday and an autobiography, but Obama could find himself being dragged backed into the political fray if Trump were to enact a Muslim registry or deport adults brought to the United States years ago by their parents. Having vowed to take a backseat in politics, Obamas second act could yet be as politically engaged as Jimmy Carter -- whose post-presidency has remade his image as an elder statesman.
Many Obama aides who had planned to take exotic holidays or launch coffer-replenishing forays into the private sector are also reassessing their future and mulling a return to the political trenches.
Obamas foundation is already gearing up for a quasi-political role -- funneling idealistic youngsters into public life.
- Presidential precedent -
Presidents since George Washington have delivered a farewell address of sorts.Washingtons final 7,641-word message -- which is still read once a year in the Senate by tradition -- contained warnings about factionalism and interference by foreign powers that seem oddly prescient.
But speechwriter Keenan sees few obvious templates: "Bush and Clinton did theirs from here (the White House), George H.W. Bush went to West Point, gave a foreign policy speech," he told AFP. "They are all totally different." The trip to Chicago is not just for nostalgia, Keenan indicated.
"The thread that has run though his career from his days as community organizer to the Oval Office is the idea that if you get ordinary people together and get them educated, get them empowered, get them to act on something, thats when good things happen," he said. "For him, as someone who started as a community organizer, whose campaign was powered by young people, ordinary people, we decided we wanted to go back to Chicago.""Chicago is not just his hometown, its where his career started." And now it is also where Obamas presidential career will effectively end.
Available link for download
Saturday, April 29, 2017
Out with the Old In with the New Bulletin Board Style!
Out with the Old In with the New Bulletin Board Style!






Available link for download
Wednesday, April 26, 2017
OVO X ROOTS FALL 2016 MADE IN CANADA LOOKBOOK
OVO X ROOTS FALL 2016 MADE IN CANADA LOOKBOOK












Available link for download
Tuesday, April 25, 2017
ONCE UPON A TIME IN AMRITSAR 2016 480P DVDRIP 300MB ESUB
ONCE UPON A TIME IN AMRITSAR 2016 480P DVDRIP 300MB ESUB

Genres: Drama
Language:Punjabi
Movie Quality: 480p DVDrip
Movie Size: 330mb
Director:Harjit Singh Ricky
Starring: Dilpreet Dhillon, Sonia Kaur, Gurjind Maan

A Flying Jatt 2016 Hindi 480p HDTV 400mb
Download From bdupload.info
Download From clicknupload.link
Download From uptobox.com
Download From openload.co
Download From upload.af
Available link for download
Thursday, April 20, 2017
Oriental Kilim Rugs in the Bathroom Yay or Nay
Oriental Kilim Rugs in the Bathroom Yay or Nay
![]() |
| {The Socialite Family} |
What do you think? Would you use a kilim or oriental rug in your bathroom?
![]() |
| {Tessa Neustadt} |
| {House Beautiful} |
![]() |
| {Tessa Neustadt} |
![]() |
| {Design Sponge} |
![]() |
| {Houzz} |
| {Tessa Neustadt} |
| {Garden and Gun} |
| {The Shingled House} |
Available link for download
Monday, April 17, 2017
One House’s Décor in 1999 2008 and 2015
One House’s Décor in 1999 2008 and 2015
Recently a Cote de Texas reader and a client of Lisa Luby Ryans, wrote to tell me that Lisa had sold her house! She did? That fabulous house in Dallas? A quick look around the internet and yes! After just a few days on the market and only a few showings, the house sold. That it would sell so quickly is no surprise its a beautiful house.
Besides selling the house, there was a garage sale at Vintage Living, Lisas shop, and now - the wait begins. Hopefully, it wont be too long before we get a glimpse of her new digs when some magazine like Veranda or Traditional House photographs it for all of us to drool over.
For now, we have the real estate photographs to peruse. I thought it would be both fun and instructive to look at the house through the years and see all changes that Lisa made to the interiors. After all, she is a wonderful interior designer and to study what changes she made, and why, is a chance to learn from a talented expert.
So, grab a cup of coffee and enjoy this look back at a much loved home!
The first glimpse the world got of Lisa Luby Ryan was in Traditional Home 1999 15 years ago. Wow. Has it really been that long? She and her husband had built a house in Dallas in 1995 her inspiration was Cotswold, that charming area of England where the stone cottages are chock full of English antiques and accessories. When her house was first published, Lisa was a complete Anglophile.
I remember reading that article like it was yesterday. Her house was sort of like mine maybe an English Range Rover to my Dodge Dart. Both of our houses were almost the same age and size and we had similar layouts: two stories with a large family room and kitchen combination at the back of the house. I only made the comparisons because I vividly remember being in awe of all the design choices she made to customize her house and wondering why I hadnt thought to make the same choices. Maybe the answer was simply because she was Lisa Luby Ryan and I was just me.
The details she installed in her house were what made it so special. There were antique beams in the family room culled from a barn in Pennsylvania. The dining room windows held old glass panes salvaged from the teardown house that once sat on their lot. There were old slate tiles in the foyer and the hardwoods were hand scraped to look rustic. The family rooms fireplace was made of stone, sandblasted to look old. Instead of open shelves that flanked the mantel she used doors with antique glass that were designed to look like pieces of furniture. This particular detail really made me see green because my lowly mantel was surrounded by boring, builders grade cabinets and open shelves!
Rereading that Traditional Home article today I have to smile at this quote I call my look a kind of pared down English a little less fussy and not a lot of clutter. Im sure Lisa smiles too because compared to her pared down aesthetic of today the 1999 décor was filled to the ceiling with collectables and antique smalls and then some! Pared down is not an adjective I would use to describe her 1999 décor.
Besides the differences in the cluttered English style back then to todays look, the other major change is Lisas palette. In 1999, the house was dark, heavy in reds and golds and patterned fabrics. Today Lisa favors white walls and clean, streamlined interiors.
Throughout the years, her house was photographed many times for different magazines and each shoot showed a step towards the look she favors today. After the original article was published, Lisa opened her extremely successful shop. Her portfolio is large and is a testament to how desired her aesthetic is. Recently she announced that after 13 years, her shop was moving from Snider Plaza to the Dallas Design District. I wish I lived in Dallas!
I think it would be instructive and interesting to look at the house then and now. The real estate pictures are beautiful and show rooms never seen before. Whoever bought the house is really lucky. They got a real beauty!!
Weve never really gotten a good photograph of the façade before most of the ones in magazines were small. But wow it truly looks like a stone cottage in Cotswold. The stone is beautiful and looks so old! I love the chimney pots what a nice touch!
The front door is planked in the old style with antique looking hardware.
BEFORE: 1999 a glimpse of the back yard with its natural looking landscape.
TODAY: There is a pool now and the landscaping is much more tailored clean lines of box and clipped ivy. Even the furniture is more sophisticated. The master bedroom is on the ground floor its window is at the right, overlooking the pool. The French doors at the covered porch are the family room and kitchen.
A view of the garage/pool house. There is a kitchen and bathroom above. Notice its charming shutters.
TODAY: The covered porch.
In 2003 we saw this small glimpse of the tiled entry hall and stairs with the dining room behind.
In 2008, Veranda featured the house in its Christmas issue. Here, we see a totally different house all the warm colors are gone leaving a clean, white palette. The entry floor is the antique slate.
And in the mirror you can see there are oil paintings up the stairs.
Today: the house has been stripped bare of the decorative excess from the days when Lisa was a fan of the English country manor look. Today, she mixes painted and Swedish antiques with fewer but larger accessories. Today there is a crystal chandelier. Also, the slate floor has been replaced with a herringbone patterned wood floor. Again, more streamlined and less Cotswold.
The view up the stairs and down the center hall to the family room. Even the entry was changed, the accent chair is now gone, opening up the hall to visitors. Instead of the oil paintings there is a series of framed prints, something that Lisa really loves to use in her designs. She always gets the proportion perfect too she uses large frames and mats which together create a large statement.
The living room has seen the most changes. In 1999, she used a red kilim and furniture with chintz upholstery and a large pine cabinet jammed packed with English accessories.
A few years later in 2003, a more neutral rug was placed in the room, along with a new collection of mercury glass. This look is very much like what Ginger Barber and Carol Glasser were doing in Houston. Lisa still uses this same coffee table with the mirrored glass top.
In the corner there was this vignette. Red and golds everywhere. I wish these old pictures were better quality! Sorry!
In the Veranda 2008 Christmas issue, Lisa showed us her totally redecorated house all the reds and golds were gone, replaced with whites and creams. Two new contemporary styled sofas faced each other. The pine dresser is replaced with a painted piece, barely shown. New rug. The coffee table remains.
A larger view of the new patterned rug and curtains in cream. This photoshoot was such a change from the English inspired décor. I loved it and so did everyone else. It reflected a large change that was happening in décor around the south at that time. After decades of red painted dining rooms, white and gray paint was going up all over and this aesthetic was exactly what so many wanted.
Today: The living room is even more pared down. The printed curtains are replaced with plain white linen. A more traditional sofa with a linen slip replaces the two contemporary ones and two French chairs sits across it. The white cupboard remains, as does the coffee table. New textured rug. A fun zebra covered chair provides a bit of whimsy.
Now, Lisa owns a furniture store and its possible that she cleaned out her house and then styled it with things from the shop just for the sale. I have no idea if this is how it looked when she lived here or if this was just styled for the sale. But regardless, I love it. Its clean and airy and streamlined with just a bit of frou-frou with the gathered slipcover.
The dining room with its vaulted ceiling is a favorite room. The leaded windows have old glass panes from the original house. There is a stone fireplace. The barley twist chairs sit around a wood table. The room is very English country manor house and is quite beautiful.
The Veranda Christmas issue showed a totally new dining room. The iron chandelier was exchanged in favor of a French one. The wood table was replaced with one with a limestone top and antique column legs. Linen slip covered chairs are new. The same patterned curtains in the living room are seen here.
And another view.
Here the room was styled with different chairs. You can see the collection of creamware on the walls that is so beautiful. Im not sure which dining room décor was the one that was more permanent this table or the stone one. When designers show their houses in different magazines, sometimes they bring in new furniture just for the pictorial, so its hard to know if this setting is how it always was. Either way, I love the dining room architecturally it is beautiful.
And today I love this! There is a mix of new and old with the white chairs and the old table. Theres a beautiful antique cabinet, along with the new white curtains. I love the crystal chandelier and sconces. Lisa has replaced all the light fixtures with crystals ones. On the walls, the ironstone plates remain, which is a favorite part of the décor.
I love the leaded windows! They are fabulous!!!!!!
A close up of the stone mantel. Just beautiful. Beautiful!!!
In 1999 the family room was very comfortable and welcoming. The stone fireplace with the flanking doors that hide the tv is a wonderful idea that Lisa had and a detail that I really loved.
And here is how it looked a few years later. Very English cottage with a patchwork sofa. Remember those? I loved them!
Lisa is very religious and is active in many charities. The biblical saying stenciled on the wall is very important to her as it remains today. To learn about Lisa and her amazing path to God, go HERE.
The Veranda shoot showed a cleaner, calmer décor.
Here French chairs with slips. On the club chair is a cute contemporary fabric.
And today you can finally see the family room! I love these pictures after all these years 15!!!! Waiting all this time to really see the house, its even prettier than in the magazines. Here are the antique doors that are now in a distressed gray finish. Before they were wood stained. Love the French chairs with the wood frames. Antique leather chairs.
A view of the French doors to the swimming pool.
The view to the kitchen and the living room through the French doors. The house has an open flow for entertaining.
Just perfect for a family room wouldnt change a thing!
The breakfast room in 1999 with the country French table and chairs.
In 2003 the wall now is covered with a collection of antique plates. The iron chandelier is so pretty.
The kitchen has brown stained cabinets and black granite? countertops.
And later, in 2008, a wood table, French chairs, and a painting where all the plates once were. A crystal chandelier replaces the more country styled iron one.
Available link for download












