i am trying to get the data After an '@' sign from an email address, this is what i am trying to do i am using the $_GET['email'] to get the email from the url, now i want to extract the data after the @, store the data in a variable then send the user to that domain eg: email@gmail.com i want to get the gmail.com, store it and then send the user to gmail.com
this is all i have tried but all gives me the same error 1:
$domain1 = $_GET['email'];
$domain = substr($domain1, strpos($domain1, "@") + 1);
// then am using the header location to send the user to the gmail.com
header('Location: http://$domain');
2:
$domain1 = $_GET['email'];
$domain2 = strtok( $domain1, '@' );
$domain = strtok( '' );
// then am using the header location to send the user to the gmail.com
header('Location: http://$domain');
this is the error
This site can’t be reached %24domain’s server IP address could not be found.
Try running Windows Network Diagnostics.
DNS_PROBE_FINISHED_NXDOMAIN
if you read the error message it is trying to redirect to %24domain and i don't know where its getting that from
i have tried all the Technics related to this i saw from this forum but i still get the same error
guys please help