I want to be able to do ?s=blah and it fill out the spot i want to start my grab code
Here is my code that works fine
$url = (!isset($_GET["f"])) ? "filehere.php" : htmlspecialchars($_GET["f"]);
$url2 = (!isset($_GET["d"])) ? "filehere.php" : htmlspecialchars($_GET["d"]);
$url3 = (!isset($_GET["s"])) ? "filehere.php" : htmlspecialchars($_GET["s"]);
GetStringBetween(getURL("urlhere".$url ."&id=".$url2),$url3,'.html');
Ok so my question is with URL3 atm anything i put after &s=blahblah starts to grab there which is wonderful but how would i go about adding some pretext before my $$url3?
i tried ),"TEXT".$url3.",'.html');
but it broke the code... What im wanting is it to start grabbing from textandwhateverisafters=
any ideas or advice on how to set this up would be great
The question is a little confusing but maybe try writing to $url3 before you reach the "GetStringBetween" function? You do not state if you want it before $url3 regardless of whether $_GET["s"] is set. Here is an example of prefixing "HELLO" to both.
$prefix = "HELLO";
$url3 = $prefix.(!isset($_GET["s"])?"filehere.php":htmlspecialchars($_GET["s"]));
Example of appending only if it exists:
$prefix = "HELLO";
$url3 = !isset($_GET["s"])?"filehere.php":($prefix.htmlspecialchars($_GET["s"]));