whare Posted February 18, 2009 Share Posted February 18, 2009 Hi All Right I am having a play with cURL seeing if I can make it function how i would like anyway in the file I am inporting from an external site http://www.sitename.com/foldername/filename.php all the table values are set in % of the overall size making it normaly easy to resize according to your site style as normaly it is imported using Iframe now when I use cURL it seems to set the total size to around 800px but the max size of the table that it is going into is only 640px (starting to see the problem?) so I need to try and find a way to resize it to the correct size as it seem to be cURL making it to big Any Ideas? here is the code im using <?php /** * Initialize the cURL session */ $ch = curl_init(); /** * Set the URL of the page or file to download. */ curl_setopt($ch, CURLOPT_URL, 'http://www.sitename.com/foldername/filename.php'); /** * Ask cURL to return the contents in a variable * instead of simply echoing them to the browser. */ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); /** * Execute the cURL session */ $contents = curl_exec ($ch); /** * Close cURL session */ curl_close ($ch); ?> and to include it into my main pages I use <?php $page = $_GET['page']; if (!empty($page)) { $page .= '.php'; include($page); } else { include('404.php'); } ?> Thanx for reading hope sombody knows a way out of this problem Quote Link to comment https://forums.phpfreaks.com/topic/145798-curl-width-problem/ Share on other sites More sharing options...
amites Posted February 18, 2009 Share Posted February 18, 2009 would be easiest to do with a custom css file, otherwise your looking at a couple lines of preg_replace to match the existing table definitions and replace them with what you want to use Quote Link to comment https://forums.phpfreaks.com/topic/145798-curl-width-problem/#findComment-765633 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.