Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Need PHP "fetch a web page" script

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

dabb

Established Member
Impact
7
Can somebody point me to a PHP script or code snippet that will let me fetch a web page using GET or POST methods? I'd be happy to donate some NP$ to the person who steers me to what I need.

Thanks!
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
What do you mean by fetch a website?
 
0
Close
0
Close
PHP:
$contents = file_get_contents("http://www.google.ca");

You can replace "http://google.ca" with the form variable.

$_GET['site']
$_POST['site']
 
0
Close
be very careful with this as you may make it possible for rogue scripts to be run on your server.
 
0
Close
eagle12 said:
PHP:
$contents = file_get_contents("http://www.google.ca");

I should have known PHP would have a single function to do this, thanks! I'm a C guy, but thought I'd do my latest project in PHP to learn the ropes.

Thanks again, NP$ sent!
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Member card: see how many threads a member started
The member card now shows a Threads number, right after Posts. The member card is the box that opens when you point at a name. Profile...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back