title: Codeigniter hit an url and get back
body: <p>I am using codeigniter 3.0 in my webapp. I want to hit an URL then get back to a view. Lets say on clicking a button, I want to hit an API then return back to the same view with success message. Can anyone help?</p>
  
  <p>My API is <a href="http://wmlab.in/api/getData.php?username=web" rel="nofollow">http://wmlab.in/api/getData.php?username=web</a></p>
  
  <p>I tried file('<a href="http://wmlab.in/api/getData.php?username=web" rel="nofollow">http://wmlab.in/api/getData.php?username=web</a>') but it is not working.</p>