Welcome Guest, Not a member yet? Register   Sign In
Perform HTTP Request and save HTML to string
#1

[eluser]Dsyfa[/eluser]
Hi,

How do I perform an HTTP request inside a controllers function to an HTML file and then save the HTML in a string for further processing. My HTML file contains a JavaScript code which generates the actual HTML. Here's the HTML file:
Code:
<html>
<head>
    <title>Hello</title>
</head>
<body>
    
</body>
</html>

Does CI have any built-in helpers to do this??

Thanks
#2

[eluser]Sean Murphy[/eluser]
You could use file_get_contents or CURL:
http://us.php.net/file_get_contents
http://us.php.net/manual/en/ref.curl.php
#3

[eluser]Dsyfa[/eluser]
My hoster has disabled both file_get_contents and curl functions. Is there any other way or a hack/workaround perhaps??
#4

[eluser]Sean Murphy[/eluser]
Have hey disabled fopen too? What about fsockopen?




Theme © iAndrew 2016 - Forum software by © MyBB