var_dump says bool but returning a string -php

escadback

New Member
i'm trying to check my email with curl.I've got a function which connects to gmail:\[code\]function check_email($url){ // sendRequest $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 0); $curlData = http://stackoverflow.com/questions/13736085/curl_exec($curl); curl_close($curl); //returning retrieved message return $curlData;}\[/code\]When I call the function and echo it (\[code\]$email = check_email($ur);echo $email;\[/code\]), gmail sends me some html instead of showing the message:\[code\]<HTML><HEAD><TITLE>Moved Temporarily</TITLE></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"><H1>Moved Temporarily</H1>The document has moved <A HREF="http://stackoverflow.com/questions/13736085/-very large url-">here</A>.</BODY></HTML>\[/code\]so i want to then extract the \[code\]"-very large url-"\[/code\] and curl to that, but when i \[code\]var_dump($email)\[/code\] it says it's a bool! why is it returning html if it's a boolean and how can i get to the aforementioned html via php?
 
Back
Top