I have a php script which scrape the url of on image from a webpage (with permission) by using parameters which i send from my app using PostString.
This is part of the php script which is working perfect when launched from my browser, i use a simple html dom parser:
To test this i've just created an html form and by input the field name, it works perfectly but
when i execute the script from my app by passing name parameter with poststring it does not work,
i get nothing back, like the scraping part of code it is not executed. (i know the rest script is executed because from the app i pass many other parameters and they get written on db correctly)
What it could be?
Thank you
This is part of the php script which is working perfect when launched from my browser, i use a simple html dom parser:
B4X:
$url= "http://www.somesite.com/". $_POST['name'];
$page = file_get_html($url);
$doc = new DOMDocument();
@$doc->loadHTML($page);
$images = $doc->getElementsByTagName('img');
//sleep(3);
foreach($page->find('img') as $element)
{
echo $profile_picture = $element->src;
}
To test this i've just created an html form and by input the field name, it works perfectly but
when i execute the script from my app by passing name parameter with poststring it does not work,
i get nothing back, like the scraping part of code it is not executed. (i know the rest script is executed because from the app i pass many other parameters and they get written on db correctly)
B4X:
sendmessageJob.PostString("http://www.somesite.net/app/new.php", "name="&name.Text"")
What it could be?
Thank you