dimanche 19 avril 2015

How to include website code into iframe via javascript?

I do a curl request with php and the response is a complete website including doctype, html section and so on. Now I want insert this code into an iframe. In my opionion this only can be done with javascript. So I echo the javascript code from my php code. Now I have the problem that the html code contains quotes and line breaks. The quotes are masked by addslashes php function. And I replace the linebreaks with preg_replace php function. But I always get an error "unterminated string literal". You can see the error an this page using for e.g. firebug: http://ift.tt/1aHO9ji The iframe should be shown in the lowermost section called "Hotelbewertungen". Thanks for any suggestion.


Aucun commentaire:

Enregistrer un commentaire