User Profile
Collapse
-
My guess would be one of two things; First check that the url that you stored in your mysql database/table is correct, if so just try to echo $dweb by itself and see what outputs. The other thing that may be wrong is when writing urls make sure you use 'http://www.thelink.com ' not just 'www.thelink.co m' otherwise it won't point outside of your current domain. -
Possible to run a socks4/5 proxy/ssh tunnel on a non-dedicated web server?
Basically i am just try to find out if its possible to setup a socks4/5 proxy php script on non-dedicated server hosting.
It has to be able to tunnel and forward all port numbers not just 80/http, i.e. a non browser based proxy.
I have looked into just using ssh commands but it seems on most non-dedicated servers you cannot use the appropriate commands to create a ssh tunnel/proxy.
Any ideas on where to... -
its was painfull but i finally found a good tutorial on the use of 'regular expression' can be found at
-> 'http://www.tipsntutori als.com/tutorials/PHP/50'
Anyway here was the solution i managed to work out
->
Code:preg_match_all( "#href=\"(((https?://)|(/))[&=a-zA-Z0-9-_./]+)\"#si", $html, $links );
Leave a comment:
-
how to use 2 patterns for preg_match_all function PHP
Basically i am trying to understand and learn how to make a php spider (yes i know its not efficient but its only for a single website at a time).
Now the problem i am having is with theCode:preg_match_all ()
Code:preg_match_all( "#href=\"(https?://[&=a-zA-Z0-9-_./]+)\"#si", $html2, $links2 );
-
Apperently this function-
Code:htmlspecialchars();
Other then converting them i know of no other way to achieve what you are looking for.Leave a comment:
-
-
Newbite Q' help understanding the use of Ajax
Never had any expereience with Ajax before today, what im trying to find out how it differs from javascript for example what would be the Ajax version of -
Code:<script type="text/javascript"> document.write("Hello World!"); </script>
Another... -
Not sure if this is applicable but my understanding of mysql_real_esca pe_string() function is that it removes illegal characters from a string to be inserted into a sql database, this is done to stop sql injections.
Anyway the i think that some of you characters a getting stripped by that function. I noticed you said it stoped at "-(" when the whole line is _(¯`•★•´¯)_BLON DE_(¯`•★•´¯)_w4 m - w4m ,...Leave a comment:
-
You can google how to connect to database using php, personally i learnt how to do this via -
http://www.w3schools.com/php/php_mysql_connect.asp
U can also learn how to retrieve data from database there to.
once you done this all you need to do is ehco the varible/s in a html-
Code:<html> <body> <?php echo $var?> </body> </html>
Leave a comment:
-
Not sure if this will help but i found when working with .php, mysql and html at the same time its usually easy to retrieve all information from mysql database before trying to display.
for example set it up like this(note this is not the full code you need) -
Code:<?php //connect to your database here //then retrieve all varibles you will need $Var[$i] = mysql_query($query,$connection)
Leave a comment:
-
file_get_contents & permission errors
Currently working on a site that has user and admin access. Now basically im trying to use -
Code:$file1 = file_get_contents($url);
Now if i directly type in what $url equals, for example -
Code://note this is an example url not real one.
-
Figured it out turned out there was another javascript function interfering with the execuition of the script, also the script was somehow to complicated to submit. In the end i removed all excess code and simplified it right down so now it will sumbit the form automatically upon submission.
Now all i have to check is weither when you run the page as a cron job that the javascript will execute or not.Leave a comment:
-
actually i have 2 similar commands to submit the form -
Code:document.forms["myform"].submit();
Code:document.myform.submit();
Leave a comment:
-
Submit a Form without a physical click.
Before you read below i only added that so you may understand my problem more fully, basically all i am trying to achieve is an onpage load sumbit form function.
Also i have previously tried this code with no success -
Code:head> <script type="text/javascript"> function formsubmit(){ document.forms["myform"].submit(); document.myform.submit(); }
-
Best way to setup a proxy via php on a websever?
So basically my country is going to be introducing a country wide filter to block a-lot of websites.
So i started doing a little research into setting up a proxy on a remote webserver. When at school or uni, i'd use either a proxy browser or find a proxy list and use the proxies there in my browsers proxy field, anyways both of those methods work fine but really slowly and don't allow for the functionality im looking for.
... -
Problems copying image name locations from one database to another
This is a little hard to explain but i will try to make it as clear as possible.
Firstly here's the setup, 2 databases on 2 different servers (databases are identical) now within the first database is a bunch of locations to images, though instead of a full path it only includes the file name not an absolute path( e.g. image.jpg).
Now im trying to copy the names to another database this is no problem but obviously the... -
-
error inserting data into table
Ok heres the code im using to insert data into a table-
Code:$import="INSERT into default_en_listingsdbelements(listingsdbelements_id,listingsdbelements_field_name,listingsdbelements_field_value,listingsdb_id,userdb_id) values('$data[0]','$data[1]','$data[2]'','$data[3]'','$data[4]')";
just wondering what exactly... -
Oh really? sweet thanks heaps then that will definitely help in the case in can't get the appropriate privileges.
Didn't realize that you could use the LOAD DATA INFILE with a .csv file thought it had to be it had its own structure,
But thanks agains, cheersLeave a comment:
-
That would work great but i need it to be saved onto the server not my computer, the reason for this is basically -
attached to one website is the main database which contains a whole bunch of elements, now im setting up satellite sites that can link to the other database, previously it was directly linked to the main database but this was cause to many problems and wasn't working. Therefore decided that i could use php to backup certain...Leave a comment:
No activity results to display
Show More
Leave a comment: