Jump to content

[SOLVED] 1.Go to url 2.Go to second url 3. Go to third url... (dont show pages)


Driimer

Recommended Posts

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.

 

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??

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.

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.

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)

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.