execute .php file from php file

Discussion in 'PHP' started by kalaid, Jan 28, 2008.

  1. kalaid

    kalaid Guest

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #21
    Hi
    I tried this
    But it fails, So I have to change the access mode of wget.
     
    kalaid, Jan 29, 2008 IP
  2. kalaid

    kalaid Guest

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #22
    I tried with
    but the values are not passed to crawl.php file
     
    kalaid, Jan 29, 2008 IP
  3. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #23
    hmmm try this:

    $link = "http://localhost/sitemapprototype/".rawurlencode("crawl.php?thread={$tnames[0]}&url={$url[0]}");
    exec("C:/path/wget.exe -q '{$link}'");
     
    Kaizoku, Jan 29, 2008 IP
  4. kalaid

    kalaid Guest

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #24
    I tried still it fails
    Also I tried passing ordinary variables rather than array variable even though it fails to execute.
     
    kalaid, Jan 29, 2008 IP
  5. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #25
    Okay I give up...
     
    Kaizoku, Jan 29, 2008 IP
  6. kalaid

    kalaid Guest

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #26
    ok thanks a lot for your help
     
    kalaid, Jan 29, 2008 IP
  7. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #27
    Something strange with windows wget, it works perfectly fine with linux wget.
     
    Kaizoku, Jan 29, 2008 IP
  8. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #28
    hey kalaid,
    you could try to use wget's file option. write your string to a file and then call wget with this
    exec("C:/path/wget.exe -q -i filename.txt");
     
    shallowink, Jan 29, 2008 IP
  9. kalaid

    kalaid Guest

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #29
    Hi
    The issue here is when i provide
    $link ="http://localhost/sitemapprototype/crawl.php?uurl={$urll}&thread={$nam}";
    The argument after '&' is not passed. If I provide like this
    $link1 ="http://localhost/sitemapprototype/crawl.php?uurl={$urll}thread={$nam}";
    The value for uurl and thread is passed along the file but i cannot get the values for uurl and thread seperately. The thread variable and the value is combined along with the uurl as there is no '&' symbol
    What to do in such case
     
    kalaid, Jan 29, 2008 IP