Jump to content

XeroXer

Members
  • Posts

    80
  • Joined

  • Last visited

About XeroXer

  • Birthday 09/19/1985

Contact Methods

  • MSN
    xeroxer@xeroxer.com
  • Website URL
    http://www.xeroxer.com

Profile Information

  • Gender
    Male
  • Location
    Sweden

XeroXer's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi there! Made a little script to extract all the links from a site. Works like a charm as it is now but I need it to be able to search a file like http://www.google.com/search?q=xeroxer but then I get an error saying: Warning: file(http://www.google.com/search?q=xeroxer) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /customers/_/_/httpd.www/-/index.php on line 2 <?php $innehall = file('http://www.google.se/'); foreach($innehall as $enrad) { $slicerad = strstr($enrad, 'http://'); $slicerad = strrev($slicerad); $slicerad = strrchr($slicerad, '"'); $slicerad = strrev($slicerad); $slicerad = rtrim($slicerad, '"'); if($slicerad != "") { echo $slicerad; echo "<br>\n"; } else { echo ""; } } ?> So I was wondering if someone had any idea on how to make it work. And if someone has any idea on making the code better (though it works) you are welcome to post to.
  2. Well the problem is that I want to replace the number in the URL if it's already there. And if it's not I want to add a & and then enter the new. If none of them exists I want to add a ? and then the code. If a user goes to http://www.test.com/mysite/ and they click a link to my gallery. The URL then goes to http://www.test.com/mysite/?m=2 that is my gallery. They then select a subcategory in my gallery to my vacation pictures. The URL then goes to http://www.test.com/mysite/?m=2&p=1 that is my gallery with the subcategory vacation. In that gallery they select the folder Ibiza2006 and the URL goes to http://www.test.com/mysite/?m=2&p=1&f=Ibiza2006 If they now select a different gallery say London2003 the URL becomes http://www.test.com/mysite/?m=2&p=1&f=Ibiza2006&f=London2003 And it doesn't work. I can also select main section such as my guestbook and the URL goes to this: http://www.test.com/mysite/?m=2&p=1&f=Ibiza2006&f=London2003?m=3 * note the ? and not & * All this is because I use REQUEST_URI and just add the ?m=1, &p=2 or &f=folder. Can I somehow search the REQUEST_URI for m=, p= and f= ? And if the one I am trying to enter exists it replaces that number and if none of them exists it adds a ? in the start. And if another one exists but not the one I am trying to enter it adds a &. ( I know that this can be hard to understand but I so need your help. )
  3. Hi there! I am making my whole menusystem with ?m=1&p=2&f=folder I am doing this with linking to $_SERVER['REQUEST_URI']. The problem is that if m=1 is in the URL and I click a link with m=2 it is also entered into the URL. So I have both 1 and 2 and the site doesn't work. Or the problem that if m=2 and I press a link that goes to p=3 it has to add the & between them. Can I check if the URL contains a m=, p= or f= and depending on what link is pressed replace the number/text or append it with a & at the end of the URL. Hope that someone understands my problem...
  4. Thanks all! I used a edited version of ProjectFear's idea. At the top of the page I set $count to 0 <?php $count = "0"; ?> At the start of my foreach I check the $count and if it is 3 I enter the <tr> <?php foreach ($bilder as $bilderna) { if($count == 3){ $count = 0; echo "</tr><tr>"; echo "\n"; } else { echo ""; } ?> After the image code is entered I increse the $count by 1. <?php echo "<td><a href='$sokvag' target='_blank'><img src='$thumbsokvag' border='0' alt='$bilderna / $filstorlek bytes'></a><br>"; echo $bilderna . " - " . $filstorlek . " bytes</td>"; $count++; ?> And after the whole foreach section I make an echo out </tr> because that will always be needed because the other </tr> adding is at the beginning of the foreach. <?php echo "</tr>"; ?>
  5. Hi! I am using a foreach command to list my image gallery. The problem is I want the images in a table but don't know how to make it enter a new <tr>. Can I do so that after three images in my foreach it echos </tr><tr>?
  6. I am making my own simple gallery where I am just suppose to be able to upload a folder and the server fixes the rest. I have gotten it so everything is scanned and entered into my fields correct. I have made it so a copy of the original image is placed in a thumbs folder. But here is where I need help. Can I do it so that after the copy is done it also resizes the image so I have to do nothing on my own. [code]<?php mkdir($bildmapp . "/thumbs"); if (!copy($sokvag, $thumbsokvag)) { echo "copy file failed."; } ?>[/code]
  7. If I have an array and one of the array lines/entrys is really long. Can I make it so that the really long line somewhere splits itself into a new line/entry in the array? If I have this: [code]Array (   [a] => 123563573476   [b] => 22323213<>2474361414   [c] => 3432563246324 )[/code] Can I with any array command make that into this: [code]Array (   [a] => 123563573476   [b] => 22323213<   [c] => >2474361414   [d] => 3432563246324 )[/code] It must continue to be a array and not split into a string.
  8. If I have an array and one of the array lines/entrys is really long. Can I make it so that the really long line somewhere splits itself into a new line/entry in the array? If I have this: [code]Array (   [a] => 123563573476   [b] => 22323213<>2474361414   [c] => 3432563246324 )[/code] Can I with any array command make that into this: [code]Array (   [a] => 123563573476   [b] => 22323213<   [c] => >2474361414   [d] => 3432563246324 )[/code]
  9. then I have to do everything in another way because foreach won't work with a string.
  10. Well installed php and all on my laptop and the script kinda works. [code]<?php         $sokstrang = file("http://images.google.com/images?svnum=10&hl=en&lr=&btnG=Search&q=".$_POST['search']);         foreach($sokstrang as $htmlrader => $enrad) {                 $expett = explode(":http://", $enrad);                 $exptva = explode("\" height=", $expett[1]);                 $bildlank = "http://".$exptva[0];                 if($bildlank == "http://") { echo ""; }                 else { echo $bildlank."<br>"; }         } ?>[/code] The problem is that google doesn't make every link on one row so the script just lists one row that is mixed up. Can I somehow before I print the info out make every image link on one row?
  11. I get an error message. As I can see this means that my webhost does not support other sites through the file command. I also tried file_get_content but the same error there. Can I make it work anyhow or do I have to host the php files myself? [b]Warning:[/b] file(http://images.google.com/images?hl=en&q=gothicmadness) [[color=blue]function.file[/color]]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in [b]/customers/xeroxer.com/xeroxer.com/httpd.www/gimg/gimg.php[/b] on line [b]2[/b]
  12. How do I combine all this with a search function? :) Need all the help I can get. Have done community sites and such but never searched through another site and list the result.
  13. Well google automaticly creates a direct link to the images in it's own top border when you click the thumbnails. Shouldn't I somehow be able to get the direct link from there? Also there check so the images exists so I don't link to a bunch of non existant images.
  14. Hi there! I am making a search script for personal use. I am expanding my wallpaper database and feel that searching every name on google, then clicking two links per image and then maybe downloading it takes a lot of time. So what I want the script to do is: * lista a empty textbox where I enter the imagename I want to find. * search images.google.com for that name. * On the scriptsite list all the images in their original size. (*) If more then 50 results list them as text links or thumbnails instead. Anyone feels like helping me with this?
  15. thank you... thank you... thank you... thank you... thank you... thank you... :)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.