hit a page from PHP

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
Xerpher
New php-forum User
New php-forum User
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada
Contact:

Post by Xerpher » Tue Mar 18, 2003 2:52 pm

The only way I could think of this working would be to use a function (probibly readfile() or fopen()) you open the site but not actually put on th page... I'll try it right now :)

Xerpher
New php-forum User
New php-forum User
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada
Contact:

Post by Xerpher » Tue Mar 18, 2003 3:26 pm

Ok, I got it, heres all you need:

Code: Select all

<?php
ob_start();
readfile('http://www.domain.com/counter.php');
ob_clean();
?>

First and last command will make sure nothing from the url gets printed on the page.
Middle command opens the page.

Any more questions, just ask :D

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests