Jump to content

Search the Community

Showing results for tags 'traffic'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. As you can see in the code below: it's a PHP script that generates fake hits on a given URL with the help of Cron jobs. I want to know how to set up a session duration of a hit like 5 minutes or more. Feel free to edit the complete code As you can see in the code below: it's a PHP script that generates fake hits on a given URL with the help of Cron jobs. I want to know how to set up a session duration of a hit like 5 minutes or more. Feel free to edit the complete code //Let's make sure no warrnings are displayed by PHP error_reporting(0); // Specify url that shoud receive hits // make sure to include trailing slash "/" at the end of folders $url_1 = "http://www.yourdomain.com/"; // Specify your server and port $myserver = "yourdomain.com:80"; // Specify how many hits to receive every time the script is run // Selecting more then 5 may not work $randnr = 2; //read proxy file $proxies = file("proxy.txt"); //now we will get a random proxy address from the proxies.txt file $getrand = array_rand($proxies, $randnr); for($x=0;$x<$randnr; $x++){ //setting time limit to zero will ensure the script doesn't get timed out set_time_limit(0) //now we will separate proxy address from the port $PROXY_URL=$proxies[$getrand[$x]]; $proxyarr = explode(":", $PROXY_URL); $address = trim($proxyarr[0]); $port = trim($proxyarr[1]); //following code generates the header file $headerinfo =array( 'User-Agent' => 'UHits/1.0 ('.$myserver.')', 'Accept' => 'image/gif, image/x-xbitmap, image/jpeg, image/png, */*', 'Pragma' => 'no-cache', 'Connection' => 'keep-alive'); reset($headerinfo); //now we are ready to reach our website through the proxy $fp=fsockopen($address,$port); if($fp) { fputs($fp,"GET $url_1 HTTP/1.1rn"); fputs($fp,"Host: $myserverrn"); reset($headerinfo); while(list($header,$value)=each($headerinfo)) { fputs($fp,"$header: $valuern"); //let's give the script some time to execute sleep(2); } //end while fputs($fp,"rn"); fclose($fp); } //end if } //end for
×
×
  • 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.