Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

call a script from within a script

Options
  • 09-05-2007 5:07pm
    #1
    Registered Users Posts: 21,611 ✭✭✭✭


    i'm making a script thats supposed to be called from a mobile.

    one website i have has no ads so its perfect except they've disabled the curl_init() function which i need. i got another site that lets me use the function but it displays ads on the page so it costs a lot to display it on the phone.

    i need to call a script on the first website which calls the second one and gets the returned text, cuts out all the ad text and only displays the info i need

    basically the php file needs to do the equivalent of typing the second script's address into the address bar but on the server side

    anyone know if its possible?


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    fopen($url, 'r')

    This lets you download the contents of the file from the other host and take whatever contents you're looking for.
    Although this may be disable by the host.


  • Registered Users Posts: 21,611 ✭✭✭✭Sam Vimes


    i was just about to post that i'd found that and it is indeed blocked by the host. i suppose i'll have to find another way. sigh

    do you have any suggestions to get around downloading the ad text?

    failing that i need webspace that:
    is free
    allows curl_init() or fopen() to urls
    has no ads


Advertisement