Jump to content

cURL width problem


whare

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/145798-curl-width-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.