Welcome Guest, Not a member yet? Register   Sign In
file_get_contents then perform javascript. possible?
#1

[eluser]new_igniter[/eluser]
Hello,
I am trying to get HTML from a page on another domain, then perform javascript to get an image...not the physical image, but the img src. Below is what I have so far, and it alerts [object HTML Image Element]. Is there a way for me to access the src through that object? Part B of my question, how can I make the HTML available to the javascript without printing it on the screen?

Code:
<?php
$url = 'http://twitpic.com/hmgt';
$xmldata = file_get_contents($url);
echo $xmldata;
?>
[removed]
elem = document.getElementById("pic");
alert(elem);
[removed]

Thanks!!!


Messages In This Thread
file_get_contents then perform javascript. possible? - by El Forum - 10-23-2008, 10:04 AM
file_get_contents then perform javascript. possible? - by El Forum - 10-23-2008, 10:09 AM
file_get_contents then perform javascript. possible? - by El Forum - 10-23-2008, 10:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB