Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    2,735

    how can i use php to connect page ?

    Hi,

    because i want to click certain one url frequently at a period of time,

    i think to use cronjob to run it,

    but im not sure how to code the php file.

    for instance,i want to let the php script to browse http://google.com,

    when i use run the script,it will browse my url google one time,

    how can i code the php script ?


    thanx

  2. #2
    Join Date
    Feb 2006
    Location
    Kusadasi, Turkey
    Posts
    3,273
    Easiest way would be using
    $page = file_get_contents("http://google.com");
    You can then print $page or ignore it. There is a more detailed way called cUrl but you don't seem to need it yet.
    Fraud Record - Stop Fraud Clients, Report Abusive Customers.
    █ Combine your efforts to fight misbehaving clients.

    HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
    █ Large and awesome portfolio, just visit and see!

  3. #3
    Join Date
    Mar 2009
    Posts
    2,735
    Quote Originally Posted by Harzem View Post
    Easiest way would be using
    $page = file_get_contents("http://google.com");
    You can then print $page or ignore it. There is a more detailed way called cUrl but you don't seem to need it yet.
    but "IF" when i browse the http://google.com and it will show with some messages,
    how can i write them to a log file?

    thanx

  4. #4
    Join Date
    Feb 2006
    Location
    Kusadasi, Turkey
    Posts
    3,273
    What type of messages? If you can give me some actual details I can write the code you need. There are various types of messages and parsing them can't be generalized, you need specific directions.
    Fraud Record - Stop Fraud Clients, Report Abusive Customers.
    █ Combine your efforts to fight misbehaving clients.

    HarzemDesign - Highest quality, well designed and carefully coded hosting designs. Not cheap though.
    █ Large and awesome portfolio, just visit and see!

  5. #5
    Join Date
    Mar 2013
    Posts
    1,294
    Quote Originally Posted by ttgt View Post
    but "IF" when i browse the http://google.com and it will show with some messages,
    how can i write them to a log file?

    thanx
    You can write to a file with file_put_contents.
    php.net/file_put_contents

    It's better if you tell us what you are trying to achieve by doing this though.

Similar Threads

  1. [PHP] Expire a page and prevent page reload/refresh
    By latheesan in forum Programming Discussion
    Replies: 32
    Last Post: 09-21-2007, 10:00 PM
  2. Enhanced Navigation (page.php?page=bla)
    By arkin in forum Programming Tutorials
    Replies: 6
    Last Post: 05-05-2006, 10:21 AM
  3. PHP script for page to include another random page.
    By N8Webs in forum Web Design and Content
    Replies: 18
    Last Post: 03-13-2006, 05:38 PM
  4. PHP save values in classes from page to page
    By TranceNote in forum Programming Discussion
    Replies: 2
    Last Post: 02-23-2005, 03:04 PM
  5. Connect with «Front Page»
    By serv in forum Dedicated Server
    Replies: 4
    Last Post: 08-29-2001, 01:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •