bigfatgreedykat Posted February 6, 2008 Share Posted February 6, 2008 Hello I need to open a url and click a certain section (word) to move onto next page! Any ideas? regards BFGK Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/ Share on other sites More sharing options...
Stooney Posted February 6, 2008 Share Posted February 6, 2008 Google usually helps. Or maybe more information on what you're trying to achieve. Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460262 Share on other sites More sharing options...
mrdamien Posted February 6, 2008 Share Posted February 6, 2008 Are you talking about a site-crawling-spider type script or just making an html link.. Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460264 Share on other sites More sharing options...
phpSensei Posted February 6, 2008 Share Posted February 6, 2008 Be more precise, you need to provide us with more details on what you want to do. You want to open a url (How? Is the Url just a page? Is it supose to load from PHP automaticaly? Is it from your Mysql?)... To solve your HTML link problem < a href= "http://www.google.com">Go to google</a> Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460279 Share on other sites More sharing options...
bigfatgreedykat Posted February 6, 2008 Author Share Posted February 6, 2008 I did a Google as advised and found this: <?php $handle = fopen("http://www.google.co.uk/", "r"); ?> I'm presuming the above opens url! If this worked how would i get the word "ADVERTISING PROGRAMMES" link clicked??? Look forward to your reply. regards BFGK Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460283 Share on other sites More sharing options...
teng84 Posted February 7, 2008 Share Posted February 7, 2008 not clear enough for me sorry ! Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460304 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 not clear enough for me sorry ! Agreed! me neither... Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460310 Share on other sites More sharing options...
awpti Posted February 7, 2008 Share Posted February 7, 2008 Sounds like someone trying to get a webapp to click links - aka adsense fraudster. Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460312 Share on other sites More sharing options...
phpSensei Posted February 7, 2008 Share Posted February 7, 2008 Well no wonder he was trying to keep this so unclear, I get it now. We won't help you with fraud, but please come back with some real questions next time. Topic should be locked. Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460316 Share on other sites More sharing options...
bigfatgreedykat Posted February 7, 2008 Author Share Posted February 7, 2008 Thanks But i'm no fraudster!!! Just a newbie to PHP! I thought that PHP would be a cool method of producing the same results as VB. I created some code in VBScript that uses sendkeys to logon to website and download text files for our business!!! Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run "iexplore.exe" objShell.AppActivate "Internet Explorer" , 3 WScript.Sleep 1000 objShell.run("http://www") WScript.Sleep 8000 objShell.Sendkeys "username" WScript.Sleep 3000 objShell.Sendkeys "{TAB}" WScript.Sleep 3000 objShell.Sendkeys "password" WScript.Sleep 3000 'objShell.Sendkeys "{ENTER}" 'WScript.Sleep 50000 objShell.Sendkeys "{TAB 7} " WScript.Sleep 1000 'objShell.Sendkeys "{ENTER}" 'WScript.Sleep 50000 objShell.Sendkeys "{TAB 12}" WScript.Sleep 1000 objShell.Sendkeys "{ENTER}" WScript.Sleep 5000 ' download file save to desktop 'objShell.Sendkeys "{TAB 2}" 'WScript.Sleep 5000 objShell.Sendkeys "{ENTER}" WScript.Sleep 1000 objShell.Sendkeys "{ENTER}" WScript.Sleep 10000 objShell.Sendkeys "%f" WScript.Sleep 8000 objShell.Sendkeys "{DOWN 11}" WScript.Sleep 3000 objShell.Sendkeys "{ENTER}" WScript.Sleep 8000 'objShell.Sendkeys "%f" 'WScript.Sleep 1000 'objShell.Sendkeys "{DOWN 4}" 'WScript.Sleep 1000 'objShell.Sendkeys "{ENTER}" 'WScript.Sleep 3000 As you can above the code is long and complicated!!! Lock the topic if you think thats appropriate! I will stay a newbie forever!!! thanks BFGK Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460325 Share on other sites More sharing options...
teng84 Posted February 7, 2008 Share Posted February 7, 2008 you can do something like ... put a link that has a login details assuming you have this on your link! teng.php?user=teng&id=123456 now when you click the link you will be navigated on to that page right? now do this.. if(isset($_GET['user']) && isset($_GET['id'])){ if(//check if valid username and id){ header('location: location of the text file to be downloaded'); }else{ //do erroring thingy } }else{ //not valid } hope that helps.. Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460331 Share on other sites More sharing options...
trq Posted February 7, 2008 Share Posted February 7, 2008 Take a look at the curl extension if all you want to do is automate the login process on another page. Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460340 Share on other sites More sharing options...
bigfatgreedykat Posted February 7, 2008 Author Share Posted February 7, 2008 Thanks I'll have a look @ code and CURL! Thanks again! regards BFGK Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-460346 Share on other sites More sharing options...
bigfatgreedykat Posted February 8, 2008 Author Share Posted February 8, 2008 Hello all I've been researching into my forum question and i think the first stage that i was trying to explain was REDIRECTION to another webpage! The form page i am trying to create uses basic authentication. Creating a form that inserts username and password into this: http://username:[email protected] Any ideas or examples to look at! regards BFGK Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-461879 Share on other sites More sharing options...
bigfatgreedykat Posted February 9, 2008 Author Share Posted February 9, 2008 Hello all I thought i'd keep you all updated on my progress!! Created the simple form page! (Even got page to email back result!!!) Used POST method. Now able to create the basic authentication link/url: http:username:[email protected] Learnt a lot searching google created url link from above but really want to the above link to open without displaying webpage and locate specific file!!! I was wondering whether this is possible??? Look forward to any replies! regards BFGK Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-462345 Share on other sites More sharing options...
bigfatgreedykat Posted February 11, 2008 Author Share Posted February 11, 2008 Hello all Got the CURL to work!!! Now working on using CURL to get file!!! Will keep you all updated! regards BFGK Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-464427 Share on other sites More sharing options...
phpSensei Posted February 11, 2008 Share Posted February 11, 2008 Good for you man. Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-464431 Share on other sites More sharing options...
resago Posted February 12, 2008 Share Posted February 12, 2008 what do you want it to locate? Link to comment https://forums.phpfreaks.com/topic/89814-click-word-on-webpage/#findComment-464446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.