Simple Way To Execute A Function In A Component From Another Component

Introduction In this post, we will execute a function in a component from another component in Angular. We will pass the data from one component to another component as well. For this, we are using EventEmitter service. In Angular, a component can emit an event using @Output and EventEmitter. The eventEmitter.on() method is used to register listeners, while the eventEmitter.emit() method is used […]

Read More

Bitly PHP Api to Create Short Link, Get Long Url and Get Stats

Use this PHP fucntion to create Bitly Short Link using PHP     In Additional to this if  you want to create Short link using php function :- <?php function createShortLink($long_url) { $bitly_login = “bitlydemo”; $bitly_api = “R_0da49e0a9118ff35f52f629d2d71bf07”; $long_url = urlencode($long_url); $bitly_response = json_decode(file_get_contents(“http://api.bit.ly/v3/shorten?login={$bitly_login}&apiKey={$bitly_api}&longUrl={$long_url}&format=json”)); $short_url = $bitly_response->data->url; return $short_url; } ?> if you want to […]

Read More