Forum Moderators: coopster

Message Too Old, No Replies

edit TXT file if script is not there.

         

xxshadowxx

10:02 pm on Aug 28, 2006 (gmt 0)

10+ Year Member



I want this script to instead of saying you're a guest, into deleting a line in a TXT file.

Is this possible?

Below is the script I'm using.

if(stripos(file_get_contents('http://www.othersite.com/page.html'), '<script')!== false)
echo('You\'re an affiliate.');
else
echo('You\'re a guest.')

EDIT:
also is it possible to "search" for a tag or something in the text code and delete it?

eelixduppy

3:04 am on Aug 29, 2006 (gmt 0)



Welcome to Webmasterworld!

Have you tried str_replace [us2.php.net] or preg_replace [us2.php.net]? This is a good place to start.

Good luck!