Driimer Posted October 7, 2009 Share Posted October 7, 2009 Lets say: First URL goes to login link logs in. (I have this one covered how it will log in) Second URL goes to uninstall link. Third URL goes to install link. Fourth url goes to logout link. How to do that with php? Incase I launch reinstall.php then it would log in, uninstall, install and then logout. Basically require script how to go to four URLs with a script without it leaving from the script. Link to comment https://forums.phpfreaks.com/topic/176820-solved-1go-to-url-2go-to-second-url-3-go-to-third-url-dont-show-pages/ Share on other sites More sharing options...
Shocker88 Posted October 7, 2009 Share Posted October 7, 2009 Hey mate, You're a big vague here...You want to go to numerous links within the same PHP script? If you want each link to essentially step through the pages with more links you could setup a form and use isset() to to work out which information (link) in the PHP script to show. Is that what you're looking for?? Link to comment https://forums.phpfreaks.com/topic/176820-solved-1go-to-url-2go-to-second-url-3-go-to-third-url-dont-show-pages/#findComment-932292 Share on other sites More sharing options...
Driimer Posted October 7, 2009 Author Share Posted October 7, 2009 Hey mate, You're a big vague here...You want to go to numerous links within the same PHP script? If you want each link to essentially step through the pages with more links you could setup a form and use isset() to to work out which information (link) in the PHP script to show. Is that what you're looking for?? Not quite, just want script to go through 4 URLs so they all would be launched as they should. I currently have following: $redirectlocation = 'http://mylongurl.com/uninstall.html'; header ("Location: ".$redirectlocation); // Send URL header ("Refresh: 2; URL=http://mylongurl.com/install.html"); However this will only go through two links and cant add third nor forth like this. Link to comment https://forums.phpfreaks.com/topic/176820-solved-1go-to-url-2go-to-second-url-3-go-to-third-url-dont-show-pages/#findComment-932302 Share on other sites More sharing options...
Driimer Posted October 8, 2009 Author Share Posted October 8, 2009 anyone? Link to comment https://forums.phpfreaks.com/topic/176820-solved-1go-to-url-2go-to-second-url-3-go-to-third-url-dont-show-pages/#findComment-932872 Share on other sites More sharing options...
Bricktop Posted October 8, 2009 Share Posted October 8, 2009 Hi Driimer, I think you're going to have to investigate a cURL solution. Or, a CRON solution. Or, look at using the JQuery get function. Something like: $.get("http://mylongurl.com/uninstall.html"); $.get("http://mylongurl.com/install.html"); I'm no JQuery expert so not sure if that will work but hopefully one of the above options will help. Link to comment https://forums.phpfreaks.com/topic/176820-solved-1go-to-url-2go-to-second-url-3-go-to-third-url-dont-show-pages/#findComment-932878 Share on other sites More sharing options...
Driimer Posted October 8, 2009 Author Share Posted October 8, 2009 Hi Driimer, I think you're going to have to investigate a cURL solution. Or, a CRON solution. Or, look at using the JQuery get function. Something like: $.get("http://mylongurl.com/uninstall.html"); $.get("http://mylongurl.com/install.html"); I'm no JQuery expert so not sure if that will work but hopefully one of the above options will help. I get 500 internal server error trying ajax. cURL doesnt seem to be simple enough for me to handle. Cron wouldnt work since I want it to run scripts whenever script.php file is being visited. (not known routine time) Link to comment https://forums.phpfreaks.com/topic/176820-solved-1go-to-url-2go-to-second-url-3-go-to-third-url-dont-show-pages/#findComment-932966 Share on other sites More sharing options...
kickstart Posted October 8, 2009 Share Posted October 8, 2009 Hi Can you just do something simple like:- $result1 = file("http://www.someurl.com/login.php"); $result2 = file("http://www.someurl.com/uninstall.php"); $result3 = file("http://www.someurl.com/install.php"); $result4 = file("http://www.someurl.com/logout.php"); All the best Keith Link to comment https://forums.phpfreaks.com/topic/176820-solved-1go-to-url-2go-to-second-url-3-go-to-third-url-dont-show-pages/#findComment-932969 Share on other sites More sharing options...
Driimer Posted October 8, 2009 Author Share Posted October 8, 2009 Hi Can you just do something simple like:- $result1 = file("http://www.someurl.com/login.php"); $result2 = file("http://www.someurl.com/uninstall.php"); $result3 = file("http://www.someurl.com/install.php"); $result4 = file("http://www.someurl.com/logout.php"); All the best Keith That doesnt work at all, however I got it working as I wanted to. Thanks for helping. Link to comment https://forums.phpfreaks.com/topic/176820-solved-1go-to-url-2go-to-second-url-3-go-to-third-url-dont-show-pages/#findComment-933169 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.