Jump to content

gortron

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gortron's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Albos, I get what you mean. Thats a good idea, I'll add it in, Thank you. I've seen a little of this happen already. A user searches for something, arrive at a site and then seems to go back and do it again once or twice more. They're hardly trying to spam me.
  2. Hi Redarrow, In this case, echoing the info out in admin section isn't enough. I have users using the PHP app on their own sites. I'd like them all to send info back to my site.
  3. Hi guys, thanks for the feedback on it. I didn't add saving to a database because I assume a user is already using something like Google Analytics to record this info long term. This script is intended as an added tool for a user to be notified as it happens. @Albos, Could you explain the time limit/spammed easily comment?
  4. Hi. In some PHP apps I create, I'd like to be able to collect basic usage data such as number of log ins, number of items created, edited etc. Collecting the information isn't a problem but I'd like to find out whats the best way to transmit it back to my own site. I've considered passing the information directly into a remote database that allows remote access but is this the best approach? Are there any other approaches I could look at like using POST or XML/Soap? Thanks for any help.
  5. I wrote a PHP script a while back which sends me an email when Google sends a visitor to my site. The email shows the keywords the user searched for. Its a very basic script, a few people wanted to be able to use it for their own site so I put together a small site to allow people to download it. I have set this script up in an SVN repository, it is open source and I'd like to develop it further. I have plenty of ideas in the area of notifying webmasters by email/twitter etc of any Google activity on their site. Would anyone be interested in critiquing the code or interested in developing this script further? The site is http://whatsgoogleupto.com
  6. I've received help in solving PHP problems in these forums in the past so I thought I'd give a little something back. Hopefully this is the correct forum to do so? I wanted to receive an email when Google directs anyone to my site to tell me what keywords they have used to find my site. A very basic and useful script, hopefully it can be of use to someone or maybe to expand on. <?php // Script to email you when Google refers traffic to your site. $name=""; // add your name here $email_address=""; // add your email address here $keywords=""; $referrer=$_SERVER['HTTP_REFERER']; if( (stristr($referrer, "google")) && (stristr($referrer, "search")) ) { parse_str($referrer, $output); $keywords=$output['q']; $email_message="Hi $name, A visitor just arrived to your site after searching for '$keywords'. ($referrer)"; mail ("$email_address","Google referred a visitor","$email_message"); } ?>
  7. PHP can often connect to a remote mySQL databases, but it depends on the hosting provider. Some allow it, some require a pinhole to be created in the firewall and some don't allow any remote connections to their database. Is there any way using items such as PEAR or SOAP to allow PHP to connect to a remote mySQL database that might be blocked in this way?
  8. You can use stripslashes() to remove the slashes. Example: $name=stripslashes($name);
  9. Im afraid I can't answer that one, I don't know anything about wampserver
  10. Hi K_ind, The approach I would use is below. There are plenty of ways you could expand it but its the basic outline. It shows a form where you can enter your name and it will email the specified email address with the name you entered in the form. <?php if ($_POST["Submit"]=="Submit") { // Get form variables $name=$_POST["frm_name"]; // mail mail("email@address.com", "Email Subject", "The name entered in the form was $name", $headers)) { } ?> <form action="scriptname.php"> <input type="text" name="frm_name"> <input tye="Submit" name="Submit" value="Submit"> </form>
  11. I was afraid you'd say that. I was hoping for a pointer to a tutorial maybe. Thanks for the pointer though.
  12. Hi, I have a small content management system that I put on clients websites to allow them to log in and update their site easily. I want to have a central database on my own site to hold all clients usernames and password. My question is, Is there a recommend approach to validating clients login credentials from a remote location? At the moment, some sites require special attention to the firewall to allow the local PHP script to communicate with a remote database to validate the user. Can this approach be improved, should I have the users details locally instead? Though this would prevent me from managing users effectively. Thank you for any comments or suggestions.
  13. Instead of using file_get_contents() to get the content of broad_prev.php, couldn't you put the PHP code from the broad_prev.php page into the page that has $message=""; ?
×
×
  • 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.