I'm trying to connect to a url and grab the contents of the main page (slickdeals.net). When I try to solely grab index.php, it gives me an error. Then when I try the request with additional header information, (I'm trying this in Putty first to get the requests right), it streams a bunch of data which appears to be images.
How can I get the html source of the main page displayed?
This works for me:
Code:<?php
echo "<PRE>" . htmlentities(file_get_contents("http://www.slickdeals.net")) . "</PRE>";
?>
O, did you want PHP or Java?
Java Tips - How to fetch an HTML page
Java, thanks. PHP was pretty easy
perfect, thanks! (needed help with the redirects)
Ha, I thought it might have been a redirect issue, but I was too tired to check the site. (Normally I use Indy to sus out what a site is doing)
Lucky I posted a link to code that supported redirection. hehe
![]()
Buzz PHP Class Library - Web Components Made Easy!
http://www.buzzphp.com/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks