I’m running a script that captures the path from a URL - it’s currently set up as www+checked+org+uk/ (can’t post links yet!) then click the LIST link bottom right then on one of the companies, but I’m trying to capture the path so that I can run it from the index script. I’m capturing the URL path details with $_SERVER[‘PATH_INFO’], exploding on “/”, but I can’t seem to capture anything before the www variable, such as the “co”. Is this a PHP issue, and do I have to get dirty with Apache to achieve this? Hopefully not as my Apache skills are similar to my brain surgery skills.
Not sure I’m understanding what you’re shooting for here…
Have you done a var_dump($_SERVER) yet? Copy the output from that and paste it in a text doc so you can format it and see what all you have to work with.
You could use something like this if you need the http:// …
$url_i_captured = ‘http://’.$_SERVER[‘HTTP_HOST’];
If you look at a URL after going through to ne of the destination pages (with a www in the path), you’ll see that a script called “co” is being accessed and is using the “www…” after it as the page variable. I’d ideally like to run this from the “index” file and not the “co” file, but when I try and capture that “www…” path variable, I run into trouble, as the /index is hidden by default.