Jump to content

[SOLVED] What is the best way to let out specific data?


redknight

Recommended Posts

Hi,  :)

 

data.php = collects the data of visitors

saveddata.txt = file in which the data is saved

showvisitors.php = the file where the saved data is displayed

 

My question is about the data that is saved in saveddata.txt.

 

data.php collects the refurl as a html code from every visitor and sent this to saveddata.txt. That is ok. But it collects also the visits with no refurl, so an empty html url.

Now I can filter this out in showvisitors.php with str_replace, but 50% of saveddata.txt has empty html urls. This means I have to periodical clean that list manually.

 

Is there a php function that I an use in data.php, so that empty data (<a href=""></a><br>) will not be collected anymore?

 

TY

 

Hi,  :)

 

data.php = collects the data of visitors

saveddata.txt = file in which the data is saved

showvisitors.php = the file where the saved data is displayed

 

My question is about the data that is saved in saveddata.txt.

 

data.php collects the refurl as a html code from every visitor and sent this to saveddata.txt. That is ok. But it collects also the visits with no refurl, so an empty html url.

Now I can filter this out in showvisitors.php with str_replace, but 50% of saveddata.txt has empty html urls. This means I have to periodical clean that list manually.

 

Is there a php function that I an use in data.php, so that empty data (<a href=""></a><br>) will not be collected anymore?

 

TY

 

Did you try regular expression matches through preg_match()?

 

Did you try regular expression matches through preg_match()?

You mean in data.php? That file collects in this format, so I don't see how I can use preg_match().

<a href=\x22$RefUrl\x22>$aPartOfRefUrl</a><br>

 

Please visit

http://www.phpfreaks.com/forums/index.php/board,43.0.html

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.