# \[Pro\] Automatically Load Web Page & Click Link

**URL:** <https://discourse.softpress.com/t/pro-automatically-load-web-page-click-link/22566>\
**Category:** Dynamo\
**Created:** [August 18, 2015, 12:01am UTC](https://discourse.softpress.com/t/pro-automatically-load-web-page-click-link/22566 "2015-08-18T00:01:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JDW](https://discourse.softpress.com/user_avatar/discourse.softpress.com/jdw/32/2729_2.png) [@JDW](https://discourse.softpress.com/u/JDW)\
**Post date:** [August 18, 2015, 12:01am UTC](https://discourse.softpress.com/t/pro-automatically-load-web-page-click-link/22566/1 "2015-08-18T00:01:45Z")

</div>

Consider the following web page, that has a single text link on it:

[http://macusa.net/KIRAMEKdb/](http://macusa.net/KIRAMEKdb/)

That is not my web site, and therefore I have no control over the content of that web page.

The name of that text link won’t change, but the URL will change.

AIM: I want to create LINK (button, text link, whatever) on a page on MY web site (using Freeway, of course), that, when clicked, will go to the above macusa page and automatically follow the link posted there.

Another way to think of it would be to have code which opens the KIRAMEKdb page and automatically clicks the link.

I assume this could be achieved with PHP, cURL and perhaps a line of JavaScript, but what are your suggestions?

Again, I have my existing web page in Freeway, on which I intend to create a LINK that when clicked will automatically grab the URL of the link on that macusa page and open it in the same browser window.

How would I accomplish this task?

Thanks.

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:

> **[Information for existing FreewayTalk / Groups.io users](https://discourse.softpress.com/t/information-for-existing-freewaytalk-groups-io-users/24891)**
>
> The purpose of this topic is to provide information about the migration from FreewayTalk and Groups io to Discourse and the differences in Discourse, as well as a place to discuss the good or bad of the migration. For those previously subscribing...

---

<div class="post-metadata">

**Author:** ![waltd](https://discourse.softpress.com/user_avatar/discourse.softpress.com/waltd/32/2720_2.png) [@waltd](https://discourse.softpress.com/u/waltd)\
**Post date:** [August 19, 2015, 12:24am UTC](https://discourse.softpress.com/t/pro-automatically-load-web-page-click-link/22566/2 "2015-08-19T00:24:51Z")

</div>

Well, first off, JavaScript absolutely is prohibited from doing this by the Same Origin Policy. PHP could do it, and I would have a look at phpQuery, which is a jQuery-influenced wrapper around LibXML for doing “screen-scraping” sorts of things like this.

Is this page subject to change? If not, just copy the URL out of it and apply it to your button on your page. It seems to work here when I do that.

If you know that the page will only ever have that one link on it, then I would periodically look at the page, compare it with a cached version, and if it has changed, update the cache. Then simply rewrite the link on your page (again, using PHP) to point to the link you want to go to.

Walter

On Aug 17, 2015, at 8:01 PM, JDW [email@hidden](mailto:email@hidden) wrote:

> Consider the following web page, that has a single text link on it:
> 
> [One Moment Please](http://macusa.net/KIRAMEKdb/)
> 
> That is not my web site, and therefore I have no control over the content of that web page.
> 
> The name of that text link won’t change, but the URL will change.
> 
> AIM: I want to create LINK (button, text link, whatever) on a page on MY web site (using Freeway, of course), that, when clicked, will go to the above macusa page and automatically follow the link posted there.
> 
> Another way to think of it would be to have code which opens the KIRAMEKdb page and automatically clicks the link.
> 
> I assume this could be achieved with PHP, cURL and perhaps a line of JavaScript, but what are your suggestions?
> 
> Again, I have my existing web page in Freeway, on which I intend to create a LINK that when clicked will automatically grab the URL of the link on that macusa page and open it in the same browser window.
> 
> How would I accomplish this task?
> 
> Thanks.
> 
> * * *
> 
> dynamo mailing list  
> email@hidden  
> Update your subscriptions at:  
> [Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk](https://freewaytalk.softpress.com/person/options)

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[https://freewaytalk.softpress.com/person/options](https://freewaytalk.softpress.com/person/options)

---

<div class="post-metadata">

**Author:** ![JDW](https://discourse.softpress.com/user_avatar/discourse.softpress.com/jdw/32/2729_2.png) [@JDW](https://discourse.softpress.com/u/JDW)\
**Post date:** [August 19, 2015, 12:38am UTC](https://discourse.softpress.com/t/pro-automatically-load-web-page-click-link/22566/3 "2015-08-19T00:38:43Z")

</div>

Thank you for the advice, Walter. I will ponder it.

–James W.

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:

> **[Information for existing FreewayTalk / Groups.io users](https://discourse.softpress.com/t/information-for-existing-freewaytalk-groups-io-users/24891)**
>
> The purpose of this topic is to provide information about the migration from FreewayTalk and Groups io to Discourse and the differences in Discourse, as well as a place to discuss the good or bad of the migration. For those previously subscribing...
