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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.