Cragsterboy Posted November 3, 2008 Share Posted November 3, 2008 ok ive got a html page which has a table on it and i want my script to get the text from the table, not the html and keep it in the same format and then create it into a string. how do i do this? with cURL? or is it possible? Thanks, ~Crag Link to comment https://forums.phpfreaks.com/topic/131130-curl/ Share on other sites More sharing options...
trq Posted November 3, 2008 Share Posted November 3, 2008 You wont need curl unless you need to login. Take a look at file_get_contents and preg_match. Link to comment https://forums.phpfreaks.com/topic/131130-curl/#findComment-680837 Share on other sites More sharing options...
Cragsterboy Posted November 3, 2008 Author Share Posted November 3, 2008 ok im using file_gets_contents but it makes it all on top of each other, you can see it here: http://cakeisalie.info/westconverter/mess.php as you can see im trying to turn the text into an image, the image im using now isnt going to be the proper one just a test one. Heres my script so far: <?php ob_start(); include('output.html'); $text = ob_get_contents(); ob_end_clean(); // Create a 300x100 image $im = imagecreatefromgif('images/body.gif'); // Path to our ttf font file $font_file = './arial.ttf'; // Draw the text 'PHP Manual' using font size 13 imagefttext($im, 13, 0, 105, 55, $black, $font_file, $text); // Output image to the browser header('Content-Type: image/png'); imagepng($im); imagedestroy($im); ?> how would i stop it from outputing all on one line? Thanks, ~Crag Link to comment https://forums.phpfreaks.com/topic/131130-curl/#findComment-680848 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.