Jump to content


Photo

Equivalent to Perl's get() (in LWP::Simple)


  • Please log in to reply
4 replies to this topic

#1 kiss-o-matic

kiss-o-matic
  • Members
  • PipPipPip
  • Advanced Member
  • 51 posts

Posted 10 August 2006 - 08:53 AM

Is this possible w/ PHP?  I essentially want to slurp up the contents of some other webpage via it's URL, then do something with it, and display it in a browser.  All searches for "get()" turn up references to the $_GET array.

I have a Perl script to do this already, but my provider doesn't offer it w/ my current plan.  I don't want to update just yet.

#2 elhama

elhama
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 10 August 2006 - 09:01 AM

<?
readfile('http://yourlink.com/yourfile.html');
?>

#3 kiss-o-matic

kiss-o-matic
  • Members
  • PipPipPip
  • Advanced Member
  • 51 posts

Posted 10 August 2006 - 09:09 AM

Thanks -- I just found
file_get_contents('url') as well.  Any difference?


#4 elhama

elhama
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 10 August 2006 - 09:11 AM

I have no idea, never tested it. but I tested readfile and it works -perfectly- however test them both and take whatever fits the best for you! :D

#5 kiss-o-matic

kiss-o-matic
  • Members
  • PipPipPip
  • Advanced Member
  • 51 posts

Posted 10 August 2006 - 09:47 AM

Will do.  Thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users