Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

Solved: Edit and browse through URL's automatically


(!)

great7's Avatar
great7 great7 is offline
Member with 23 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Beginner
18-Jun-2012, 07:49 PM #1
Solved: Edit and browse through URL's automatically
i want a web browser addon that can edit the url and then go to that url automatically

the URL will be the same url.. but different number at end.

example:

www.example.com/56049301

that would be the start url. the addon would then go

www.example.com/56049302
www.example.com/56049303
www.example.com/56049304
www.example.com/56049305
www.example.com/56049306
etc etc

just adding 1 to the end of url each time.

i have looked all over the net for something like this no luck

hopefully i will get a result from this website
colinsp's Avatar
colinsp   (Colin) colinsp is offline
Computer Specs
Member with 1,708 posts.
 
Join Date: Sep 2007
Location: Spain
19-Jun-2012, 01:17 AM #2
I don't know of anything like that. If you explain why you want to do that someone may be able to offer an alternative way of doing what you want.
allnodcoms's Avatar
allnodcoms   (Danny) allnodcoms is offline allnodcoms has a Profile Picture
Computer Specs
Member with 610 posts.
 
Join Date: Jun 2007
Location: Hertfordshire - England
Experience: Advanced
19-Jun-2012, 06:50 AM #3
As colin said, there's nothing out there that will do what you are asking, but if you want those URI's to open in separate windows then it would be a pretty simple thing to hand code in Javascript.

If you can let us know what you need it for (so that we can suggest an appropriate context), and your level of experience in JS then we can provide a more detailed explanation.

Danny
valis's Avatar
Moderator with 63,690 posts.
 
Join Date: Sep 2004
Location: as above
19-Jun-2012, 07:53 AM #4
what are you going to do when you get a null return?
great7's Avatar
great7 great7 is offline
Member with 23 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Beginner
19-Jun-2012, 10:29 PM #5
Thanks for all the responses.

Quote:
Originally Posted by allnodcoms View Post
As colin said, there's nothing out there that will do what you are asking, but if you want those URI's to open in separate windows then it would be a pretty simple thing to hand code in Javascript.

If you can let us know what you need it for (so that we can suggest an appropriate context), and your level of experience in JS then we can provide a more detailed explanation.

Danny
Want it to browse through logs. just to save me editing the url each time.. frustrating when got to do 100s times manually.

what you mentioned "but if you want those URI's to open in separate windows then it would be a pretty simple thing to hand code in Javascript." that sounds good. but would it be able to open in tabs instead of new windows?

well.. ive been wanting to do this for about a month or 2 . i have been trying to learn Php and html since i thought that is what i would need to know how to do this. From your post i now know it isnt needed. so i wasted my time.i have not tried writing java scripts yet.

would it be possible you could create that script for me ? if its simple and wouldn't be to much trouble for you i would be greatfull, if not will you point me in the right direction to where i can learn to write the script myself ?

Thank you.
colinsp's Avatar
colinsp   (Colin) colinsp is offline
Computer Specs
Member with 1,708 posts.
 
Join Date: Sep 2007
Location: Spain
20-Jun-2012, 01:04 AM #6
That would be something easy to code in php. But if you have 100's of these to go through opening a new tab for each automatically would probably kill your browser. Probably better with a php page on it with a next button that opens the next log file.
great7's Avatar
great7 great7 is offline
Member with 23 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Beginner
20-Jun-2012, 08:55 AM #7
Quote:
Originally Posted by colinsp View Post
That would be something easy to code in php. But if you have 100's of these to go through opening a new tab for each automatically would probably kill your browser. Probably better with a php page on it with a next button that opens the next log file.

that would be perfect. i could use imacro to record me clicking the next page button and loop it then.

But i don't know how to do this.

possible you could create it for me? or could link me to tutorials on how to add a next page button to a web page using php
allnodcoms's Avatar
allnodcoms   (Danny) allnodcoms is offline allnodcoms has a Profile Picture
Computer Specs
Member with 610 posts.
 
Join Date: Jun 2007
Location: Hertfordshire - England
Experience: Advanced
20-Jun-2012, 09:22 AM #8
Basically you'd need a script, showlogfile.php or similar, which accepts the number of the log file you want to view. The PHP script would then fetch this log (from where ever you store it) and echo this to the page. It would also create the 'next' and 'previous' links by incrementing and decrementing the current value and converting this into the corresponding URI according to your numbering methods. This script could also echo a GOTO field to allow you to enter the number of the log you wanted to jump to...

All of this should be fairly easy to implement with a basic knowledge of PHP, but if you have any specific questions regarding the implementation then just let us know and we'll see what we can do. I can't speak for Colin, but I don't usually give "Here's your code..." type solutions, I prefer to point people in the right direction and assist further if they get stuck. I just think it helps people to learn that way...

Danny
colinsp's Avatar
colinsp   (Colin) colinsp is offline
Computer Specs
Member with 1,708 posts.
 
Join Date: Sep 2007
Location: Spain
20-Jun-2012, 10:46 AM #9
I'm with Danny here. Try and code it yourself to start and then come back when you have specific issues that we can help you resolve. It is how I learnt to code php pages and it is a great way of learning.
great7's Avatar
great7 great7 is offline
Member with 23 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Beginner
20-Jun-2012, 02:54 PM #10
Okay..

i just googled "how to create showlogfile.php" i now know i need to get MySQL to create the databases.
need to learn SQL for the database and PhP to create the webpage. for the PHP i will be using notepad++. for the sql i will be using MySQL.



been studying SQL & PHP on this website for the last 2hours ... www.w3schools.com doesn't mention how i can start to fetch information from the webpage using php to create the databse with sql though.

how would i do that? fetch information from a webpage and then put it into the database then create the next page button?

if someone could direct me to some tutorials that specifically teaches how i do what i am aiming to do instead of information i wont be using. i would appreciate it.

Just to make clear if it isnt obvious already. i have very little knowledge in scripting/coding.
allnodcoms's Avatar
allnodcoms   (Danny) allnodcoms is offline allnodcoms has a Profile Picture
Computer Specs
Member with 610 posts.
 
Join Date: Jun 2007
Location: Hertfordshire - England
Experience: Advanced
20-Jun-2012, 03:36 PM #11
How do you store your log files at the moment? If you hold them on file then I'd leave MySQL for another day and just concentrate on the PHP.

Danny
great7's Avatar
great7 great7 is offline
Member with 23 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Beginner
20-Jun-2012, 04:15 PM #12
im not storing them anywhere . logs on a website that i use a lot

Honestly.. doubt i will be able to figure out how to do this.

its like learning a new language..


you know some very good tutorials that explain it in simple terms? or know of a website where there is willing people to do simple scripts for people ?
allnodcoms's Avatar
allnodcoms   (Danny) allnodcoms is offline allnodcoms has a Profile Picture
Computer Specs
Member with 610 posts.
 
Join Date: Jun 2007
Location: Hertfordshire - England
Experience: Advanced
20-Jun-2012, 04:35 PM #13
What do you type into the address bar of your browser to access these log files? Replace the actual domain with some made up one, but I need everything after the ".com" (for example), punctuation, question marks, the lot. This will tell me whether you are serving up a page that calls the log, or accessing it directly from a stored file.

Is this your domain (i.e. a domain to which you have server side access), or are we talking some other 3rd party site to which you have no backend access? It makes a difference as to what language we write this script in.

Get back to me and I'll see what can be done.

Danny
allnodcoms's Avatar
allnodcoms   (Danny) allnodcoms is offline allnodcoms has a Profile Picture
Computer Specs
Member with 610 posts.
 
Join Date: Jun 2007
Location: Hertfordshire - England
Experience: Advanced
21-Jun-2012, 10:51 AM #14
Cool OK - I see what your after now...
You're after a 'browser feature' that will provide easier navigation of a site over which you have no control.

This is kind of beyond the realms of what TechGuy is all about, but it's possible and quite an interesting side project, so I'm not going to write the script for you (for reasons I pointed out yesterday), but I will tell you how it can be achieved quite easily with a bit of HTML and Javascript.

You'll need to create a web page and fill it with an iFrame. Leave a small border (either top or bottom), around 20 - 30 pix high should be good, for your 'pagination' controls. In this border you'll need two buttons (for next and previous) and a text field (to directly enter a log id).

Here's the gist of it. You have half a URI (the bit up to and including "?id="), and to finish this address you just need to pin a number on the end of it. You can read that number from the text box, add it to the first half of the URI and set the completed string as the "src=" attribute of the iFrame. The next arrow (when clicked) adds one to the current number before adding it to the string, and the previous arrow takes one away, and so on. You could even get really lairy and store the current value as a cookie, so it's remembered for next time.

Really simple stuff, and all you need to do to view your logs is click a couple of buttons

Happy coding...

Danny
great7's Avatar
great7 great7 is offline
Member with 23 posts.
THREAD STARTER
 
Join Date: Jun 2012
Experience: Beginner
21-Jun-2012, 01:03 PM #15
Just want you to know i really appreciate the amount of feed back you are giving me. thank you.

i did some google searching. came up with this so far..

<html>
<body>

<center>
<iframe

src="" style="border:10px #C0C0C0 none;"
name="myiFrame" scrolling="no" frameborder="10" marginheight="10px" marginwidth="100px" height="300px" width="1000px"></iframe>
</center



that brings up the Log in a browser .. what you said "around 20 - 30 pix high should be good," when its set as that its just a tiny square, cant see any of the webpage.. was it meant to be like that? i have adjusted it so i can see more.

<center><form action="nextpage.html" method="get">
<input type="submit" value="Next" />
</form>
</center>

{</body>
</html>

that script above gives a next button. But when i click the button it doesn't go to the next log. came across that script when i searched for pagination.

"
You have half a URI (the bit up to and including "?id="), and to finish this address you just need to pin a number on the end of it. You can read that number from the text box, add it to the first half of the URI and set the completed string as the "src=" attribute of the iFrame. The next arrow (when clicked) adds one to the current number before adding it to the string, and the previous arrow takes one away."

that part confuses me i don't understand, could you explain it some more?

how would i get the button to add one to the current log number?

when i open the script into the browser the url is: file:///C:/Users/username/Desktop/testin1.html
is that suppose to be like that?

Last edited by great7; 21-Jun-2012 at 03:07 PM..
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑